summaryrefslogtreecommitdiffstats
path: root/src/lexer.mll
diff options
context:
space:
mode:
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