diff options
| -rw-r--r-- | docs/HowToUsePyparsing.rst | 2 | ||||
| -rw-r--r-- | tests/test_unit.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/docs/HowToUsePyparsing.rst b/docs/HowToUsePyparsing.rst index ae8bca0..30e5753 100644 --- a/docs/HowToUsePyparsing.rst +++ b/docs/HowToUsePyparsing.rst @@ -182,7 +182,7 @@ Usage notes - ``expr[... ,n]`` is equivalent to ``expr*(0, n)`` (read as "0 to n instances of expr") - - ``expr[...]`` and ``expr[0, ...]`` are equivalent to ``ZeroOrMore(expr)`` + - ``expr[...]``, ``expr[0, ...]`` and ``expr * ...`` are equivalent to ``ZeroOrMore(expr)`` - ``expr[1, ...]`` is equivalent to ``OneOrMore(expr)`` diff --git a/tests/test_unit.py b/tests/test_unit.py index ae9591e..b50117b 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -1701,6 +1701,7 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase): exprs = [ word[...] + num, + word * ... + num, word[0, ...] + num, word[1, ...] + num, word[2, ...] + num, @@ -1711,6 +1712,7 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase): expected_res = [ r"([abcd]+ )*\d+", r"([abcd]+ )*\d+", + r"([abcd]+ )*\d+", r"([abcd]+ )+\d+", r"([abcd]+ ){2,}\d+", r"([abcd]+ ){0,3}\d+", |
