Releases: lark-parser/lark
Releases · lark-parser/lark
1.3.1 - Bugfix + source build now contains complete project data
What's Changed
- Bugfix: Restore support for custom input, alongside text and TextSlice by @erezsh in #1562
- Keep sdist in sync with git (include all files in source build, including docs, tests and examples) by @chanicpanic in #1561
Full Changelog: 1.3.0...1.3.1
1.3.0 - Introduces text-slices, Earley fix, and various small improvements
New features
- Lark can now parse in sections of strings, using
TextSlice, as a faster alternative to creating a "copy-slice" withs[i:j]. Learn more - Added support to
matchon Tree instances - When serializing a Lark instance, added the option to include the grammar object (before compilation).
- Added convenience method
Tree.find_token()
Bugfixes
- Bugfix of an edge case in Earley related to representation of ambiguity.
- Bugfixes in the standalone parser related to imports
- Bugfix in indenter - now dedents always contain line information
- Various small bugfixes (see PR list below)
Full list of PRs
- Docs: Rephrase v_args() documentation to underline it only applies to Transformer classes by @skepppy in #1458
- Tiny refactor for PR #1451 by @erezsh in #1459
- Earley: share nodes created by the scanner with the completer by @chanicpanic in #1451
- Better error in Lark.parse when using on_error when parser!=lalr (issue #1311) by @erezsh in #1460
- Fix
Symbol.__eq__to return false when comparing with None by @weaversam8 in #1481 - Mention internal/external transformers in the documentation by @odanoburu in #1486
- Add Tree.find_token() method by @makukha in #1467
- Type
Terminal.__init__by @Liam-DeVoe in #1503 - Add guidance on handling comments in languages with significant indentation by @nchammas in #1502
- [docs] Small fix for PR 1507 by @erezsh in #1508
- Add note on binding power of numeric quantifiers by @414owen in #1507
- Wrap functools.partial in staticmethod() to add compatibility with Python 3.14 by @hrnciar in #1483
- Fix generic type of Transformer_InPlaceRecursive by @lbhm in #1518
- Added TextSlice; Lark can now parse/lex a text-slice by @erezsh in #1452
- Support match on tree by @colmmurphyxyz in #1521
- Docs: Updated link of DSL article to a new version by @erezsh in #1529
- better error messages for shift/reduct conflicts by @skogsbaer in #1531
- Serialize Lark.grammar (fixes issue #1472) by @NasalDaemon in #1506
- Fixes for PR #1506, which adds the option to cache the grammar definition by @erezsh in #1540
- Bugfix in indenter - now always creating dedents with line information by @erezsh in #1547
- Bugfix: issue when unpickling in the standalone parser, due to lingering Token instances by @erezsh in #1553
- Include missing import in standalone parser by @pdeibert in #1541
- Version bump (1.3.0) by @erezsh in #1554
New Contributors
- @skepppy made their first contribution in #1458
- @weaversam8 made their first contribution in #1481
- @odanoburu made their first contribution in #1486
- @makukha made their first contribution in #1467
- @Liam-DeVoe made their first contribution in #1503
- @414owen made their first contribution in #1507
- @hrnciar made their first contribution in #1483
- @lbhm made their first contribution in #1518
- @colmmurphyxyz made their first contribution in #1521
- @skogsbaer made their first contribution in #1531
- @NasalDaemon made their first contribution in #1506
- @pdeibert made their first contribution in #1541
Full Changelog: 1.2.2...1.3.0
1.2.2 - Bugfix for 1.2.1 (Earley issues with ambiguity)
What's Changed
Full Changelog: 1.2.1...1.2.2
1.2.1 - Now only Python 3.8+; several bugfixes in Earley
Main Changes
- Dropped support for Python versions lower than 3.8
- Several bugfixes in the Earley algorithm, related to suppressed ambiguities
- Improved performance in
InteractiveParser.accepts()
What's Changed
- Give "Shaping the tree" clear sub-headings by @nchammas in #1381
- Fix for when providing a transformer with a Token by @erezsh in #1395
- Pin types-regex to a working version by @erezsh in #1409
- Add Outlines to list of projects using Lark by @rlouf in #1408
- Code coverage: Update Python version by @erezsh in #1420
- Attempt to solve performance problems in accepts() by @erezsh in #1419
- Docs: Added Indenter by @erezsh in #1423
- Clean up test_parser.py, use xFail instead of skip where appropriate by @MegaIng in #1428
- Update config and drop python < 3.8 by @MegaIng in #1430
- BUGFIX Earley: Now yielding a previously repressed ambiguity by @erezsh in #1427
- Fix SymbolNode.end for completed tokens by @chanicpanic in #1432
- Disable ForestToParseTree cache when ambiguity='resolve' by @chanicpanic in #1433
- Bugfix for issue #1434 by @erezsh in #1435
New Contributors
Full Changelog: 1.1.9...1.2.1
1.1.9 - Patch for a breaking change in 3.11.7 re module
What's Changed
- Use MAXWIDTH instead of MAXREPEAT when available by @MegaIng in #1377
- Fix nested list markdown syntax in how_to_use.md by @ei-grad in #1357
- Run tests against Python 3.12 by @michael-k in #1365
New Contributors
Full Changelog: 1.1.8...1.1.9
1.1.8 - Output-stable Earley; Interactive standalone; various improvements
What's Changed
- Populate the
Token.end_*fields for ignored tokens by @jtbraun in #1309 - Include .lark files in package data by @ptrcnull in #1308
- Add an error message when using Lark.save() when parser!='lalr' by @erezsh in #1328
- Add and improve docstrings by @erezsh in #1326
- Small update to PR #1338 by @erezsh in #1339
- Fix 1345 attempt two by @MegaIng in #1347
- Earley now uses OrderedSet for better output stability by @erezsh in #1327
- ContextualLexer now uses self.basic_lexer for easy extensibility (iss… by @erezsh in #1342
- Improved typing around LALR and ParserState by @erezsh in #1343
- Typing fixes. Mypy now produces 0 type errors by @erezsh in #1354
- Standalone: Added support for interactive parser. by @erezsh in #1356
New Contributors
Full Changelog: 1.1.7...1.1.8
1.1.7 - Bugfix for release 1.1.6 in propagate_positions
Bugfix in propagate_positions (issue #1304)
1.1.6 - Strict mode, Python-style comments, Bugfixes
What's Changed - main points
- Added strict-mode, enabled by
strict=True, implemented using interegular by @MegaIng - Cache: Replace md5 hashing with sha256. by @wilrodriguez in #1251
- Support for Python-style comments in Lark grammar by @vincent-hugot in #1230
- Updates to python.lark
- Bugfixes and cleanup
What's Changed - PRs
- Improve logic and performance by @jmishra01 in #1228
- Updated Python grammar list literal to support
[*x]by @evtn in #1232 - Fix typos by @kianmeng in #1242
- Examples: Update version for PyQt5 by @erezsh in #1243
- Support for Python-style comments in Lark grammar by @vincent-hugot in #1230
- [M:grammar.md] doc: added Python-style comments. by @vincent-hugot in #1245
- Fix 1154 by @MegaIng in #1252
- Rephrased docs for interegular PR (#1258) by @erezsh in #1260
- Added interegular support by @MegaIng in #1258
- Freeze interegular version to 0.2.4 (until fixed) by @erezsh in #1262
- Codecov github action fixed by @erezsh in #1263
- Added strict-mode, enabled using the strict=True flag by @erezsh in #1261
- Unfreeze interegular by @MegaIng in #1264
- Replace md5 hashing with sha256. by @wilrodriguez in #1251
- Bump pre-commit hooks and add
codespellhook by @kianmeng in #1244 - Docs: Added section about strict-mode to how-to-use by @erezsh in #1265
- Limit amount of time/effort interegular will use when creating an example by @MegaIng in #1266
- Added progress bar recipe by @MegaIng in #1267
- Add exclude in coverage for
if TYPE_CHECKING:branches by @MegaIng in #1278 - Cleanup may2023 by @erezsh in #1276
- Update lexer_state to lexer_thread to avoid deprecation warnings by @geographika in #1285
- Moved the metadata into
PEP 621-compliantpyproject.toml. by @KOLANICH in #1157 - propagate_positions: Bugfix + Better documentation by @erezsh in #1294
New Contributors
- @kianmeng made their first contribution in #1242
- @vincent-hugot made their first contribution in #1230
- @wilrodriguez made their first contribution in #1251
- @geographika made their first contribution in #1285
- @KOLANICH made their first contribution in #1157
Full Changelog: 1.1.5...1.1.6
1.1.5 - Fix AmbiguousExpander; Fix line information in InteractiveParser
What's Changed
- setup.cfg: Replace deprecated license_file with license_files by @mgorny in #1209
- Fix Github shenanigans by @erezsh in #1220
- Fix AmbiguousExpander (Issue #1214) by @chanicpanic in #1216
- Fix EOF line information in InteractiveParser.resume_parse() by @erezsh in #1224
- Use generator instead of list expand or add method by @jmishra01 in #1225
New Contributors
- @mgorny made their first contribution in #1209
- @jmishra01 made their first contribution in #1225
Full Changelog: 1.1.4...1.1.5
1.1.4 - Added support for using Token in match statements, and other small fixes
What's Changed
- ci: Python 3.11 final by @henryiii in #1204
- Add
__all__to__init__by @aspizu in #1200 - PropagatePositions: Allow any object to carry the metadata, by returning it in
__lark_meta__()by @erezsh in #1203 - fix: Token now pattern matches correctly by @marcinplatek in #1181
- Updates to merge PR #1151 by @erezsh in #1205
- style: pre-commit basic config by @henryiii in #1151
- PR for v1.1.4 by @erezsh in #1208
New Contributors
- @aspizu made their first contribution in #1200
- @marcinplatek made their first contribution in #1181
Full Changelog: 1.1.3...1.1.4