summaryrefslogtreecommitdiff
path: root/pyparsing
Commit message (Collapse)AuthorAgeFilesLines
* Add support for LR parsingleft_recursion_supportMax Fischer2021-07-304-3/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix misc. documentation typos (#280)luzpaz2021-05-141-1/+1
| | | Found via `codespell -q 3 -L ba,fourty,halp,inout,strng`
* #271 - remove comparison with bytes in ParseResults._null_valuesptmcg2021-04-131-1/+1
|
* Update core.py (#259)retsyo2021-01-031-1/+1
| | | since `pip install railroad` installs anthor package, I think it is better to point out the corrected one.
* Fix minor typos and add Located to `__all__` listptmcg2020-12-291-1/+2
|
* Deprecate `locatedExpr` in favor of new `Located` classptmcg2020-12-242-1/+42
|
* Hide internal null_values list in ParseResults classptmcg2020-12-241-2/+2
|
* Move OnlyOnce out of core.py and into actions.pyptmcg2020-12-242-22/+23
|
* Update version for next dev phaseptmcg2020-12-241-2/+2
|
* Add IndentedBlock class; made vertical keyword arg more visible when ↵pyparsing_3.0.0b1ptmcg2020-11-024-27/+83
| | | | creating railroad diags; changed create_diagram from monkeypatch to included method on ParserElement; better debug exception if Dict is constructed with non-Group expression
* Add number_words.py example; update diagramming codeptmcg2020-10-251-3/+16
|
* minor perf changes IIptmcg2020-10-253-10/+14
|
* minor perf changesptmcg2020-10-252-19/+14
|
* Remove black from tox.ini, Travis CI black is not aligned with local black; ↵ptmcg2020-10-251-1/+1
| | | | add py39-dev version
* ParseResults.List class to support returning an actual list from a parse ↵ptmcg2020-10-242-13/+77
| | | | action, plus aslist and asdict args to Group and Dict classes to emit native Python types instead of ParseResults; also update repr() output of ParseResults to include the type name instead of just a bare tuple.
* Issue #244, fixed debug output to indicate correct parse location; updated ↵Paul McGuire2020-10-112-7/+27
| | | | setDebug output to include current text line and parse location
* Fixed bugs in Each with ZeroOrMore and OneOrMore (first matched element ↵ptmcg2020-10-111-8/+15
| | | | enclosed in extra nesting level; results names not maintained; did not handle mix with required expressions)
* Fix enum auto() incompat with Py3.5Paul McGuire2020-08-192-11/+11
|
* Convert SyntaxWarnings to ValueError and TypeError exceptions; change ↵Paul McGuire2020-08-192-132/+93
| | | | diagnostics to an enum, and add enable_diag(), disable_diag() and enable_all_warnings() methods; clean up pyparsing imports in test_unit.py
* Add __version_info__ module attribute, similar in content and structure to ↵Paul McGuire2020-08-191-3/+11
| | | | sys.version_info
* Add '*' markers to debug output to indicate cached parse expression ↵ptmcg2020-08-181-9/+35
| | | | try/pass/fail events (which were previously omitted from debugging output)
* Follow-up to PR #233ptmcg2020-08-161-4/+0
|
* Remove identChars override from Keyword.copy (#233)jgrey42962020-08-161-1/+0
|
* Better display of single-character WordsPaul McGuire2020-07-301-1/+4
|
* Add size spec to default Word repr outputPaul McGuire2020-07-301-2/+12
|
* Nicer default name for QuotedStrings; clean out more Py2 vestigial codeptmcg2020-07-192-9/+6
|
* Replace last-century '%' string interp with .format() usagePaul McGuire2020-07-194-70/+85
|
* Fixing generated default name for QuotedString (#229)Joshua Coales2020-07-191-1/+1
| | | Looks like an issue in changing the type of string format used
* Docstring fixes; cleanup dead/Py2 vestigial codeptmcg2020-07-103-16/+5
|
* Docstrings cleanup; add 'encoding' argument to parseFile; additional unit ↵ptmcg2020-07-084-141/+151
| | | | tests to improve ParseResults coverage
* infixNotation unit tests require infixNotation bug fixes!ptmcg2020-07-071-14/+11
|
* Sphinx and docstring fixesptmcg2020-07-062-25/+34
|
* It is to blackenPaul McGuire2020-06-281-1/+1
|
* When warning for uninitialized Forward, look up stack to parseString ↵Paul McGuire2020-06-281-2/+11
| | | | function call to give correct stacklevel for the warning
* Fixed traceback trimming, and added ParserElement.verbose_traceback ↵Paul McGuire2020-06-282-16/+9
| | | | save/restore to reset_pyparsing_context()
* Update version to stage for next release work; fix typo in CHANGES filePaul McGuire2020-06-271-2/+2
|
* Minor code cleanups, remove more Py2-compatibilty codePaul McGuire2020-06-272-11/+6
|
* Fix bug when using pyparsing_testing.reset_pyparsing_context as a context ↵Paul McGuire2020-06-271-1/+1
| | | | manager, suppressing raised exceptions
* Update unicode ranges (compute by interrogating unicodedata by language ↵ptmcg2020-06-271-17/+90
| | | | name) - Issue #227
* Blackeningptmcg2020-06-261-1/+3
|
* Restructure unit tests to do proper testing with and without packrat enabledptmcg2020-06-262-2/+27
|
* More thorough ParseException.explain testingptmcg2020-06-251-2/+2
|
* Collapse _checkRecursion methods; moved 3.0.0 summary from CHANGES to ↵ptmcg2020-06-252-20/+28
| | | | whats_new_in_3_0_0.rst; cleaned up docstrings, Word() examples, restored setName() docstring; added example to ParseException.explain()
* Diagram improvements IV (#225)Michael Milton2020-06-241-131/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add diagram documentation, add more diagram tests, allow more customization of diagrams * Remove accidental edit of unrelated documentation * Add diagram package * Add jinja file to manifest * Add to bdist also * package_data * Railroad improvements * Partial rewrite * Update * Use partials everywhere so we can edit the tree before it's constructed * Rewrite the diagram generator to not duplicate any content; use monospaced font for titles * Small documentation change * Revert back to Python 3.5 type hints, fix a small bug * More diagram fixes * Even more pruning; update docs to use SQL example * Don't check the string value of names now that we don't have to
* Follow-up to default vs custom name tracking, from Issue #223ptmcg2020-06-241-107/+114
|
* Add recurse() method to simplify navigating through hierarchy of ↵ptmcg2020-06-222-2/+11
| | | | ParserElements within a pyparsing parser
* Diagram Improvements Episode III: Revenge of the Setuptools (#224)Michael Milton2020-06-222-81/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add diagram documentation, add more diagram tests, allow more customization of diagrams * Remove accidental edit of unrelated documentation * Add diagram package * Add jinja file to manifest * Add to bdist also * package_data * Railroad improvements * Partial rewrite * Update * Use partials everywhere so we can edit the tree before it's constructed * Rewrite the diagram generator to not duplicate any content; use monospaced font for titles * Small documentation change * Revert back to Python 3.5 type hints, fix a small bug
* strRepr cleanup, remove replicated __str__ methodsPaul McGuire2020-06-203-170/+85
|
* Add new warnings about common errors using Forward: ↵ptmcg2020-06-092-4/+32
| | | | warn_on_parse_using_empty_Forward warns when failing to attach an expression; warn_on_assignment_to_Forward warns when using '=' instead of '<<='
* Additional configuration for `skipWhitespace` and `leaveWhitespace` (#219)Michael Milton2020-06-091-14/+57
| | | | | | | * Add .ignoreWhitespace() method * Add recursive arg to leave- and ignoreWhitespace(), with tests * Add tests and implementation of the recursive flag