summaryrefslogtreecommitdiff
path: root/pyparsing/util.py
Commit message (Collapse)AuthorAgeFilesLines
* Add support for LR parsingleft_recursion_supportMax Fischer2021-07-301-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * first draft of LR parsing * removed debug output * cache is owned and cleared by ParserElement * bounded recursion must be enabled explicitly * packrat rejects recursion * basic LR unit test * tests for associativity and nesting * added math example * fixed test typo * unittest for empty and non-peg clauses * LR-Forward can match Empty * fixed test typos * added base case to unittest * memo cache only provides copies * flattened Forward parse method * added high-level description of algorithm * expanded docstring * added tests for repetition rules * renamed bounded to left recursion * naive test for existing suite * explicitly testing tests for LR compatibility * LR memo no longer mixes action/no-action results * simplified replacement logic * adjusted example with ambiguous failure case * LR memo content is always returned as copy * draft for peeking recursion * memo update consistent for all actions * fixed a bug for non-string token identifiers * action wins against no-action * cleanup * properly setting names in tests * memoization can be turned off * testing memo switches * typos * flattened recursion memo * left recursion memo size may be limited * adjusted docs for recursion cache
* minor perf changes IIptmcg2020-10-251-3/+5
|
* Issue #244, fixed debug output to indicate correct parse location; updated ↵Paul McGuire2020-10-111-1/+4
| | | | setDebug output to include current text line and parse location
* Docstring fixes; cleanup dead/Py2 vestigial codeptmcg2020-07-101-13/+2
|
* Restructure unit tests to do proper testing with and without packrat enabledptmcg2020-06-261-0/+2
|
* strRepr cleanup, remove replicated __str__ methodsPaul McGuire2020-06-201-1/+4
|
* Fix potential FutureWarning with generated regex; minor reformat of runTests ↵ptmcg2020-03-291-4/+4
| | | | output to break at test comments if any
* Docstring formatting changes (#197)Matt Carmody2020-03-291-2/+2
| | | | | | | * Tidy docstring formatting for lists and example codeblock * Add class references and formatting to docstrings * Experimental docstring formatting changes
* Shorten pyparsing tracebacks, to clear out internal pyparsing calls; plus ↵ptmcg2020-02-011-3/+5
| | | | some micro-optimizations when using packrat parsing
* Added new warning 'warn_on_match_first_with_lshift_operator' to warn when ↵ptmcg2020-01-261-1/+1
| | | | doing `fwd << a | b`; fixed potential FutureWarning when including unescaped '[' in a regex range definition.
* Break up pyparsing.py monolith into sub-modules in a pyparsing package (#162)Paul McGuire2019-11-181-0/+171
* Break up pyparsing.py monolith into sub-modules in a pyparsing package * Convert relative imports to absolutes * Reference submodule pyparsing in setup.py modules * Remove recursive import of pyparsing from setup.py * Black updates * setup.py updates - packages vs. modules. use .dev1 for the version