Skip to content

Releases: neogeny/TatSu

Bug fixes, improvements, optimizations

10 Jul 21:02
93926d1
Compare
Choose a tag to compare
  • Fix pickling of AST. The change also affects parsing within multiprocessing (@fizbin)
  • Fall back to repr() for types not handled by json(@dnicolodi)
  • Ensure there is exactly one method cache per Walker class
  • Bug fixes, upgrades, and improvements by (@dnicolodi)

Resolve feature backlog

12 Mar 17:16
39c135a
Compare
Choose a tag to compare
  • Make sure that the generated parser is the same as the bootstrap
    parser.
  • Honor grouping in pattern expressions with the semantics of
    re.findall(pattern, text)[0]. Now groups that should not be
    returned when parsing should use the (?:) syntax. Now patterns
    align with Python re independently of the
    @@ignorecase setting for the grammar.
  • Allow {} interpolation in `constant[ expressions with the
    semantics of ]{.title-ref}[str.format()]{.title-ref}`
  • Add [constant]{.title-ref} as a multiline version of
    `constant`.
  • Add ^[constant]{.title-ref} and ^`constant[ as syntax
    for an `alert]{.title-ref} expression. Alerts produce no tokens bug
    get registed in [parseinfo]{.title-ref} records.
  • BUG: make the -> skip expression always stop at EOF.
  • Make the -> skip expression go over comments, and not log while
    skipping.
  • Patch problem with pickling FailedCut while running parsing in
    parallel.
  • Optimize model pickling and parallel processing to reduce runtime
    and memory use with parproc
  • Add a representation of ~ cut expressions to parse traces

bugfix release

20 Dec 17:24
aa23750
Compare
Choose a tag to compare
  • Fix that settings passed to Context.parse() were ignored. Add Context.active_config for the configuration active during a parse
  • Define Node._parent as part of the @dataclass

fix regressions

18 Dec 14:07
364e56c
Compare
Choose a tag to compare
  • Make AST and Node hashable. Necessary for caching Node.children()
  • Implement Node.__eq__() in terms of identity or Node.ast.__eq__()__
  • Fix regression in which rule order is lost in generated parsers (@dtrckd)
  • Restore Node.ast (was removed because of problems with __eq__())
  • Get Node.children() from Node.ast when there are no attributes defined for the Node. This restores the desired behavior while developing a parse model.

Reloaded

06 Dec 21:05
Compare
Choose a tag to compare
  • Now config: ParserConfig is used in __init__() and parse() methods of contexts.ParseContext, grammars.Grammar, and elsewhere to avoid the very long parameter lists that abounded. ParseContext also provides clean and clear ways of overridinga group of settings with another
  • All names defined in the successful choice in a rule are now defined in the resulting AST_. Names within optionals that did not match will have their values set to None, and closures that did not match will be set to ``[]`
  • Moved build configuration from setup.py in favor of setup.cfg and pyproject.toml (@KOLANICH_)
  • Node.children() is now computed only when required, and cached
  • Classes in generated object models are now @dataclass
  • Optimize and get rid of bugs and annoyances while keeping backwards compatibility
  • Drop support for Python < 3.10

Bug fix release

22 Mar 21:19
95e4c88
Compare
Choose a tag to compare
  • Fix bug in which rule fields were forced on empty AST (@Victorious3)

Long awaited update

21 Mar 23:24
c00f7e6
Compare
Choose a tag to compare
  • Several important refactorings in contexts.ParseContext
  • Make ignorecase settings apply to defined @@keywords
  • Move checking of keywords used as names into ParseContext
  • Output of generated parsers again matches that of model parsers
  • Improve "expecting one of:" messages so elements are in declaration order
  • Stop code generation if there are closures over possibly empty expressions
  • Preserve name declaration order in returned AST
  • Update the bootstrap parser (tatsu/bootstrap.py) to the generated parser
  • Now generated parser's main() only outputs the JSON for the parse AST
  • Minor version bumped in case the many fixes break backwards-compatibility
  • Minor documentation issues fixed
  • All tests run with Python 3.8, 3.9, 3.10

Maintenance release

16 Mar 14:32
Compare
Choose a tag to compare

Maintenance + Python 3.8

26 Jan 19:02
Compare
Choose a tag to compare
  • TatSu is now only tested against Python 3.8. Earlier versions of Python are now deprecated, and Python 2.X versions are no longer supported (@apalala).
  • Apply nameguard only if token[0].isalpha(). This solves a regression afecting previous TatSu and Grako grammars (@apalala).
  • Remove pygraphviz from develoment requirements, as it doesn't build under Py38 (@apalala)
  • #56 Include missing tatsu/g2e/antlr.ebnf in distribution (@apalala)
  • #138 Reimplement the calculation of FIRST, FOLLOW, and LOOKAHEAD sets using latest theories. For now, this should improve parser error reporting, but should eventually enable the simplification of parsing of leftrec grammars (@apalala).
  • #153 Import ABCs from collections.abc (@tirkarthi)
  • Remove support for Cythonand pypy3 (@apalala).

Implementation of left recursion complete

23 Apr 17:19
Compare
Choose a tag to compare
  • 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, @rayjolt)