Skip to content

Releases: lark-parser/lark

Minor fixes

18 Jul 13:23
Compare
Choose a tag to compare
  • 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

11 Jul 21:55
Compare
Choose a tag to compare
  • 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

09 Jul 10:06
Compare
Choose a tag to compare

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.

Bugfixes

05 Apr 13:19
Compare
Choose a tag to compare
  • Bugfix in Earley prioritization
  • Bugfix: A tree builder optimization clashed with explicit ambiguity
  • Bugfix in standalone parser
  • Ensure Tokens can be pickled correctly

Also better error messages (there's still much to do in that regard)

Faster tree construction (significant for LALR)

08 Mar 21:40
Compare
Choose a tag to compare
  • Fixed an inefficiency in the tree builder, significant for big inputs
  • More bugfixes and optimizations

Minor features and bugfixes

18 Feb 15:37
Compare
Choose a tag to compare
  • 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

24 Jan 12:47
Compare
Choose a tag to compare

Also contains several usability fixes

0.5.2 - Standalone tool

10 Jan 12:50
Compare
Choose a tag to compare

Added a tool to generate standalone parsers for LALR(1)

Lots of improvements and bugfixes

07 Jan 18:34
Compare
Choose a tag to compare
  • Significant improvements to Earley and the way it handles ambiguity and priority.

  • Users can now return Discard in transformer callback to drop a child branch from its parent.

  • Terminals now accept every regexps flag.

  • Cleaned up the LALR(1) parser implementation

  • Many bugfixes.

  • Started making releases :)