summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-13 23:05:12 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-13 23:05:12 +0000
commit4679d353f5d9d8a1d309473e6c0bf8bc2bfc8f48 (patch)
tree3f856150b0859415ac046179085a75e5d2c7e29d
parentc27713a0e529dbac9468aa4a5561585a86e19942 (diff)
downloadperl_checker-4679d353f5d9d8a1d309473e6c0bf8bc2bfc8f48.tar
perl_checker-4679d353f5d9d8a1d309473e6c0bf8bc2bfc8f48.tar.gz
perl_checker-4679d353f5d9d8a1d309473e6c0bf8bc2bfc8f48.tar.bz2
perl_checker-4679d353f5d9d8a1d309473e6c0bf8bc2bfc8f48.tar.xz
perl_checker-4679d353f5d9d8a1d309473e6c0bf8bc2bfc8f48.zip
recognize \E, \L, \u, \U in regexpes
-rw-r--r--NEWS1
-rw-r--r--src/lexer.mll2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 7c0fb72..67651ea 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- recognize /r modifier for regexpes
+- recognize \E, \L, \u, \U in regexpes
Version 1.2.23 - 04 October 2012, by Thierry Vignaud
diff --git a/src/lexer.mll b/src/lexer.mll
index d4fc3d5..ee58a7d 100644
--- a/src/lexer.mll
+++ b/src/lexer.mll
@@ -919,7 +919,7 @@ and string_escape = parse
| 'Q' {
warn [Warn_complex_expressions] lexbuf ("don't use \\Q, use quotemeta instead");
string_escape_useful := Left true; next_s ("\\" ^ lexeme lexbuf) (Stack.pop next_rule) lexbuf }
-| ['a' 'c' 'b' 'f' 'l' 'r'] { string_escape_useful := Left true; next_s ("\\" ^ lexeme lexbuf) (Stack.pop next_rule) lexbuf }
+| ['a' 'c' 'b' 'E' 'f' 'l' 'L' 'r' 'u' 'U'] { string_escape_useful := Left true; next_s ("\\" ^ lexeme lexbuf) (Stack.pop next_rule) lexbuf }
| ['$' '@' '%' '{' '[' ':'] {
if !string_escape_useful = Left false then string_escape_useful := Right (lexeme_char lexbuf 0) ;
next_s (lexeme lexbuf) (Stack.pop next_rule) lexbuf