Index: tools/lexer_generator/lexer_test.py |
diff --git a/tools/lexer_generator/lexer_test.py b/tools/lexer_generator/lexer_test.py |
index cd65207ce5d26ac867a61656a04224514b219039..861afc0d98363d5b1a99fb0496aca7290ec247a8 100644 |
--- a/tools/lexer_generator/lexer_test.py |
+++ b/tools/lexer_generator/lexer_test.py |
@@ -42,36 +42,39 @@ class LexerTestCase(unittest.TestCase): |
def test_simple(self): |
rules = ''' |
+ eos = [:eos:]; |
<<default>> |
"(" <|LBRACE|> |
")" <|RBRACE|> |
"foo" <|FOO|> |
- eof <|terminate|>''' |
+ eos <|terminate|>''' |
- string = 'foo()\0' |
+ string = 'foo()' |
self.__verify_action_stream(rules, string, |
[('FOO', 'foo'), ('LBRACE', '('), ('RBRACE', ')')]) |
def test_maximal_matching(self): |
rules = ''' |
+ eos = [:eos:]; |
<<default>> |
"<" <|LT|> |
"<<" <|SHL|> |
" " <|SPACE|> |
- eof <|terminate|>''' |
+ eos <|terminate|>''' |
- string = '<< <\0' |
+ string = '<< <' |
self.__verify_action_stream(rules, string, |
[('SHL', '<<'), ('SPACE', ' '), ('LT', '<')]) |
def test_consecutive_epsilon_transitions(self): |
rules = ''' |
+ eos = [:eos:]; |
digit = [0-9]; |
number = (digit+ ("." digit+)?); |
<<default>> |
number <|NUMBER|> |
- eof <|terminate|>''' |
+ eos <|terminate|>''' |
- string = '555\0' |
+ string = '555' |
self.__verify_action_stream(rules, string, [('NUMBER', '555')]) |