- Fully cross-platform.
- Multiple viewx extension instances in parallel supported.
- New features and bugfixes.
Arpeggio changelog
All _notable_ changes to this project will be documented in this file.
The format is based on _[Keep a Changelog][keepachangelog]_, and this project
adheres to _[Semantic Versioning][semver]_.
Everything that is documented in the [official docs][ArpeggioDocs] is considered
the part of the public API.
Backward incompatible changes are marked with **(BIC)**. These changes are the
reason for the major version increase so when upgrading between major versions
please take a look at related PRs and issues and see if the change affects you.
[Unreleased]
- Added support for Python 3.13 and relax restriction on upper Python version.
- Fix parsing of regex rules in peg and cleanpeg syntaxes ([125]). Thanks
smurfix for reporting ([123]).
- **(BIC)** Removed support for Python 3.6. The minimal supported version is 3.7.
- Added sypport for Python 3.12.
- Migrated to pyproject.toml for project configuration.
- Use [ruff] instead of flake8 for linting. ruff can also be used for code
formating.
- Use [flit] for package building and publishing.
- fix!: non-consuming alternatives in ordered choices **(BIC)** [96]. Thanks
vprat, mettta and stanislaw for reporting the issue.
Now, ordered choice alternatives may succeed even if no input is consumed.
This means that any infallible expression e.g. `Optional` in an ordered choice
will always succeed and no further choices will ever be tried.
Issue [101] when implemented will detect and report these invalid grammars.
For the rationale for this change see [this discussion](https://github.com/textX/Arpeggio/commit/db503c961bb7b4da2eddaf1615f66a193a6f9737#r107103641).
- fix!: do not use soft failure in zero/one-or-more **(BIC)**. This is related
to [96].
**Warning:** Previously, we used a kind of "soft failures" of parsing
expression which were based on treating `None` returned from child expressions
in repetitions (`ZeroOrMore`, `OneOrMore`) to signalize soft failure and avoid
infinite loops if the inner expression succeeds without consuming the input.
While convenient in some cases it has lead to confusion (see 96). Now, the
parser behaves consistently by always using `NoMatch` to signalize failure.
This means that now is perfectly possible to make a pathologic grammar that
will make the parser loop endlessly. For example:
python
def grammar():
ZeroOrMore(a), EOF
def a():
RegExMatch('.*')
Rule `a` is a `RegExMatch` which may succeed by matching empty string thus
inducing `ZeroOrMore` to repeat endlessly when we reach the end of input.
In the future Arpeggio might introduce a way to detect these situations during
parser construction but for now if you find yourself in a situation that the
parser has stuck watch out for non-consuming matches (especially regex
matches) inside repetitions or turn on debugging output to see why the parser
is looping.
Issue [101] when implemented will detect and report these invalid grammars.
- fix: 98 suppressed match in zero-or-more [98]. Thanks vpavlu for reporting
the issue.
- fix: empty comments in .peg files hid the next line, commented or not
([124]). Thanks smurfix for the fix.
[125]: https://github.com/textX/Arpeggio/issues/125
[124]: https://github.com/textX/Arpeggio/pull/124
[123]: https://github.com/textX/Arpeggio/discussions/123
[101]: https://github.com/textX/Arpeggio/issues/101
[98]: https://github.com/textX/Arpeggio/issues/98
[96]: https://github.com/textX/Arpeggio/issues/96
[ruff]: https://github.com/astral-sh/ruff
[flit]: https://flit.pypa.io/
[Unreleased]: https://github.com/textX/Arpeggio/compare/2.0.2...HEAD