Breaking changes:
-
Changes to Tree: Added
meta
attribute, in addition todata
andchildren
. Line & column attributes, when usingpropagate_positions
, moved to meta (i.e.tree.meta.line
) -
Revised transformers and visitors. Added
v_args
.inline_args
andInlineTransformer
are now deprecated. Instead, usev_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.