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

Unified Diff: tools/lexer_generator/rule_parser.py

Issue 59903027: Experimental parser: more escaping (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/rule_lexer.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/rule_parser.py
diff --git a/tools/lexer_generator/rule_parser.py b/tools/lexer_generator/rule_parser.py
index d6468a027818490a7db88d076c306b45db22971e..2884e3dee552a2d32bd97ae090c70335b96efa55 100644
--- a/tools/lexer_generator/rule_parser.py
+++ b/tools/lexer_generator/rule_parser.py
@@ -169,7 +169,8 @@ class RuleParser:
def p_regex(self, p):
'regex : REGEX'
- p[0] = RegexParser.parse(p[1][1:-1])
+ string = p[1][1:-1].replace("\\/", "/")
+ p[0] = RegexParser.parse(string)
def p_regex_class(self, p):
'regex_class : CHARACTER_CLASS_REGEX'
« no previous file with comments | « tools/lexer_generator/rule_lexer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698