diff options
author | David Beazley <dave@dabeaz.com> | 2022-11-26 11:38:01 -0600 |
---|---|---|
committer | David Beazley <dave@dabeaz.com> | 2022-11-26 11:38:01 -0600 |
commit | 12d161ad3395305f68712930cfe127c55bd3bc71 (patch) | |
tree | f2b0e36bb9746daf447020b2ecd57c009a22ddbe | |
parent | ee76ee7c4c0a0f1a53d013a6f0dd124f6a8a20f0 (diff) | |
download | ply-12d161ad3395305f68712930cfe127c55bd3bc71.tar.gz |
Fix typo
-rw-r--r-- | doc/ply.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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. |