Releases: neogeny/TatSu
Releases · neogeny/TatSu
Bug fixes, improvements, optimizations
- Fix pickling of AST. The change also affects parsing within multiprocessing (@fizbin)
- Fall back to
repr()
for types not handled byjson
(@dnicolodi) - Ensure there is exactly one method cache per Walker class
- Bug fixes, upgrades, and improvements by (@dnicolodi)
Resolve feature backlog
- Make sure that the generated parser is the same as the bootstrap
parser. - Honor grouping in pattern expressions with the semantics of
re.findall(pattern, text)[0]
. Now groups that should not be
returned when parsing should use the(?:)
syntax. Now patterns
align with Pythonre
independently of the
@@ignorecase
setting for the grammar. - Allow
{}
interpolation in`constant
[ expressions with the
semantics of ]{.title-ref}[str.format()]{.title-ref}` - Add
[constant]{.title-ref}
as a multiline version of
`constant
`. - Add ^
[constant]{.title-ref}
and ^`constant
[ as syntax
for an `alert]{.title-ref} expression. Alerts produce no tokens bug
get registed in [parseinfo]{.title-ref} records. - BUG: make the
->
skip expression always stop at EOF. - Make the
->
skip expression go over comments, and not log while
skipping. - Patch problem with pickling
FailedCut
while running parsing in
parallel. - Optimize model pickling and parallel processing to reduce runtime
and memory use withparproc
- Add a representation of
~
cut expressions to parse traces
bugfix release
- Fix that settings passed to
Context.parse()
were ignored. AddContext.active_config
for the configuration active during a parse - Define
Node._parent
as part of the@dataclass
fix regressions
- Make
AST
andNode
hashable. Necessary for cachingNode.children()
- Implement
Node.__eq__()
in terms of identity orNode.ast.__eq__()__
- Fix regression in which rule order is lost in generated parsers (@dtrckd)
- Restore
Node.ast
(was removed because of problems with__eq__()
) - Get
Node.children()
fromNode.ast
when there are no attributes defined for theNode
. This restores the desired behavior while developing a parse model.
Reloaded
- Now
config: ParserConfig
is used in__init__()
andparse()
methods ofcontexts.ParseContext
,grammars.Grammar
, and elsewhere to avoid the very long parameter lists that abounded.ParseContext
also provides clean and clear ways of overridinga group of settings with another - All names defined in the successful choice in a rule are now defined in the resulting
AST
_. Names within optionals that did not match will have their values set toNone
, and closures that did not match will be set to ``[]` - Moved build configuration from
setup.py
in favor ofsetup.cfg
andpyproject.toml
(@KOLANICH
_) Node.children()
is now computed only when required, and cached- Classes in generated object models are now
@dataclass
- Optimize and get rid of bugs and annoyances while keeping backwards compatibility
- Drop support for Python < 3.10
Bug fix release
- Fix bug in which rule fields were forced on empty
AST
(@Victorious3)
Long awaited update
- Several important refactorings in
contexts.ParseContext
- Make
ignorecase
settings apply to defined@@keywords
- Move checking of keywords used as names into
ParseContext
- Output of generated parsers again matches that of model parsers
- Improve "expecting one of:" messages so elements are in declaration order
- Stop code generation if there are closures over possibly empty expressions
- Preserve name declaration order in returned
AST
- Update the bootstrap parser (
tatsu/bootstrap.py
) to the generated parser - Now generated parser's
main()
only outputs the JSON for the parseAST
- Minor version bumped in case the many fixes break backwards-compatibility
- Minor documentation issues fixed
- All tests run with Python 3.8, 3.9, 3.10
Maintenance release
Maintenance + Python 3.8
- 竜 TatSu is now only tested against Python 3.8. Earlier versions of Python are now deprecated, and Python 2.X versions are no longer supported (@apalala).
- Apply
nameguard
only iftoken[0].isalpha()
. This solves a regression afecting previous TatSu and Grako grammars (@apalala). - Remove
pygraphviz
from develoment requirements, as it doesn't build under Py38 (@apalala) - #56 Include missing
tatsu/g2e/antlr.ebnf
in distribution (@apalala) - #138 Reimplement the calculation of
FIRST
,FOLLOW
, andLOOKAHEAD
sets using latest theories. For now, this should improve parser error reporting, but should eventually enable the simplification of parsing of leftrec grammars (@apalala). - #153 Import ABCs from
collections.abc
(@tirkarthi) - Remove support for
Cython
andpypy3
(@apalala).
Implementation of left recursion complete
- The default regexp for whitespace was changed to `(?s)s+
- Allow empty patterns (
//
) like Python does - #65 Allow initial, consecutive, and trailing
@namechars
- #73 Allow
@@whitespace :: None
and@@whitespace :: False
- #75 Complete implemenation of left recursion(@Victorious3)
- #77 Allow
@keyword
throughout the grammar - #89 Make all attributes defined in the rule present in the resulting
AST
orNode
even if the associated expression was not parsed - #93 Fix trace colorization on Windows
- #96 Documented each
@@directive
- Switched the documentation to the "Alabaster" theme
- Various code and documentation fixes (@davesque, @nicholasbishop, @rayjolt)