HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

ModuleBNFC-2.9.6.3Haskell2010

BNFC.Backend.Java.CFtoAntlr4Lexer

Synopsis
  • PackageBNFC-2.9.6.3
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceCFtoAntlr4Lexer.hs
valuecf2AntlrLex :: String -> CF -> (Doc, KeywordEnv)

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.