diff options
author | ptmcg <ptmcg@austin.rr.com> | 2023-04-01 01:49:02 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2023-04-01 01:49:02 -0500 |
commit | c4cf4a5c1e6c2d2a2dcffe1abae400702efd6426 (patch) | |
tree | 3339c7852d3113359fd66bfb5dd2bc92539ce6f1 /examples/greeting.py | |
parent | 718e858a5d1f1ad371898989da341e3322010edd (diff) | |
download | pyparsing-git-c4cf4a5c1e6c2d2a2dcffe1abae400702efd6426.tar.gz |
Update some examples to latest pyparsing style, PEP8 names
Diffstat (limited to 'examples/greeting.py')
-rw-r--r-- | examples/greeting.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/greeting.py b/examples/greeting.py index 28a534a..17a7b2a 100644 --- a/examples/greeting.py +++ b/examples/greeting.py @@ -8,16 +8,16 @@ import pyparsing as pp # define grammar -greet = pp.Word(pp.alphas) + "," + pp.Word(pp.alphas) + pp.oneOf("! ? .") +greet = pp.Word(pp.alphas) + "," + pp.Word(pp.alphas) + pp.one_of("! ? .") # input string hello = "Hello, World!" # parse input string -print(hello, "->", greet.parseString(hello)) +print(hello, "->", greet.parse_string(hello)) # parse a bunch of input strings -greet.runTests( +greet.run_tests( """\ Hello, World! Ahoy, Matey! |