summaryrefslogtreecommitdiffstats
path: root/src/lexer.mll
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-25 15:16:22 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-25 15:16:22 +0000
commitf37d7371879e2b1e2d923ec12762430b3d1937fc (patch)
tree28155bfc9dca9815ac7e8c7599130a15b1d2cb1b /src/lexer.mll
parentbe4fff49f0164e606d4b2f76f64d4d108895f236 (diff)
downloadperl_checker-f37d7371879e2b1e2d923ec12762430b3d1937fc.tar
perl_checker-f37d7371879e2b1e2d923ec12762430b3d1937fc.tar.gz
perl_checker-f37d7371879e2b1e2d923ec12762430b3d1937fc.tar.bz2
perl_checker-f37d7371879e2b1e2d923ec12762430b3d1937fc.tar.xz
perl_checker-f37d7371879e2b1e2d923ec12762430b3d1937fc.zip
re-sync after the big svn loss1.2.41.2.3
Diffstat (limited to 'src/lexer.mll')
-rw-r--r--src/lexer.mll5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lexer.mll b/src/lexer.mll
index f416499..dfa8561 100644
--- a/src/lexer.mll
+++ b/src/lexer.mll
@@ -78,6 +78,7 @@ let rec concat_bareword_paren accu = function
| PO_COMMENT _ :: _
(* the check will be done on this PO_COMMENT *)
| BAREWORD("N", _) :: PAREN(_) :: _
+ | BAREWORD("P", _) :: PAREN(_) :: _
| BAREWORD("N_", _) :: PAREN(_) :: _ ->
concat_bareword_paren (e :: accu) l
| _ ->
@@ -800,7 +801,7 @@ and string = parse
next string lexbuf
}
| "'" { string_escape_useful := Left true ; next string lexbuf }
-| [^ '\n' '\\' '"' '$' '@']+ { next string lexbuf }
+| [^ '\n' '\\' '"' ''' '$' '@']+ { next string lexbuf }
| eof { die_in_string lexbuf "Unterminated_string" }
and delimited_string = parse
@@ -917,7 +918,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 }
-| ['b' 'f' 'a' 'r'] { 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 }
| ['$' '@' '%' '{' '[' ':'] {
if !string_escape_useful = Left false then string_escape_useful := Right (lexeme_char lexbuf 0) ;
next_s (lexeme lexbuf) (Stack.pop next_rule) lexbuf