From c31c71324dbddb6aba978e6f3a4cb0c5d6894cb3 Mon Sep 17 00:00:00 2001 From: David Beazley Date: Tue, 27 Nov 2007 17:36:24 +0000 Subject: [PATCH] Fixed bug related to state changes and ignored characters. --- ply/lex.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ply/lex.py b/ply/lex.py index 25c3e6f..2a92b01 100644 --- a/ply/lex.py +++ b/ply/lex.py @@ -117,7 +117,7 @@ def clone(self,object=None): c.lexoptimize = self.lexoptimize c.lexliterals = self.lexliterals c.lexmodule = self.lexmodule - + # If the object parameter has been supplied, it means we are attaching the # lexer to a new object. In this case, we have to rebind all methods in # the lexstatere and lexstateerrorf tables. @@ -302,6 +302,7 @@ def token(self): # Every function must return a token, if nothing, we just move to next token if not newtok: lexpos = self.lexpos # This is here in case user has updated lexpos. + lexignore = self.lexignore # This is here in case there was a state change break # Verify type of the token. If not in the token map, raise an error