summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-10-14 04:21:27 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-10-14 04:21:27 +0000
commit0bb82649ff6ce4a7c7cde745c51a5e3ea61c5b2f (patch)
tree321045b1541f8db5e2a2bcaf4240aa276023555a
parenta682c270da6fe24ed0bf290cb64c1e198ee94a97 (diff)
downloadperl_checker-0bb82649ff6ce4a7c7cde745c51a5e3ea61c5b2f.tar
perl_checker-0bb82649ff6ce4a7c7cde745c51a5e3ea61c5b2f.tar.gz
perl_checker-0bb82649ff6ce4a7c7cde745c51a5e3ea61c5b2f.tar.bz2
perl_checker-0bb82649ff6ce4a7c7cde745c51a5e3ea61c5b2f.tar.xz
perl_checker-0bb82649ff6ce4a7c7cde745c51a5e3ea61c5b2f.zip
"^" has a special meaning in regexps, so escaping it can be necessary
-rw-r--r--perl_checker.src/lexer.mll2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl_checker.src/lexer.mll b/perl_checker.src/lexer.mll
index e21dd32..d87249c 100644
--- a/perl_checker.src/lexer.mll
+++ b/perl_checker.src/lexer.mll
@@ -931,7 +931,7 @@ and re_string_escape = parse
| "x{" [^ '}']* '}' { hex_in_string lexbuf next_rule (skip_n_char_ 2 1 (lexeme lexbuf)) }
| 'x' [^ '{'] _ { hex_in_string lexbuf next_rule (skip_n_char 1 (lexeme lexbuf)) }
| '\n' { die lexbuf "do not use \"\\\" before end-of-line, it's useless and generally bad" }
-| ['r' 'b' 'f' '$' '@' '%' 's' 'S' 'd' 'D' 'w' 'W' 'Q' 'E' 'b' '.' '*' '+' '?' '[' ']' '(' ')' '|' '{' '}' '-' ':'] {
+| ['r' 'b' 'f' '$' '@' '%' 's' 'S' 'd' 'D' 'w' 'W' 'Q' 'E' 'b' '^' '.' '*' '+' '?' '[' ']' '(' ')' '|' '{' '}' '-' ':'] {
next_s ("\\" ^ lexeme lexbuf) (Stack.pop next_rule) lexbuf
}
| _ {