TatSu v4.4.0 PEG parser generator released

Juancarlo Añez apalala at gmail.com
Tue Apr 23 13:57:55 EDT 2019

竜 TatSu v4.4.0 has been released. Thanks to Vic Nightfall, support for
left-recursion in PEG grammars is now complete.

    def WARNING():
        return 'v4.4.0 is the last version of 竜TatSu supporting Python 2.7'

竜 TatSu (the successor to Grako) is a tool that takes grammars in a
variation of EBNF as input, and outputs memoizing (Packrat) PEG parsers
in Python.

竜 TatSu can compile a grammar stored in a string into a
tatsu.grammars.Grammar object that can be used to parse any given input,
much like the re module does with regular expressions, or it can
generate a Python module that implements the parser.

竜 TatSu supports left-recursive rules in PEG grammars using the
algorithm by _Laurent_ and _Mens_. The generated AST has the expected
left associativity.

*   https://pypi.org/project/TatSu/4.4.0/
*   https://tatsu.readthedocs.io/
*   https://github.com/neogeny/TatSu

*   The default regexp for whitespace was changed to `(?s)s+
*   Allow empty patterns (//) like Python does
*   #65 Allow initial, consecutive, and trailing @namechars
*   #73 Allow @@whitespace :: None and @@whitespace :: False
*   #75 Complete implemenation of left recursion(@Victorious3)
*   #77 Allow @keyword throughout the grammar
*   #89 Make all attributes defined in the rule present in the resulting
AST or Node even if the associated expression was not parsed
*   #93 Fix trace colorization on Windows
*   #96 Documented each @@directive
*   Switched the documentation to the "Alabaster" theme
*   Various code and documentation fixes (@davesque, @nicholasbishop,

Juancarlo *Añez*

More information about the Python-announce-list mailing list