Skip to content

Latest commit

 

History

History
451 lines (343 loc) · 19.3 KB

CHANGELOG.rst

File metadata and controls

451 lines (343 loc) · 19.3 KB

Change Log

TatSu uses Semantic Versioning for its releases, so parts of the version number may increase without any significant changes or backwards incompatibilities in the software.

The format of this Change Log is inspired by keeapachangelog.org.

X.Y.Z @ 2022

5.8.0 @ 2022-03-12

  • 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 str.format()
  • Add ```constant``` as a multiline version of `constant`.
  • Add ^`````constant````` and ^```constant``` as syntax for an alert expression. Alerts produce no tokens bug get registed in parseinfo 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

5.7.3 @ 2021-12-20

  • 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

5.7.2 @ 2021-12-18

  • 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.

5.7.1 @ 2021-12-03

  • Simplified this CHANGELOG by not linking to issues or and pull requests that can be queried on Github
  • Now config: ParserConfig is used in __init__() and parse() methods of contexts.ParseContext, grammars.Grammar, and elsewhere to avoid long parameter lists. ParserConfig also provides clean and clear ways of overridinga group of settings
  • 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

5.6.1 @ 2021-03-22

  • Fix bug in which rule fields were forced on empty AST (@Victorious3)

5.6.0 @ 2021-03-21

  • 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

5.5.0 @ 2020-01-26

  • #156 Clarify limitations of left-recursion in PEG (@apalala)
  • #159 Clean up examples and tutorial, upgrade them to Python 3 (@okomarov)

5.0.0 @ 2020-01-26

  • 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.
  • 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
  • #56 Include missing tatsu/g2e/antlr.ebnf in distribution
  • #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)
  • The AST for sequences is now a tuple (it used to be a list-derived closure)

4.4.0 @ 2019-04-22

  • 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)

4.3.0 @ 2018-11-17

  • #66 Fix multiline ( (?x) ) patterns not properly supported in grammar (@pdw-mb)
  • #70 Important upgrade to ModelBuilder and grammar specification of classes for generated nodes. See pull request #78 for details (@Victorious3)

4.2.6 @ 2018-05-06

4.2.5 @ 2017-11-26

  • #42 Rename vim files from grako.vim to tatsu.vim (@fcoelho)
  • #51 Fix inconsistent code generation for whitespace (@fpom)
  • #54 Only care about case of first letter of rule name for determining advance over whitespace (@acw1251)

4.2.4 @ 2017-07-10

Fixed

  • #40 Make the start rule default to the first rule defined in the grammar (@hariedo)
  • #43 Import 're' from tatsu.util to support optional 'regex'-only features (@azazel75)
  • #47 Fix incorrect sample code in documentation (@apalala)

4.2.3 @ 2017-07-10

Fixed

  • #37 Regression: The #include pragma works by using the EBNFBuffer from grammars.py. Somehow the default EBNFBootstrapBuffer from bootstrap.py has been used instead (@gegenschall).
  • #38 Documentation: Use of json.dumps() requires ast.asjson() (@davidchen).

4.2.2 @ 2017-07-01

Fixed

  • #27 Undo the fixes to dropped input on left recursion because they broke previous expected behavior.
  • #33 Fixes to the calc example and mini tutorial (@heronils)
  • #34 More left-recursion test cases (@manueljacob).

4.2.1 @ 2017-06-18

Fixed

4.2.0 @ 2017-05-21

Added

  • Parse speeds on large files reduced by 5-20% by optimizing parse contexts and closures, and unifying the AST and CST stacks.
  • Added the "skip to" expression ( ->), useful for writing recovery rules. The parser will advance over input, one character at time, until the expression matches. Whitespace and comments will be skipped at each step.
  • Added the any expression ( /./) for matching the next character in the input.
  • The ANTLR grammar for Python3 to the g2e example, and udate g2e to handle more ANTLR syntax.
  • Check typing with Mypy.

Changed

  • Removed the very old _regex_ example.
  • Make parse traces more compact. Add a sample to the docs.
  • Explain Grako compatibility in docs.

4.1.1 @ 2017-05-21

Fixed

  • tatus.objectmodel.Node not setting attributes from AST.

4.1.0 @ 2017-05-21

Added

  • New support for left recursion with correct associativity. All test cases pass.
  • Left recursion is enabled by default. Use the @@left_recursion :: False directive to diasable it.
  • Renamed the decorator for generated rule methods to @tatsumasu.
  • Refactored the tatsu.contexts.ParseContext for clarity.
  • The @@ignorecase directive and the ignorecase= parameter no longer appy to regular expressions (patterns) in grammars. Use (?i) in the pattern to ignore the case in a particular pattern.
  • Now tatsu.g2e is a library and executable module for translating ANTLR grammars to TatSu.
  • Modernized the calc example and made it part of the documentation as Mini Tutorial.
  • Simplified the generated object models using the semantics of class attributes in Python

4.0.0 @ 2017-05-06

  • First release.