diff options
author | ptmcg <ptmcg@austin.rr.com> | 2021-09-05 10:12:33 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2021-09-08 09:08:55 -0500 |
commit | e7fde50c5c7099af9b350c97933dfff20d59da79 (patch) | |
tree | 87269fb0cb22e15e43171201fa42f2a442b2f0c1 /pyparsing/common.py | |
parent | dfe7593f535ad810166e621b2e1b4b34166fc3d5 (diff) | |
download | pyparsing-git-e7fde50c5c7099af9b350c97933dfff20d59da79.tar.gz |
Add missing setName() calls; use new identchars and identbodychars to define identifier
Diffstat (limited to 'pyparsing/common.py')
-rw-r--r-- | pyparsing/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyparsing/common.py b/pyparsing/common.py index 0e27b91..c6d91f6 100644 --- a/pyparsing/common.py +++ b/pyparsing/common.py @@ -205,7 +205,7 @@ class pyparsing_common: scientific notation and returns a float""" # streamlining this expression makes the docs nicer-looking - number = (sci_real | real | signed_integer).streamline() + number = (sci_real | real | signed_integer).setName("number").streamline() """any numeric expression, returns the corresponding Python type""" fnumber = ( @@ -215,7 +215,7 @@ class pyparsing_common: ) """any int or real number, returned as float""" - identifier = Word(alphas + "_", alphanums + "_").set_name("identifier") + identifier = Word(identchars, identbodychars).set_name("identifier") """typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')""" ipv4_address = Regex( |