summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ply.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/ply.md b/doc/ply.md
index d61e9ed..29a16de 100644
--- a/doc/ply.md
+++ b/doc/ply.md
@@ -477,13 +477,13 @@ parse. Here is an example of how this works:
# Get more input (Example)
more = input('... ')
if more:
- self.lexer.input(more)
- return self.lexer.token()
+ t.lexer.input(more)
+ return t.lexer.token()
return None
The EOF function should return the next available token (by calling
-`self.lexer.token())` or `None` to indicate no more data. Be aware that
-setting more input with the `self.lexer.input()` method does NOT reset
+`t.lexer.token())` or `None` to indicate no more data. Be aware that
+setting more input with the `t.lexer.input()` method does NOT reset
the lexer state or the `lineno` attribute used for position tracking.
The `lexpos` attribute is reset so be aware of that if you\'re using it
in error reporting.