Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Unified Diff: tools/lexer_generator/lexer_test.py

Issue 144603003: Experimental parser: better eos handling (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/lexer_generator/code_generator_test.py ('k') | tools/lexer_generator/nfa_builder.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/lexer_test.py
diff --git a/tools/lexer_generator/lexer_test.py b/tools/lexer_generator/lexer_test.py
index 3c76270fca768d950e697a710b997275f23b479e..7b90c6f71f03fa4b5877dfbdf59949cf3ad89599 100644
--- a/tools/lexer_generator/lexer_test.py
+++ b/tools/lexer_generator/lexer_test.py
@@ -48,13 +48,12 @@ class LexerTestCase(unittest.TestCase):
def test_simple(self):
rules = '''
- eos = [:eos:];
<<default>>
"(" <|LBRACE|>
")" <|RBRACE|>
"foo" <|FOO|>
- eos <|terminate|>'''
+ eos <terminate>'''
string = 'foo()'
self.__verify_action_stream(rules, string,
@@ -62,12 +61,11 @@ class LexerTestCase(unittest.TestCase):
def test_maximal_matching(self):
rules = '''
- eos = [:eos:];
<<default>>
"<" <|LT|>
"<<" <|SHL|>
" " <|SPACE|>
- eos <|terminate|>'''
+ eos <terminate>'''
string = '<< <'
self.__verify_action_stream(rules, string,
@@ -75,7 +73,6 @@ class LexerTestCase(unittest.TestCase):
def test_consecutive_epsilon_transitions(self):
rules = '''
- eos = [:eos:];
digit = [0-9];
number = (digit+ ("." digit+)?);
<<default>>
« no previous file with comments | « tools/lexer_generator/code_generator_test.py ('k') | tools/lexer_generator/nfa_builder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698