github.com/rwxrob/rat (go): Package rat implements a PEG packrat parser that takes advantage of Go's unique ability to switch on type to create an interpreted meta-language consisting entirely of Go types. These types serve as tokens that any lexer would create when lexing a higher level meta language such as PEG, PEGN, or regular expressions. Passing these types to rat.Pack compiles (memoizes) them into a grammar of parsing functions not unlike compilation of regular expressions. The string representations of these structs consists of entirely of valid, compilable Go code suitable for parser code generation for parsers of any type, in any language. Simply printing a Grammar instance to a file is suitable to generate such a parser.  Prefer Pack over Make*  Although the individual Make* methods for each of the supported types have been exported publicly allowing developers to call them directly from within their own Rule implementations, most should use Pack instead. Consider it the equivalent of compiling a regular expression.
Keywords: abnf|ebnf|go|golang|grammar|language|packrat|parser|peg|pegn