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

BNFC.GetCF

Description

Check LBNF input file and turn it into the CF internal representation.

Synopsis

Documentation

parseCF :: SharedOptions -> Target -> String -> IO CF Source #

Entrypoint.

transItem :: Item -> [Either Cat String] Source #

Translate a rule item (terminal or non terminal) It also sanitizes the terminals a bit by skipping empty terminals or splitting multiwords terminals. This means that the following rule

 Foo. S ::= "foo bar" ""

is equivalent to

 Foo. S ::= "foo" "bar"