Reviewers: marja,
Message:
Committed patchset #1 manually as r17813 (presubmit successful).
Description:
Experimental parser: handle hex escapes in strings
[email protected]
BUG=
Committed: https://code.google.com/p/v8/source/detail?r=17813
Please review this at https://codereview.chromium.org/59823005/
SVN Base: https://v8.googlecode.com/svn/branches/experimental/parser
Affected files (+4, -2 lines):
M src/lexer/lexer_py.re
Index: src/lexer/lexer_py.re
diff --git a/src/lexer/lexer_py.re b/src/lexer/lexer_py.re
index
c601ea3313dde5fe048c47ad4bdc7b6e118e069d..8afbf9ab8507a538b97419e8dc6f347ae569ce80
100644
--- a/src/lexer/lexer_py.re
+++ b/src/lexer/lexer_py.re
@@ -200,7 +200,8 @@ default_action <push_token(ILLEGAL)>
<<DoubleQuoteString>>
/\\\n\r?/ <||continue>
/\\\r\n?/ <||continue>
-/\\./ <||continue>
+/\\[xX][:hex_digit:]{2}/ <||continue>
+/\\[^xX\r\n]/ <||continue>
/\n|\r/ <|push_token(ILLEGAL)|>
"\"" <|push_token(STRING)|>
eof <|terminate_illegal|>
@@ -209,7 +210,8 @@ catch_all <||continue>
<<SingleQuoteString>>
/\\\n\r?/ <||continue>
/\\\r\n?/ <||continue>
-/\\./ <||continue>
+/\\[xX][:hex_digit:]{2}/ <||continue>
+/\\[^xX\r\n]/ <||continue>
/\n|\r/ <|push_token(ILLEGAL)|>
"'" <|push_token(STRING)|>
eof <|terminate_illegal|>
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.