| Index: tools/lexer_generator/regex_parser.py
|
| diff --git a/tools/lexer_generator/regex_parser.py b/tools/lexer_generator/regex_parser.py
|
| index e0dc502844d01136b66fd77fadc5144571fd8aaa..2e370371d9489217f57157434a0a03129be8d543 100644
|
| --- a/tools/lexer_generator/regex_parser.py
|
| +++ b/tools/lexer_generator/regex_parser.py
|
| @@ -100,11 +100,15 @@ class RegexParser:
|
| def p_class_content(self, p):
|
| '''class_content : CLASS_LITERAL RANGE CLASS_LITERAL maybe_class_content
|
| | CLASS_LITERAL maybe_class_content
|
| + | CHARACTER_CLASS maybe_class_content
|
| '''
|
| if len(p) == 5:
|
| left = ("RANGE", p[1], p[3])
|
| else:
|
| - left = ('LITERAL', p[1])
|
| + if len(p[1]) == 1:
|
| + left = ('LITERAL', p[1])
|
| + else:
|
| + left = ('CHARACTER_CLASS', p[1:-1])
|
| p[0] = self.__cat(left, p[len(p)-1])
|
|
|
| def p_maybe_class_content(self, p):
|
|
|