pyparsing 3.0.0rc1 #299
ptmcg
announced in
Announcements
Replies: 1 comment
-
Install pyparsing into a testing virtual environment using this command:
Be sure to try out the new railroad diagram features! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Railroad diagrams have been reformatted:
. creating diagrams is easier - call
create_diagram()
takes 3 arguments:. the filename to write the diagram HTML
. optional 'vertical' argument, to specify the minimum number of items in a path to be shown vertically; default=3
. optional 'show_results_names' argument, to specify whether results name annotations should be shown; default=False
. every expression that gets a name using setName() gets separated out as a separate subdiagram
. results names can be shown as annotations to diagram items
.
Each
,FollowedBy
, andPreceededBy
elements get[ALL]
,[LOOKAHEAD]
, and[LOOKBEHIND]
annotations. removed annotations for
Suppress
elements. some diagram cleanup when a grammar contains
Forward
elements. check out the examples
make_diagram.py
andrailroad_diagram_demo.py
Type annotations have been added to most public API methods and classes.
Better exception messages to show full word where an exception occurred.
Was:
Now:
Suppress
can be used to suppress text skipped using "...".Prints:
New string constants
identchars
andidentbodychars
to help in defining identifierWord
expressionsTwo new module-level strings have been added to help when defining identifiers,
identchars
andidentbodychars
.Instead of writing::
you will be able to write::
Those constants have also been added to all the Unicode string classes::
Added a caseless parameter to the
CloseMatch
class to allow for casing to be ignored when checking for close matches. (Issue add a caseless parameter to the CloseMatch class #281) (PR by Adrian Edwards, thanks!)Fixed bug in
Located
class when used with a results name. (Issue locatedExpr naming doesn't work when it's alone #294)Fixed bug in
QuotedString
class when the escaped quote string is not a repeated character. (Issue QuotedString's escQuote parameter does not work unless it is a double char #263)parseFile()
andcreate_diagram()
methods now will acceptpathlib.Path
arguments.This discussion was created from the release pyparsing 3.0.0rc1.
Beta Was this translation helpful? Give feedback.
All reactions