Skip to content
Browse files

explain ! more

  • Loading branch information...
1 parent 751c09e commit 7d346888faa21437ae75d53db066433ae56e6aed @darius committed Dec 24, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 peglet.py
View
5 peglet.py
@@ -90,7 +90,10 @@
the results produced so far for the current rule and replaces them
with one value, the result of calling the function defined for the
action (supplied as a keyword argument to the Parser constructor).
-Finally, `!foo` produces only `()` on success.
+Finally, `!foo` matches when `foo` fails to match; then it consumes no
+input and produces `()`. (Thus `!!foo` serves for lookahead: it
+matches when `foo` matches, but again consumes no input and produces
+only `()`.)
Actions
-------

0 comments on commit 7d34688

Please sign in to comment.
Something went wrong with that request. Please try again.