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

Unified Diff: tools/lexer_generator/test/automata_test.py

Issue 169523003: Experimental parser: split and rename some files (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 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/term.py ('k') | tools/lexer_generator/test/rule_parser_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/test/automata_test.py
diff --git a/tools/lexer_generator/test/automata_test.py b/tools/lexer_generator/test/automata_test.py
index 8278480ea7a69eb76151fcba5593b181173b8f6d..68bd9420677366c22f1de28386f185fe5ee047be 100644
--- a/tools/lexer_generator/test/automata_test.py
+++ b/tools/lexer_generator/test/automata_test.py
@@ -29,9 +29,10 @@ import unittest
from lexer_generator.dot_utilities import *
from lexer_generator.automaton import Action
from lexer_generator.regex_parser import RegexParser
-from lexer_generator.transition_keys import TransitionKey, KeyEncoding
+from lexer_generator.transition_key import TransitionKey, KeyEncoding
from lexer_generator.nfa_builder import NfaBuilder
from lexer_generator.dfa import Dfa
+from lexer_generator.dfa_minimizer import DfaMinimizer
class AutomataTestCase(unittest.TestCase):
@@ -44,7 +45,7 @@ class AutomataTestCase(unittest.TestCase):
nfa = NfaBuilder.nfa(encoding, {}, trees, 'main')
(start_name, dfa_nodes) = nfa.compute_dfa()
dfa = Dfa(encoding, start_name, dfa_nodes)
- return (nfa, dfa, dfa.minimize())
+ return (nfa, dfa, DfaMinimizer(dfa).minimize())
# (pattern, should match, should not match)
__test_data = [
@@ -102,5 +103,5 @@ class AutomataTestCase(unittest.TestCase):
mapping['S_2']['transitions'][key_c] = 'S_3'
mapping['S_3']['terminal'] = True
- mdfa = Dfa(encoding, 'S_0', mapping).minimize()
+ mdfa = DfaMinimizer(Dfa(encoding, 'S_0', mapping)).minimize()
self.assertEqual(3, mdfa.node_count())
« no previous file with comments | « tools/lexer_generator/term.py ('k') | tools/lexer_generator/test/rule_parser_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698