summaryrefslogtreecommitdiff
path: root/docs/whats_new_in_3_0_0.rst
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@users.noreply.github.com>2021-09-08 09:03:40 -0500
committerGitHub <noreply@github.com>2021-09-08 09:03:40 -0500
commitdfc7d7524ed9bb74a04865a68a06982bb54fcc5c (patch)
treed7655f624998dd910caf5c833dda2cb4a68aad85 /docs/whats_new_in_3_0_0.rst
parent11fda2880df71ce6661807b3b5921bc09bd6e003 (diff)
downloadpyparsing-git-dfc7d7524ed9bb74a04865a68a06982bb54fcc5c.tar.gz
226 railroad updates (#298)
* 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
Diffstat (limited to 'docs/whats_new_in_3_0_0.rst')
-rw-r--r--docs/whats_new_in_3_0_0.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/whats_new_in_3_0_0.rst b/docs/whats_new_in_3_0_0.rst
index 5d4bfcd..82845c1 100644
--- a/docs/whats_new_in_3_0_0.rst
+++ b/docs/whats_new_in_3_0_0.rst
@@ -38,7 +38,7 @@ can now be written as::
Pyparsing 3.0 will run both versions of this example.
New code should be written using the PEP-8 compatible names. The compatibility
-synonyms will be removed in a future version.
+synonyms will be removed in a future version of pyparsing.
Railroad diagramming
@@ -62,7 +62,9 @@ generator for documenting pyparsing parsers. You need to install
# save as HTML
parser.create_diagram('parser_rr_diag.html')
-(Contributed by Michael Milton)
+See more in the examples directory: ``make_diagram.py`` and ``railroad_diagram_demo.py``.
+
+(Railroad diagram enhancement contributed by Michael Milton)
Support for left-recursive parsers
----------------------------------
@@ -94,7 +96,7 @@ Prints::
See more examples in ``left_recursion.py`` in the pyparsing examples directory.
-(Contributed by Max Fischer)
+(LR parsing support contributed by Max Fischer)
Packrat/memoization enable and disable methods
----------------------------------------------
@@ -393,7 +395,7 @@ Other new features
character ranges (converting ``"0123456789"`` to ``"0-9"`` for instance).
- Added a caseless parameter to the `CloseMatch` class to allow for casing to be
- ignored when checking for close matches.
+ ignored when checking for close matches. Contributed by Adrian Edwards.
API Changes