Safe Haskell | None |
---|
Imparse Cross-platform and -language parser generator.
Text/Imparse/AbstractSyntax.hs
Data structure for Imparse parser definitions.
- type Import = String
- type NonTerminal = String
- type Constructor = String
- type WhitespaceParse = Bool
- data Parser a = Parser a [Import] [Production a]
- data Production a = Production a NonTerminal [Choices a]
- data Choices a = Choices a [Choice a]
- data Choice a = Choice a (Maybe Constructor) Association [Element a]
- type Minimum = Integer
- type Separator = String
- type TerminalString = String
- type RegularExpression = String
- data Association
- = AssocNone
- | AssocRight
- | AssocLeft
- | AssocFlat
- data Element a
- = NonTerminal a NonTerminal
- | Many (Element a) (Maybe Separator)
- | May (Element a)
- | Indented WhitespaceParse (Element a)
- | Terminal Terminal
- | Error String
- data Terminal
- isOp :: String -> Bool
- isData :: Element a -> Bool
- terminals :: Parser a -> [Terminal]
- productionNonTerminal :: Production a -> NonTerminal
Documentation
type NonTerminal = StringSource
type Constructor = StringSource
type WhitespaceParse = BoolSource
Parser a [Import] [Production a] |
Annotate Parser | Static analysis annotation setting and retrieval. |
Eq a => Eq (Parser a) | |
Show (Parser a) | Functions for converting a parser into an ASCII string. |
(ToHighlights a, ToMessages a) => ToReport (Parser a) | Functions for converting a parser abstract syntax instance into a rich report. |
ToUxADT (Parser a) | Functions for converting a parser into a UXADT instance string. |
data Production a Source
Production a NonTerminal [Choices a] |
Annotate Production | |
Eq a => Eq (Production a) | |
Show (Production a) | |
(ToHighlights a, ToMessages a) => ToReport (Production a) | |
ToUxADT (Production a) |
Choice a (Maybe Constructor) Association [Element a] |
type TerminalString = StringSource
type RegularExpression = StringSource
NonTerminal a NonTerminal | |
Many (Element a) (Maybe Separator) | |
May (Element a) | |
Indented WhitespaceParse (Element a) | |
Terminal Terminal | |
Error String |