BNFC3-3.0: A compiler front-end generator.
Safe HaskellNone
LanguageHaskell2010

BNFC.Backend.Haskell.Utilities.InitState

Description

Utilies for Haskell state initialitation.

Synopsis

Documentation

getTokens :: LBNF -> [Token] Source #

Get grammar tokens for lexer specification generation.

processFunctions :: Functions -> [(LabelName, Function)] Source #

Sort functions (define pragma) and avoid reserved words.

processParserRules :: ParserRules -> [(Cat, Map RHS RuleLabel)] Source #

Sort parser rules and avoid reserved words.

processRules :: ASTRulesAP -> [(Type, [(Label, ([Type], (Integer, ARHS)))])] Source #

Process AST rules to generate Abstract Syntax and Printer.

sortTokens :: TokenDefs -> [(CatName, TokenDef)] Source #

Sort tokens (token pragma) according to their definition order in the .cf file.