This commit is contained in:
Eric Vergnaud 2015-08-26 23:39:31 +08:00
parent 1b5437aeab
commit 3a10724919
1 changed files with 2 additions and 2 deletions

View File

@ -281,8 +281,8 @@ class Parser (Recognizer):
if lexer is None:
if self.getTokenStream() is not None:
tokenSource = self.getTokenStream().getTokenSource()
if isinstance( tokenSource, Lexer ):
lexer = tokenSource
if isinstance( tokenSource, Lexer ):
lexer = tokenSource
if lexer is None:
raise UnsupportedOperationException("Parser can't discover a lexer to use")