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

Unified Diff: tools/lexer_generator/automata_test.py

Issue 59953002: Experimental lexer generator: parse {} in regexps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: rebased 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 | « no previous file | tools/lexer_generator/nfa.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/automata_test.py
diff --git a/tools/lexer_generator/automata_test.py b/tools/lexer_generator/automata_test.py
index c5bbb0bd26c2fc7a0fc75ac2ee448e2063dcf7f9..57fc8a00f68151d4a6c5b10118eb2b04faa4ce62 100644
--- a/tools/lexer_generator/automata_test.py
+++ b/tools/lexer_generator/automata_test.py
@@ -55,6 +55,11 @@ class AutomataTestCase(unittest.TestCase):
("a.+b", ["aab", "abb", "acb"], ["aaac", "ab", ""]),
(".|.", ["a", "b"], ["aa", ""]),
("//.", ["//a"], ["aa", ""]),
+ ("[ab]{2}", ["aa", "ab", "ba", "bb"], ["", "a", "b", "aaa", "bbb"]),
+ ("[ab]{2,3}", ["aa", "ab", "ba", "bb", "aab", "baa", "bbb"],
+ ["", "a", "b", "aaaa", "bbba"]),
+ ("[ab]{2,4}", ["aa", "ab", "ba", "bb", "aab", "baa", "bbb", "abab"],
+ ["", "a", "b", "aaaba", "bbbaa"])
]
def test_matches(self):
« no previous file with comments | « no previous file | tools/lexer_generator/nfa.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698