From e15e88a049c54cc6465069257b2de0d1e70df1ef Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Tue, 13 Dec 2016 21:33:19 +0800 Subject: [PATCH] fix unicode issue --- runtime/Python2/src/antlr4/error/ErrorStrategy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/Python2/src/antlr4/error/ErrorStrategy.py b/runtime/Python2/src/antlr4/error/ErrorStrategy.py index ec6a5d4c7..586a7933d 100644 --- a/runtime/Python2/src/antlr4/error/ErrorStrategy.py +++ b/runtime/Python2/src/antlr4/error/ErrorStrategy.py @@ -484,14 +484,14 @@ class DefaultErrorStrategy(ErrorStrategy): expecting = self.getExpectedTokens(recognizer) expectedTokenType = expecting[0] # get any element if expectedTokenType==Token.EOF: - tokenText = "" + tokenText = u"" else: name = None if expectedTokenType < len(recognizer.literalNames): name = recognizer.literalNames[expectedTokenType] if name is None and expectedTokenType < len(recognizer.symbolicNames): name = recognizer.symbolicNames[expectedTokenType] - tokenText = "" + tokenText = u"" current = currentSymbol lookback = recognizer.getTokenStream().LT(-1) if current.type==Token.EOF and lookback is not None: