BNFC-2.9.6.2: A compiler front-end generator.
Safe HaskellSafe-Inferred
LanguageHaskell2010

BNFC.Backend.OCaml.OCamlUtil

Synopsis

Documentation

class OCamlParserName a where Source #

Name of the parser generator.

Methods

ocamlParserName :: a -> String Source #

Instances

Instances details
OCamlParserName OCamlParser Source # 
Instance details

Defined in BNFC.Backend.OCaml.OCamlUtil

Methods

ocamlParserName :: OCamlParser -> String Source #

OCamlParserName SharedOptions Source # 
Instance details

Defined in BNFC.Backend.OCaml.OCamlUtil

fixType :: Cat -> String Source #

fixTypeQual Source #

Arguments

:: String

Module name (or empty string for no qualification).

-> Cat 
-> String 

fixTypeUpper :: Cat -> String Source #

reservedOCaml :: [String] Source #

sanitizeOcaml :: String -> String Source #

Avoid clashes with keywords.

reservedOCamlLex :: [String] Source #

Keywords of ocamllex.

ocamlTokenName :: String -> String Source #

Heuristics to produce name for ocamllex token definition that does not clash with the ocamllex keywords.

mkTuple :: [String] -> String Source #

insertBar :: [String] -> [String] Source #

mutualDefs :: [String] -> [String] Source #

mkEsc :: String -> String Source #

Escape " and @@. TODO: escape unprintable characters!?