From 8ac88c348b95a04279f79e6828c2163921da476b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 19 Aug 2003 18:58:03 +0000 Subject: you can't replace \[ with [ in "$foo[0]" otherwise the meaning is really different! --- perl_checker.src/lexer.mll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl_checker.src') diff --git a/perl_checker.src/lexer.mll b/perl_checker.src/lexer.mll index 9edf77b..eb43d42 100644 --- a/perl_checker.src/lexer.mll +++ b/perl_checker.src/lexer.mll @@ -793,7 +793,7 @@ and 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" } -| ['b' 'f' '$' '@' '%' 'a' 'r' '{'] { next_s ("\\" ^ lexeme lexbuf) (Stack.pop next_rule) lexbuf } +| ['b' 'f' '$' '@' '%' 'a' 'r' '{' '['] { next_s ("\\" ^ lexeme lexbuf) (Stack.pop next_rule) lexbuf } | _ { let c = lexeme lexbuf in (match !string_escape_kind with -- cgit v1.2.1