BNFC-2.9.1: A compiler front-end generator.
Safe HaskellNone
LanguageHaskell2010

BNFC.Backend.Java.CFtoAntlr4Lexer

Synopsis

Documentation

cf2AntlrLex :: String -> CF -> (Doc, KeywordEnv) Source #

Creates a lexer grammar. Since antlr token identifiers must start with an uppercase symbol, I prepend Surrogate_id_SYMB_ to the identifier. This introduces risks of clashes if somebody uses the same identifier for user defined tokens. This is not handled. returns the environment because the parser uses it.