Releases: lark-parser/lark
Minor release: Bugfix for PyInstaller (2)
The last two releases were wrong. I apologize.
Hopefully that's the last of it, and we'll be back on track with periodic and accurate releases.
Minor release: Reverted EOF commit due to unexpected problems.
0.8.8 Version bump
Minor release: Bugfix for PyInstaller
0.8.7 Version bump
Cache, Templates, online IDE, and more
The main features for this release:
-
Grammar caching: It's now possible to cache the results of the LALR grammar analysis, for x2 to x3 faster loading. Use
Lark(..., cache=True)
or specify a file name. See here: https://lark-parser.readthedocs.io/en/latest/classes/ -
Grammar templates: Added support for grammar "functions" that expand in preprocessing. No docs yet, but see here for examples:
https://github.com/lark-parser/lark/blob/master/tests/test_parser.py#L845 -
Lark online IDE: Technically not a feature, but it's possible to run Lark in the browser. Now we also have a simple IDE on github pages: https://lark-parser.github.io/lark/ide/app.html
-
Other changes:
-
Improved performance for large grammars
-
More debug prints when in debug mode
-
Better support for PyInstaller
-
Lots of bugfixes: mypy stubs, v_args, docs, and more.
-
Updated js2py version (for the optional nearley support)
0.8.5 Version bump due to bad release (Issue #545)
Minor Release. `g_regex_flags` option and minor bugfixes
- Added the
g_regex_flags
option, to allow applying flags to all terminals. - Fixed
end_pos
for Earley, when usingpropagate_positions
- Fixes for mypy
- Better docs
MyPy support, Lark serialization, and standalone license is now MPL2
Changes in this version are:
-
Added type stubs for all public APIs, in order to support type checking and completion using MyPy (or others)
-
Added two new methods to the
Lark
class:Lark.save()
andLark.load()
. Both methods pickle and unpickle (respectively) the class instance into/from file objects. These can be used to allow faster loading times. (future versions will implement an automatic caching feature) -
The standalone parser is now MPL2, instead of GPL. The Mozilla Public License is much less restrictive, so this shouldn't affect anyone who's already using the standalone parser. But it should make it easier for other users to adopt it.
Bugfix + Reverted breaking changes. Now backwards compatible to 0.7
-
Reverted
maybe_placeholders
to False by default. It didn't obey the semantic versioning standard. -
Bugfix in standalone parser
Lark v0.8 - Better LALR and other improvements
- Better LALR
The biggest change to this release is a new LALR engine, that is capable of dealing with a few edge cases that the previous parser couldn't.
This parser is supposed to be fully backwards-compatible with the previous one, but that is hard to verify!
Thank you, @Raekye, for this great contribution to Lark!
For more details, see issue #418
- Transformers now visit tokens, as well as rules (an alternative to lexer_callbacks)
Transformer now visit tokens, in addition to rules.
Simply define a method with the correct name (uppercase, of course), and the transformer will visit your tokens before the rules that contain them.
It's possible to disable this, for backwards compatibility, or for the slight performance gain.
- Other Changes
-
Added
visit_topdown
methods to Visitor classes -
Lark now allows line comments in its rule definitions
-
Better error messages
-
Improvements to documentation
-
Bugfixes
-
maybe_placeholders
is now the default (backwards-incompatible)** (REVERTED in 0.8.1)
Better errors, and bugfixes
-
Improved error messages for EOF in Earley, recursive terminals, UnexpectedToken
-
Bugfix for declared terminals, UnexpectedToken, unicode support in Python2,