summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Better formatting in range_check.py example, and added to test_examples.pyHEADmasterptmcg2023-05-061-23/+70
|
* Updated several examples to latest method namesptmcg2023-05-0414-574/+556
|
* Some format cleanup in unicode_denormalizer.py; handle uppercase ligatures; ↵ptmcg2023-04-181-30/+49
| | | | add a few more comments and helpful variable names
* Add some helpful comments to the unicode_denormalizer.py example scriptptmcg2023-04-181-13/+18
|
* Add some helpful comments to the unicode_denormalizer.py example scriptptmcg2023-04-181-7/+21
|
* More PEP8 and modern Python stylingptmcg2023-04-051-112/+112
|
* Update adventureEngine example, add EXAMINE command, create diagramptmcg2023-04-051-6/+40
|
* Update some examples to latest pyparsing style, PEP8 namesptmcg2023-04-0117-228/+222
|
* verilogParse.py code update: convert str literals to Keywords; add ↵ptmcg2023-03-291-299/+273
| | | | using_each to define multiple related Keywords; used f-string instead of str addition to build up identifier1 expr; merged alternative Regex exprs to single Regex in udpInitVal; change setName to set_name throughout; ZeroOrMore and OneOrMore to [...] and [1, ...] throughout; convert most Optional(expr) to (expr | ""); add ParseException.explain() to test() function
* Update lucene_grammar.py example, fix * and ? wildcards, and corrected some ↵ptmcg2023-03-251-30/+52
| | | | tests. Addresses #455
* Update and rename invRegex.py to inv_regex.py (#461)Ross J. Duff, MSc2023-01-221-66/+64
| | | PEP8 update of invRegex example
* Used keyword var in lucene_grammar.py (#454)Elijah Nicol2022-12-131-1/+2
| | | * Added usage of keyword variable
* Added set_name calls to make diagramming clearerptmcg2022-12-111-8/+8
|
* Remove sparser.py and pymicko.py examples (GPL license) - fixes #440ptmcg2022-08-223-2116/+0
|
* Add delta_time, excelExpr, and rosettacode to test_examples.pyptmcg2022-07-123-71/+59
|
* Add booleansearchparser.py to test_examples for inclusion in pytest runsptmcg2022-07-091-79/+23
|
* Minor changes in verilogParse.py - remove unused timing vars, change ↵ptmcg2022-06-241-4/+3
| | | | time.time() to time.perf_counter()
* Enable packrat in verilogParse.py by defaultptmcg2022-06-171-2/+2
|
* Fixed bug in srange (escaped chars inside range set); fixed ignore type ↵ptmcg2022-05-141-1/+4
| | | | annotation in SkipTo
* Back out Lox language parser (from Crafting Interpreters, by Robert Nystrom)pyparsing_3.0.9ptmcg2022-05-101-220/+0
|
* Added Lox language parser (from Crafting Interpreters, by Robert Nystrom)ptmcg2022-05-082-2911/+220
|
* Added Lox language parser (from Crafting Interpreters, by Robert Nystrom)ptmcg2022-05-081-0/+2911
|
* Added test case to bigquery_view_parser.py from #291ptmcg2022-04-301-0/+6
|
* Added another test case to bigquery_view_parser.pyptmcg2022-04-301-0/+24
|
* Fixed bigquery_view_parser.py example to parse examples from ↵ptmcg2022-04-301-88/+260
| | | | https://cloud.google.com/bigquery/docs/reference/legacy-sql
* Add unicode_denormalizer.py to examples.ptmcg2022-03-291-0/+123
|
* Fixing Unicode block range in examples/booleansearchparser.py (#342)tc-yu2021-12-151-25/+59
| | | | | * Updated range for unicode blocks, updated add char logic to include last character in each block, update some function names * Test case for CJK block and last character in block
* Added sys.setrecursionlimit for complex query strings; general reformattingPaul McGuire2021-11-131-370/+126
|
* Revert strict LineStart interpretation in 3.0.0 to 2.4.x behavior (Issue #317)ptmcg2021-10-261-4/+4
|
* Fix type annotation for ranges in unicode_sets; make _get_chars_for_ranges a ↵ptmcg2021-09-271-2/+2
| | | | lazyclassproperty
* Fix type annotation for ranges in unicode_sets; make _get_chars_for_ranges a ↵ptmcg2021-09-271-31/+43
| | | | lazyclassproperty
* Add numbers and punctuation to Cuneiform classptmcg2021-09-251-0/+1
|
* Some tweaks to cuneiform_python.pyptmcg2021-09-241-2/+4
|
* Add cuneiform_python.py exampleptmcg2021-09-231-0/+101
|
* Add pyparsing_common.url to urlExtractorNew.pyptmcg2021-09-111-7/+49
|
* Update eval_arith.py to have better representation of true and false eval ↵ptmcg2021-09-081-2/+4
| | | | expressions
* Reformat code for railroad_diagram_demo.pyptmcg2021-09-081-6/+22
|
* 226 railroad updates (#298)Paul McGuire2021-09-088-52/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add line separators to HowToUsePyparsing.rst to call attention to PEP-8 naming in this document * Update railroad diagram generation code, to show results names as group annotations, and break out all expressions with a name set using setName. * Revert dataclasses back to NamedTuples for 3.6-7 compat; add setName calls in simpleBool.py; add simpleBool to make_diagram.py * Remove default setName calls on delimitedList * Add setName calls to simpleSQL for better diagram * Remove hard-coded debug mode * Move setName on delimitedList into test code * Restore default setName() calls for delimitedList; set default vertical=3; update jsonParser.py and simpleSQL.py with better setName() calls (and update test_diagram.py accordingly); update test_diagram.py to move asserts after tempfiles are written, moved tempfiles to local dir instead of hard-to-find temp dir * Get proper railroad diags for infixNotation * Undo forced railroad_debug * Code cleanup from PR comments * Remove hard-coded base_expr name from infix_notation * Add special EachItem to compose DiagramItem for Group-OneOrMore-Choice; refactored tests to move duplicated code to function; added names to mozillaCalendarParser.py for better diagram * Make sure root element gets in the diagram, even if it has no custom name * Update tests to reflect diagram structure changes * Add LOOKAHEAD and LOOKBEHIND annotations for FollowedBy and PrecededBy elements, and changed the annotation on Each to [ALL]; renamed _first to _element_diagram_states; add expr.streamline() in create_diagram() to collapse nested exprs; added railroad_diagram_demo.py example general blackening; update CHANGES with latest enhancements; bump version date * Fix pip command * Update CHANGES and whats_new_in_3_0_0.rst with some features and acknowledgements * Updates from PR review: change user instructions to use pyparsing[diagrams]; consistent annotations for NotAny along with FollowedBy and PrecededBy; fixed up comments and type annotations * Remove unneeded pip installs for tox (already handled in tox.ini) * Refactor duplicate code into decorator; drop unused group_results_name argument * Add diagram handling for SkipTo, and for And's constructed using `expr*N` notation (use a OneOrMore diagram with a repeat count instead of a sequence of N exprs) * Fix parsing ambiguity in railroad_diagram_demo.py so that parser can actually parse a valid input string
* Clean up number word parsers for better explanatory value.ptmcg2021-08-092-45/+73
|
* Add simplified 1-99 example, extracted from number_words.pyPaul McGuire2021-08-081-0/+72
|
* Minor code cleanupsptmcg2021-08-071-37/+7
|
* Update __versionTime__; blacken core code and examplesptmcg2021-08-0117-177/+491
|
* Rename enable_left_recursion to enableLeftRecursion for consistency with ↵ptmcg2021-08-011-0/+45
| | | | other pyparsing names (left in enable_left_recursion synonym as omen of names to come); added notes to CHANGES and whats_new_in_3_0_0.rst; added left_recursion.py to examples.
* Fix misc. documentation typos (#280)luzpaz2021-05-148-22/+22
| | | Found via `codespell -q 3 -L ba,fourty,halp,inout,strng`
* #261 - fix table name in sql2dot.py exampleptmcg2021-04-131-1/+1
|
* Add IndentedBlock class; made vertical keyword arg more visible when ↵pyparsing_3.0.0b1ptmcg2020-11-024-19/+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-0/+89
|
* ParseResults.List class to support returning an actual list from a parse ↵ptmcg2020-10-241-13/+51
| | | | 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.
* There will be blackPaul McGuire2020-10-111-1/+1
|
* test_bibparse includes parsed strings with leading space, no longer included ↵Paul McGuire2020-10-111-28/+29
| | | | in output