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

Unified Diff: tools/lexer_generator/lexer_test.py

Issue 68683007: Parser generator: more layering refactoring (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month 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/generator.py ('k') | tools/lexer_generator/rule_parser.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 a165349547c72b5a7c81886c76bb0ea9593b002c..f2c4159e0b5f948b614e27611393d85b76edec4f 100644
--- a/tools/lexer_generator/lexer_test.py
+++ b/tools/lexer_generator/lexer_test.py
@@ -26,13 +26,14 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import unittest
-from generator import Generator
+from rule_parser import RuleProcessor
class LexerTestCase(unittest.TestCase):
def __verify_action_stream(self, rules, string, expected_stream):
expected_stream.append(('terminate', '\0'))
- for i, (action, start, stop) in enumerate(Generator(rules).lex(string)):
+ rule_processor = RuleProcessor.parse(rules)
+ for i, (action, start, stop) in enumerate(rule_processor.lex(string)):
self.assertEquals(expected_stream[i][0], action)
self.assertEquals(expected_stream[i][1], string[start : stop])
« no previous file with comments | « tools/lexer_generator/generator.py ('k') | tools/lexer_generator/rule_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698