hets -- a heterogenous Specification (CASL) tool setContentsIndex
Common.Token
Portability portable
Stability provisional
Maintainer hets@tzi.de
Contents
Casl keyword lists
a single Token parser
Token lists parsers
parser for mixfix and compound Ids
parser for simple Ids
parser for key Tokens
Description
parser for CASL Ids based on Common.Lexer
Synopsis
casl_reserved_ops :: [String]
formula_ops :: [String]
casl_reserved_fops :: [String]
casl_basic_reserved_words :: [String]
casl_structured_reserved_words :: [String]
casl_reserved_words :: [String]
formula_words :: [String]
casl_reserved_fwords :: [String]
sid :: ([String], [String]) -> GenParser Char st Token
braceP :: GenParser Char st [Token] -> GenParser Char st [Token]
bracketP :: GenParser Char st [Token] -> GenParser Char st [Token]
innerMix1 :: ([String], [String]) -> GenParser Char st [Token]
innerMix2 :: ([String], [String]) -> GenParser Char st [Token]
innerList :: ([String], [String]) -> GenParser Char st [Token]
topMix1 :: ([String], [String]) -> GenParser Char st [Token]
topMix2 :: ([String], [String]) -> GenParser Char st [Token]
topMix3 :: ([String], [String]) -> GenParser Char st [Token]
afterPlace :: ([String], [String]) -> GenParser Char st [Token]
middle :: ([String], [String]) -> GenParser Char st [Token]
tokStart :: ([String], [String]) -> GenParser Char st [Token]
start :: ([String], [String]) -> GenParser Char st [Token]
comps :: ([String], [String]) -> GenParser Char st ([Id], [Pos])
mixId :: ([String], [String]) -> ([String], [String]) -> GenParser Char st Id
casl_keys :: ([String], [String])
parseId :: GenParser Char st Id
consId :: GenParser Char st Id
sortId :: GenParser Char st Id
varId :: GenParser Char st Token
simpleId :: GenParser Char st Token
quMarkT :: GenParser Char st Token
colonST :: GenParser Char st Token
crossT :: GenParser Char st Token
Casl keyword lists
casl_reserved_ops :: [String]
reserved signs
formula_ops :: [String]
these formula signs are legal in terms, but illegal in declarations
casl_reserved_fops :: [String]
all reseverd signs
casl_basic_reserved_words :: [String]
reserved keywords
casl_structured_reserved_words :: [String]
reserved keywords
casl_reserved_words :: [String]
reserved keywords
formula_words :: [String]
these formula words are legal in terms, but illegal in declarations
casl_reserved_fwords :: [String]
all reserved words
a single Token parser
sid :: ([String], [String]) -> GenParser Char st Token
a simple Token parser depending on reserved signs and words (including a quoted char, dot-words or a single digit)
Token lists parsers
braceP :: GenParser Char st [Token] -> GenParser Char st [Token]
balanced mixfix components within braces
bracketP :: GenParser Char st [Token] -> GenParser Char st [Token]
balanced mixfix components within square brackets
innerMix1 :: ([String], [String]) -> GenParser Char st [Token]
an sid optionally followed by other mixfix components (without no two consecutive sids)
innerMix2 :: ([String], [String]) -> GenParser Char st [Token]
mixfix components not starting with a sid (possibly places)
innerList :: ([String], [String]) -> GenParser Char st [Token]
any mixfix components within braces or brackets
topMix1 :: ([String], [String]) -> GenParser Char st [Token]
mixfix components starting with a sid (outside innerList)
topMix2 :: ([String], [String]) -> GenParser Char st [Token]
mixfix components starting with braces (braceP) that may follow sid outside innerList. (Square brackets after a sid will be taken as a compound list.)
topMix3 :: ([String], [String]) -> GenParser Char st [Token]
mixfix components starting with square brackets (bracketP) that may follow a place (placeT) (outside innerList)
afterPlace :: ([String], [String]) -> GenParser Char st [Token]
any (topMix1, topMix2, topMix3) mixfix components that may follow a place (placeT) at the top level
middle :: ([String], [String]) -> GenParser Char st [Token]
places possibly followed by other (afterPlace) mixfix components
tokStart :: ([String], [String]) -> GenParser Char st [Token]
many (balanced, top-level) mixfix components (afterPlace) possibly interspersed with multiple places (placeT)
start :: ([String], [String]) -> GenParser Char st [Token]
any (balanced, top-level) mixfix components possibly starting with places but no single placeT only.
parser for mixfix and compound Ids
comps :: ([String], [String]) -> GenParser Char st ([Id], [Pos])
parsing a compound list
mixId :: ([String], [String]) -> ([String], [String]) -> GenParser Char st Id
parse mixfix components (start) and an optional compound list (comps) if the last token was no place. Accept possibly further places. Key strings (second argument) within compound list may differ from top-level key strings (frist argument)!
casl_keys :: ([String], [String])
the Casl key strings (signs first)
parseId :: GenParser Char st Id
Casl ids for operations and predicates
consId :: GenParser Char st Id
disallow barS with in the top-level of constructor names
sortId :: GenParser Char st Id
Casl sorts are simple words (varId), but may have a compound list (comps)
parser for simple Ids
varId :: GenParser Char st Token
parse a simple word not in casl_reserved_fwords
simpleId :: GenParser Char st Token
same as varId. SIMPLE_ID for spec- and view names
parser for key Tokens
quMarkT :: GenParser Char st Token
parse a question mark key sign (quMark)
colonST :: GenParser Char st Token
parse a colon (colonS) even if other signs (like quMark) immediately follow.
crossT :: GenParser Char st Token
parse the product key sign (prodS or timesS)
Produced by Haddock version 0.6