Releases: lark-parser/lark
Bugfixes & MkDocs
- Several bugfixes
- Added MkDocs documentation (will replace github's wiki as official docs)
Relative imports, and bugfixes
-
Added support for relative imports:
%import .local_grammar.TERM
will look for./local_grammar.lark
-
Added syntax for importing several terminals on one line:
%import common (NUMBER LETTER FLOAT)
-
Several bug-fixes
Minor fixes
-
Fixed a bug in PropagatePositions, that could occur when the user supplied Lark with a reducing transformer
-
Added support for
v_args(tree=True)
, which supplies the decorated transformer method with the entire tree (instead of just the list of children)
Corrections and improvments, following the 0.6.0 release
-
Lark grammars are now utf8 by default
-
Added option to provide a custom lexer (with example)
-
Fixed issue where Lark would throw RecursionError for huge grammars
-
Improved error messages
Big improvements -- BREAKING CHANGES
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.
Bugfixes
Faster tree construction (significant for LALR)
- Fixed an inefficiency in the tree builder, significant for big inputs
- More bugfixes and optimizations
Minor features and bugfixes
-
Fixed propagate positions feature.
-
Added support for ranged-repeat (see commit for details)
-
Reconstruct now working again (experimental module)
-
A few bugfixes and refactors
Lark now has a CYK parser
Also contains several usability fixes
0.5.2 - Standalone tool
Added a tool to generate standalone parsers for LALR(1)