h$      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                       !!"###$%%%%%%%&'()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))****************++++,,,,,,---./0123345555555555555566666666678999999999999999999999999999999999999999:::::::::::::::::::::::::::::::::::::::;;<<==>>>>??@@@@@@AABCCCCDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFGHIJJJJJJJJKKKKLMMMNOPPQQQR Safe-Inferred  #$9>? "! #$%*)'(&+-,.0/1A@?<;:9876543>2=BCDEDEBC1A@?<;:9876543>2=.0/+-,%*)'(&#$"!   Safe-Inferred  #$9>?\vwxyzvwxyz Safe-Inferred  #$9>?<{BNFCFunction that, given an input string, renders it either as a char (if it has legth 1) or a string. It should also excape characters correctly. The first returned value is the 'type' of the string: either C for char or S for string. (used in the C printer to choose the right rendering function) e.g. >>> renderCharOrString "a" (C,"a#") >>> renderCharOrString "abc" (S(,""abc"") >>> renderCharOrString "'" (C,"\\$'") >>> renderCharOrString ""\'" (S ,""\"\\\'"")|BNFCHelper function that escapes characters in strings >>> escapeChars "\" "\\" >>> escapeChars """ "\"" >>> escapeChars "'" "\'"{|{| Safe-Inferred  #$9>?~BNFC.Escape character for use inside single quotes.}~}~None  #$9>?0BNFCEncode a Haskell String to a list of Word8 values, in UTF8 format.None  #$9>?{None #$9>?9 9   Safe-Inferred  #$9>?*BNFCPut , around document if given condition is true.parensIf True "foo"(foo)parensIf False "bar"barBNFC$Separate vertically by a blank line."foo" $++$ "bar"foobar"foo" $++$ emptyfooBNFCList version of .vsep [ "foo", nest 4 "bar" ]foo barvsep []BNFCList version of ST.'vcat' [text "abc", nest 4 (text "def")]abc defBNFC3Pretty print separator with = (for assignments...). "a" <=> "123"a = 123BNFCPrint a list of 0-1 elements on the same line as some preamble and from 2 elements on the following lines, indented.6prettyList 2 ("foo" <+> equals) lbrack rbrack comma []foo = [];prettyList 2 ("foo" <+> equals) lbrack rbrack comma [ "a" ] foo = [a]prettyList 2 ("foo" <+> equals) lbrack rbrack comma [ "a", "b" ]foo = [ a , b ]Used in the Agda backend.BNFCCode block. A block of C/Java code, surrounded by {} and indented.codeblock 4 ["abc", "def"]{ abc def}Used in the C backend.BNFC Indentation.BNFC Preamble.BNFCLeft parenthesis.BNFCRight parenthesis.BNFC)Separator (usually not including spaces).BNFC List item.  Safe-Inferred  #$9>?  Safe-Inferred  #$9>?BNFCThe printer class does the job.BNFCThe top-level printing method.    Safe-Inferred  #$9>?!5BNFCCheck if a regular expression is nullable (accepts the empty string)BNFCSimplification of regular expression, mostly for the purpose of simplifying character alternatives (character classes).This may help lexer backends, since often lexer generators have a limited syntax for character classes.  Safe-Inferred  #$9>?/%BNFCDifferent case styleBNFCe.g.  lowercaseBNFCe.g.  UPPERCASEBNFCe.g.  snake_caseBNFCe.g.  CamelCaseBNFCe.g.  mixedCaseBNFCThe name of a module, e.g. Foo.Abs,  Foo.Print etc.BNFCGeneralization of UV.BNFCGeneralization of UW.BNFC* for the monoid of endofunctions 'a -> a'.BNFC* for the monoid of endofunctions 'a -> a'.BNFC'Invoke continuation for non-empty list.BNFC'Invoke continuation for non-empty list.BNFC Non-monadic forM.BNFC5Converts an uncurried function to a curried function.BNFC6Converts a curried function to a function on a triple.BNFCConcatenate strings by a space.BNFC!Concatenate strings by a newline.BNFC%Concatenate strings by an underscore.BNFCConcatenate strings by a dot.BNFCPad a string on the right by spaces to reach the desired length.BNFC>> lowerCase MyIdent myidentBNFC$Ident to upper case. >>> upperCase MyIdent MYIDENTBNFC7Ident to camel case. >>> camelCase "my_ident" MyIdentBNFC1To mixed case. >>> mixedCase "my_ident" myIdentBNFCTo snake case. >>> snakeCase MyIdent my_identBNFCa function that renders a c-like string with escaped characters. Note that although it's called cstring, this can be used with most (all) backend as they seem to mostly share escaping conventions. The c in the name is barely an homage for C being the oldest language in the lot.cstring "foobar""foobar"cstring "foobar\"" "foobar\""BNFCValue to replaceBNFCValue to replace it with((5555None #$5679>?IBNFC!The abstract syntax of a grammar.BNFC#Fun is the function name of a rule.BNFC0Categories are the non-terminals of the grammar.BNFCOrdinary non-terminal.BNFCToken types (like Ident, Integer, ..., user-defined).BNFCList non-terminals, e.g., [Ident], [Exp], [Exp1].BNFCE.g. Exp1, Exp2.BNFC4A "ranged string" (terminology from Agda code base).BNFCSource positions.BNFCName of the grammar file.BNFCLine in the grammar file.BNFCColumn in the grammar file.BNFCLiteral: builtin-token types Char, String, Ident, Integer, Double.BNFCPragmas.BNFCfor single line commentsBNFCfor multiple-line comments.BNFC for tokensBNFC%Expressions for function definitions.BNFC0(Possibly defined) label applied to expressions.BNFCFunction parameter.BNFCType of a rule label.BNFCType of a non-terminal.BNFCTypes of the rule labels, together with the position of the rule label.BNFC$Type of context-free grammars (GFG).BNFCCategories used by the parser.BNFC$Char, String, Ident, Integer, Double. Strings are quoted strings, and Idents are unquoted.BNFC'Symbols in the grammar, e.g. @*@, @->@.BNFCReserved words, e.g. if, while.BNFC+Categories that can be made left-recursive.BNFC$Types of rule labels, computed from .BNFC>A sentential form is a sequence of non-terminals or terminals.BNFCinternal rule (only for AST & printer)BNFCordinary rule (also for parser)BNFCPolymorphic rule type.BNFCThe function (semantic action) of a rule. In order to be able to generate data types this must be a constructor (or an identity function).BNFC3The value category, i.e., the defined non-terminal.BNFCThe sentential form, i.e., the list of (non)terminals in the right-hand-side of a rule.BNFCIs this an "internal" rule only for the AST and printing, not for parsing?BNFCA rule consists of a function name, a main category and a sequence of terminals and non-terminals. ( function_name . Main_Cat ::= sequence BNFCA context free grammar consists of a set of rules and some extended information (e.g. pragmas, literals, symbols, keywords).BNFC&User-defined regular expression tokensBNFC%The names of all user-defined tokens.BNFC7Prefix string with pretty-printed position information.BNFC"Render category symbols as stringsBNFCReads a string into a category. This should only need to handle the case of simple categories (with or without coercion) since list categories are parsed in the grammar already. To be on the safe side here, we still call the parser function that parses categries.BNFC-Token categories corresponding to base types.BNFC,Does the category correspond to a data type?BNFCCategories C1, C2,... (one digit at the end) are variants of C. This function returns true if two category are variants of the same abstract category. E.g.'sameCat (Cat "Abc") (CoercCat "Abc" 44)TrueBNFC4Removes precedence information. C1 => C, [C2] => [C]BNFCWhen given a list Cat, i.e. '[C]', it removes the square brackets, and adds the prefix List, i.e. ListC. (for Happy and Latex)BNFC'Get the underlying category identifier.BNFC=Unwraps the list constructor from the category name. E.g.  [C1] => C1.BNFC5Is this function just a coercion? (I.e. the identity)BNFC firstEntry returns the first of the  entrypoints&, or (if none), the first parsable Category appearing in the grammar.BNFCConstructors and categories.BNFC/Get all elements with more than one occurrence.BNFCReturns all parseable rules that construct the given Cat. Whitespace separators have been removed.BNFCLike rulesForCat but for normalized value categories. I.e., `rulesForCat (Cat Exp)` will return rules for category Exp but also Exp1, Exp2... in case of coercionBNFCGet all categories of a grammar matching the filter. (No Cat w/o production returned; no duplicates.)BNFCGet all categories of a grammar. (No Cat w/o production returned; no duplicates.)BNFC)Gets all normalized identified CategoriesBNFCGet all normalized CatBNFCGet all normalized CatBNFC>Is the category is used on an rhs? Includes internal rules.BNFCGroup all parsable categories with their rules. Deletes whitespace separators, as they will not become part of the parsing rules.BNFC?Group all categories with their rules including internal rules.BNFC4Get all literals of a grammar. (e.g. String, Double)BNFCGet the keywords of a grammar.BNFCCanonical, numbered list of symbols and reserved words. (These do not end up in the AST.)BNFCComments can be defined by the comment pragmaBNFC:Number of block comment forms defined in the grammar file.BNFC3Whether the grammar uses the predefined Ident type.BNFCCategories corresponding to tokens. These end up in the AST. (unlike tokens returned by )BNFCReturn the abstract syntax of the grammar. All categories are normalized, so a rule like: EAdd . Exp2 ::= Exp2 "+" Exp3 ; Will give the following signature: EAdd : Exp -> Exp -> ExpBNFCGet the type of a rule label.BNFCChecks if the rule is parsable.BNFC(Checks if the list has a non-empty rule.BNFCGets the separator for a list.BNFCHelper function that gets the list separator by precedence levelBNFCReturns the precedence of a category symbol. E.g. >>> precCat (CoercCat Abc 4) 4BNFC-Defines or uses the grammar token types like Ident? Excludes position tokens.BNFC Is there a position token declaration in the grammar?BNFC0Does the category have a position stored in AST?BNFC/Categories that are entry points to the parser.These are either the declared  entrypoints' (in the original order), or, if no  entrypoints were declared explicitly, all parsable categories (in the order of declaration in the grammar file).BNFC)Ignore position in equality and ordering.None #$9>?N BNFCUser-defined token types.BNFC Entry point.BNFCCreate context containing the types of all labels, computed from the rules.+Fail if a label is used at different types.BNFC%Translation of the list constructors.BNFCSignature (types of labels).BNFCFunction name.BNFCFunction arguments.BNFCFunction body.BNFC/Typed arguments, translated body, type of body.  None  #$9>?OBNFC$Create regex for multiline comments.*debugPrint $ mkRegMultilineComment "<" ">"'<'(char-'>')*'>',debugPrint $ mkRegMultilineComment "/*" "*/"9{"/*"}(char-'*')*'*'((char-["*/"])(char-'*')*'*'|'*')*'/'/debugPrint $ mkRegMultilineComment ""{"