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

BNFC.Backend.Agda.AbstractSyntax

Synopsis

Documentation

cf2AST :: LBNF -> String -> Bool -> Maybe String -> [(Type, [(Label, [Type])])] -> [(LabelName, Function)] -> [(CatName, TokenDef)] -> [CatName] -> Bool -> String Source #

cf2doc :: LBNF -> String -> Bool -> Maybe String -> [(Type, [(Label, [Type])])] -> [(LabelName, Function)] -> [(CatName, TokenDef)] -> [CatName] -> Bool -> Doc () Source #

prTokens :: ModuleName -> [(CatName, TokenDef)] -> Doc () Source #

Print Agda types for user defined tokens.

prDatas :: Bool -> ModuleName -> ConstructorStyle -> [(Type, [(Label, [Type])])] -> Doc () Source #

Print Agda types for categories in AST rules.

prData :: Bool -> ModuleName -> ConstructorStyle -> (Type, [(Label, [Type])]) -> Doc () Source #

Pretty-print Agda data types and pragmas for AST.

prData' :: ModuleName -> ConstructorStyle -> Doc () -> Doc () -> [(Label, [Type])] -> Doc () Source #

Pretty-print Agda data types and pragmas.

prettyData :: ConstructorStyle -> Doc () -> [(Label, [Type])] -> Doc () Source #

Pretty-print AST definition in Agda syntax.

compilePragma :: ModuleName -> Doc () -> Doc () -> [Doc ()] -> Doc () Source #

prFunctions :: Bool -> [(LabelName, Function)] -> Doc () Source #

Generate Haskell/Agda code for the defined constructors.

prPrinterBindings :: [(Doc (), Doc ())] -> Doc () Source #

prPrinterBinding :: (Doc (), Doc ()) -> Doc () Source #

prPrinterPragmas :: [(Doc (), (Doc (), Doc ()))] -> Doc () Source #

prPrinterPragma :: (Doc (), (Doc (), Doc ())) -> Doc () Source #