Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- haskellParser :: LBNF -> State HaskellBackendState Result
- cf2parser :: LBNF -> [(Cat, Map RHS RuleLabel)] -> String -> Bool -> Maybe String -> TokenText -> [Token] -> Bool -> String
- cf2doc :: LBNF -> [(Cat, Map RHS RuleLabel)] -> String -> Bool -> Maybe String -> TokenText -> [Token] -> Bool -> Doc ()
- header :: ModuleName -> ModuleName -> ModuleName -> TokenText -> [Cat] -> Doc ()
- declarations :: Bool -> [Cat] -> Doc ()
- tokensList :: LBNF -> [Token] -> Bool -> Doc ()
- specialRules :: LBNF -> ModuleName -> TokenText -> Bool -> [Token] -> Doc ()
- specialRule :: LBNF -> ModuleName -> TokenText -> Bool -> Token -> Doc ()
- happyRules :: ModuleName -> Bool -> [(Cat, Map RHS RuleLabel)] -> Doc ()
- printRule :: ModuleName -> Bool -> Cat -> Map RHS RuleLabel -> Doc ()
- constructRule :: Bool -> ModuleName -> (RHS, RuleLabel) -> Doc ()
- footer :: ModuleName -> [String] -> TokenText -> Bool -> [Cat] -> Doc ()
Documentation
cf2parser :: LBNF -> [(Cat, Map RHS RuleLabel)] -> String -> Bool -> Maybe String -> TokenText -> [Token] -> Bool -> String Source #
cf2doc :: LBNF -> [(Cat, Map RHS RuleLabel)] -> String -> Bool -> Maybe String -> TokenText -> [Token] -> Bool -> Doc () Source #
header :: ModuleName -> ModuleName -> ModuleName -> TokenText -> [Cat] -> 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.
specialRules :: LBNF -> ModuleName -> TokenText -> Bool -> [Token] -> Doc () Source #
specialRule :: LBNF -> ModuleName -> TokenText -> Bool -> Token -> Doc () Source #
happyRules :: ModuleName -> Bool -> [(Cat, Map RHS RuleLabel)] -> Doc () Source #
constructRule :: Bool -> ModuleName -> (RHS, RuleLabel) -> Doc () Source #