Release date: 2024-06-18
- Bounded repetitions via
e{n}
ande{m,n}
forms (#46)
Release date: 2024-03-28
- Optimization returns new grammar instead of mutating original (#44)
- Make union of choice of character classes (#44)
Flag.STRICT
now raises parsing errors in machine parser
Release date: 2023-12-31
- Added support for Python 3.12
- Repetitions with mincount > 0 no longer reuse the instruction object (#38)
- Use pyproject.toml instead of setup.cfg for project metadata
- Use Ruff for linting (#36)
- Update CI workflows, including OIDC trusted publishing
Release date: 2023-07-26
pe.operators.AutoIgnore
(#6)pe.patterns
module (#6)pe.patterns.DEFAULT_IGNORE
(#6)ignore
parameter onpe.compile()
,pe.match()
,pe.packrat.PackratParser
, andpe.machine.MachineParser
(#6)
- Line-breaking whitespace and tabs are escaped in debug context string (#31)
Release date: 2023-06-04
- Parse errors on loading a grammar are now GrammarError (#21)
Release date: 2021-10-05
- Regex optimization avoids some superfluous groups (#19)
- Added more 'common' optimations: (#20)
- Single-character classes become literals
- Sequence of literals becomes one literal
- Choice of non-negated character classes become one class
Release date: 2021-09-30
pe.Parser.modified_grammar
attribute
pe.scanners
is no longer part of the public API
- Debug mode now prints the modified grammar when it has been optimized
- Capture choices properly in the machine parser (#17)
- Character classes better handle multiple ranges (#18)
Release date: 2021-09-28
pe.Match.span()
(#12)pe.actions.Pair
(#13)negate
parameter onpe.operators.Class
- "Common" optimizations (currently only negated character classes)
via the
pe.COMMON
flag pe.scanners
module for the low-level text scanners
- Changed
pe.Match.pos
tope.Match.start()
(#12) - Changed
pe.Match.end
tope.Match.end()
(#12) -
is no longer an escapable characterpe.machine
is now distributed as a compiled extension module
pe.machine
is now working again and passing the tests
Release date: 2020-04-28
pe.GrammarWarning
(#7)pe.actions.Action
pe.actions.Call
pe.actions.Raw
pe.actions.Bind
pe.actions.Getter
(replacespe.actions.first
andpe.actions.last
)pe.actions.Warn
(#7)pe.operators.Debug
(#9)
pe.actions.first
pe.actions.last
- Concept of "value types" from specification and implementation
pe.Grammar.finalize()
andpe.Grammar.final
- Add
MEMOIZE
flag to grammar parser for better debugging - Functions in
pe.actions
(constant
,pack
,join
,fail
) are now subclasses ofAction
:Constant
,Pack
,Join
,Fail
. pe.compile()
no longer takes an open file or a single definition as input- Grammar vs Expression parsing is more consistent internally
- Packrat parser handles the Debug operator (#9)
- Grammar parser now warns on unlikely range (#7)
- Rename "raw" to "capture" throughout
- Bug in definition formatting from partial reformatting
Release date: 2020-04-14
This is the initial release with a functional Packrat recursive descent parser and a work-in-progress state-machine parser.