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

BNFC.Backend.Haskell.Parser

Synopsis

Documentation

cf2doc :: LBNF -> [(Cat, Map RHS RuleLabel)] -> String -> Bool -> Maybe String -> TokenText -> [Token] -> Bool -> Doc () Source #

declarations :: Bool -> [Cat] -> Doc () Source #

The declarations of a happy file. >>> declarations False [Cat A, Cat B, ListCat (Cat B)] %name pA A %name pB B %name pListB ListB -- no lexer declaration %monad { Err } { (>>=) } { return } %tokentype {Token}

>>> declarations True [Cat "A", Cat "B", ListCat (Cat "B")]
%name pA_internal A
%name pB_internal B
%name pListB_internal ListB
-- no lexer declaration
%monad { Err } { (>>=) } { return }
%tokentype {Token}

tokensList :: LBNF -> [Token] -> Bool -> Doc () Source #

Generate the list of tokens and their identifiers.

footer :: ModuleName -> [String] -> TokenText -> Bool -> [Cat] -> Doc () Source #