summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2007-02-28 19:00:59 +0000
committerDavid Beazley <dave@dabeaz.com>2007-02-28 19:00:59 +0000
commite4989423fb06998f9e5c0011332469320597ec64 (patch)
tree87b66e72e637fc6ee18a67627be7a5ced36a1723 /doc
parente012665bc2b9f1593145a043cfbe27ed6d618208 (diff)
downloadply-e4989423fb06998f9e5c0011332469320597ec64.tar.gz
Fixed examples for EOF condition in p_error
Diffstat (limited to 'doc')
-rw-r--r--doc/ply.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/ply.html b/doc/ply.html
index dba0c62..d5648fe 100644
--- a/doc/ply.html
+++ b/doc/ply.html
@@ -2273,7 +2273,9 @@ When a syntax error occurs, <tt>yacc.py</tt> performs the following steps:
<ol>
<li>On the first occurrence of an error, the user-defined <tt>p_error()</tt> function
-is called with the offending token as an argument. Afterwards, the parser enters
+is called with the offending token as an argument. However, if the syntax error is due to
+reaching the end-of-file, <tt>p_error()</tt> is called with an argument of <tt>None</tt>.
+Afterwards, the parser enters
an "error-recovery" mode in which it will not make future calls to <tt>p_error()</tt> until it
has successfully shifted at least 3 tokens onto the parsing stack.