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

Unified Diff: tools/lexer_generator/regex_lexer.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/regex_lexer.py
diff --git a/tools/lexer_generator/regex_lexer.py b/tools/lexer_generator/regex_lexer.py
index ea5b3e06aa254072d95db4bf5ed8243df03928a0..9d1ef3610cb615698cf059afcba6d454cd06f6a7 100644
--- a/tools/lexer_generator/regex_lexer.py
+++ b/tools/lexer_generator/regex_lexer.py
@@ -107,7 +107,7 @@ class RegexLexer:
r'\\\d+'
return t
- __escaped_class_literals = build_escape_map("^[]-:")
+ __escaped_class_literals = build_escape_map("^[]-:\\")
def t_class_ESCAPED_CLASS_LITERAL(self, t):
r'\\.'
@@ -115,7 +115,7 @@ class RegexLexer:
t.value = RegexLexer.__escaped_class_literals[t.value]
return t
- t_class_CLASS_LITERAL = r'[\w $_+]'
+ t_class_CLASS_LITERAL = r'[\w $_+\']'
def t_REPEAT_BEGIN(self, t):
r'\{'

Powered by Google App Engine
This is Rietveld 408576698