Skip to content

Big improvements -- BREAKING CHANGES

Compare
Choose a tag to compare
@erezsh erezsh released this 09 Jul 10:06
· 1642 commits to master since this release

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.