Hets - the Heterogeneous Tool Set

Copyright(c) Christian Maeder and Uni Bremen 2002-2004
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred

Common.Token

Contents

Description

Parser for CASL Ids based on Common.Lexer

Synopsis

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

criticalKeywords :: [String]

keywords terminating a basic spec or starting a new library item

terminatingKeywords :: [String]

keywords terminating a basic spec

startingKeywords :: [String]

keywords starting a library item

otherStartKeywords :: [String]

keywords that may follow a defining equal sign

continuationKeywords :: [String]

other intermediate 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 taking lists of key symbols and words as parameter

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], Range)

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 (first argument)!

casl_keys :: [String] -> ([String], [String])

the Casl key strings (signs first) with additional keywords

parseId :: [String] -> GenParser Char st Id

Casl ids for operations and predicates

consId :: [String] -> GenParser Char st Id

disallow barS within the top-level of constructor names

sortId :: [String] -> GenParser Char st Id

Casl sorts are simple words (varId), but may have a compound list (comps)

parser for simple Ids

varId :: [String] -> GenParser Char st Token

parse a simple word not in casl_reserved_fwords

nonSkippingSimpleId :: GenParser Char st Token

non-skipping version for simple ids

simpleId :: GenParser Char st Token

like 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 colonS possibly immediately followed by a quMark

crossT :: GenParser Char st Token

parse the product key sign (prodS or timesS)