diff options
| author | ptmcg <ptmcg@austin.rr.com> | 2021-09-24 08:42:53 -0500 |
|---|---|---|
| committer | ptmcg <ptmcg@austin.rr.com> | 2021-09-24 08:42:53 -0500 |
| commit | 8d1083f7db349d00c25993a7bd4dab415af0582e (patch) | |
| tree | 80b84b4a4e2b083bea1cbc36d0d158f902078bf6 | |
| parent | c8174e7d0d07da6f5183903e26baba9c18a3bd6c (diff) | |
| download | pyparsing-git-8d1083f7db349d00c25993a7bd4dab415af0582e.tar.gz | |
Some tweaks to cuneiform_python.py
| -rw-r--r-- | examples/cuneiform_python.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/cuneiform_python.py b/examples/cuneiform_python.py index c51a676..273fb1d 100644 --- a/examples/cuneiform_python.py +++ b/examples/cuneiform_python.py @@ -13,6 +13,7 @@ class Cuneiform(pp.unicode_set): """Unicode set for Cuneiform Character Range""" _ranges: List[Tuple[int, ...]] = [ + (0x10380, 0x103d5), (0x12000, 0x123FF), ] @@ -73,7 +74,7 @@ cuneiform_hello_world = r""" ππΏπ
π«(π) πππ·π()""" -script.parseString(cuneiform_hello_world).pprint(width=30) +script.parseString(cuneiform_hello_world).pprint(width=40) # use transform_string to convert keywords and builtins to runnable Python @@ -85,7 +86,8 @@ def_.add_parse_action(lambda: "def") print("\nconvert Cuneiform Python to executable Python") transformed = ( - (ident | def_) + # always put ident last + (def_ | ident) .ignore(pp.quoted_string) .transform_string(cuneiform_hello_world) .strip() |
