summaryrefslogtreecommitdiff
path: root/examples/simpleSQL.py
Commit message (Collapse)AuthorAgeFilesLines
* 226 railroad updates (#298)Paul McGuire2021-09-081-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Update __versionTime__; blacken core code and examplesptmcg2021-08-011-1/+5
|
* enable packrat parsing in all examples using infixNotationptmcg2020-04-071-0/+3
|
* Blacken the project (#141)Jon Dufresne2019-10-311-29/+48
|
* Remove unused imports (#147)Jon Dufresne2019-10-191-2/+2
| | | | | Discovered using the command: flake8 --select F401 .
* SimpleSQL.py update - nested select and infixNotation for 'where'Paul McGuire2019-03-301-88/+95
|
* Update examples and unit tests to more preferred coding styles, imports for ↵ptmcg2019-01-301-5/+5
| | | | pyparsing_common as ppc and pyparsing_unicode as ppu
* Remove unused imports throughout projectJon Dufresne2018-12-241-2/+2
| | | | | | | | | | | | | Unused imports were discovered using flake8. By removing the unused imports, the code is a bit friendlier to new contributors as it is clearer what is being used and not simply leftover from previous refactoring. The flake8 command: $ flake8 . --select F401 http://flake8.pycqa.org/
* Trim trailing white space throughout the projectJon Dufresne2018-12-221-4/+4
| | | | | | Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated lines.
* Move src to rootCengiz Kaygusuz2017-11-201-0/+88