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

Unified Diff: tools/lexer_generator/automata_test.py

Issue 69293005: Experimental parser: add catch all rule (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
Index: tools/lexer_generator/automata_test.py
diff --git a/tools/lexer_generator/automata_test.py b/tools/lexer_generator/automata_test.py
index d8234b816c16b7b86ffbbae561358d6dbfd57930..230d52ac070f1dadaeec8144f723b566a3916dee 100644
--- a/tools/lexer_generator/automata_test.py
+++ b/tools/lexer_generator/automata_test.py
@@ -104,13 +104,9 @@ class AutomataTestCase(unittest.TestCase):
verify_hit("leftrightleftright", [l, r, l, r])
verify_miss("leftrightleftrightx", [l, r, l, r])
- def test_continue(self):
- graph = NfaBuilder.cat_graphs([
- NfaBuilder.cat_graphs([
- RegexParser.parse("ab"),
- NfaBuilder.add_continue(RegexParser.parse("cd"))]),
- RegexParser.parse("ef")])
- nfa = NfaBuilder().nfa(graph)
- self.assertFalse(nfa.matches(""))
- self.assertTrue(nfa.matches("abcdef"))
- self.assertTrue(nfa.matches("abcdabcdef"))
+ def test_minimization(self):
+ for (regex, matches, not_matches) in self.__test_data:
+ (nfa, dfa) = build_automata(regex)
+ dfa.minimize()
+
+
« src/lexer/lexer_py.re ('K') | « src/lexer/lexer_py.re ('k') | tools/lexer_generator/dfa.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698