github lark-parser/lark 0.6.0
Big improvements -- BREAKING CHANGES

latest releases: 1.2.2, 1.2.1, 1.1.9...
6 years ago

Breaking changes:

  • Changes to Tree: Added meta attribute, in addition to data and children. Line & column attributes, when using propagate_positions, moved to meta (i.e. tree.meta.line)

  • Revised transformers and visitors. Added v_args. inline_args and InlineTransformer are now deprecated. Instead, use v_args(inline=True) as a decorator on transformer methods and class definition.

  • Changed default Earley lexing behavior - now returns the maximum match only. The original behavior, that attempts to match all appearances of a terminal, has been moved to the "dynamic_complete" lexer. (commit 6ea4588)

  • Restructured exceptions - UnexpectedInput is now superclass of UnexpectedToken and UnexpectedCharacters, all of which support the get_context() and match_examples() methods. (commit 5c6df8e)

  • Columns now start at 1 (instead of 0)

  • Default LALR lexer in now contextual

  • Removed "scanless parsing" mode (wasn't useful)

Other changes:

  • Added %declare directive for plugin support.

  • Default extension for Lark grammars is now .lark (with syntax highlighting for popular editors)

  • Improved error reporting

  • Lots of bugfixes, better performance, and cleaner code.

Don't miss a new lark release

NewReleases is sending notifications on new releases.