diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-12-16 20:51:16 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-12-16 20:51:16 +0000 |
commit | eeae1777de99aab24481fa9bfcbae242f6da3595 (patch) | |
tree | b443e7dbe2fcaf8170ef29211b1e3f27a91057f6 /perl_checker.src/lexer.mll | |
parent | 0621550fe65012c5fd410a2361cc1ee3fabf5255 (diff) | |
download | perl_checker-eeae1777de99aab24481fa9bfcbae242f6da3595.tar perl_checker-eeae1777de99aab24481fa9bfcbae242f6da3595.tar.gz perl_checker-eeae1777de99aab24481fa9bfcbae242f6da3595.tar.bz2 perl_checker-eeae1777de99aab24481fa9bfcbae242f6da3595.tar.xz perl_checker-eeae1777de99aab24481fa9bfcbae242f6da3595.zip |
"@hash{@l}" is ''. @hash{@l} .'', and not ''. @hash .'{'. @l .'}'
Diffstat (limited to 'perl_checker.src/lexer.mll')
-rw-r--r-- | perl_checker.src/lexer.mll | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/perl_checker.src/lexer.mll b/perl_checker.src/lexer.mll index 981e245..225d21a 100644 --- a/perl_checker.src/lexer.mll +++ b/perl_checker.src/lexer.mll @@ -390,6 +390,8 @@ let ident_start = ['a'-'z' 'A'-'Z' '_'] let ident = ident_start ['0'-'9' 'A'-'Z' 'a'-'z' '_'] * let pattern_separator = [ '/' '!' ',' '|' '@' ] +let in_string_expr = (ident | (ident? ("::" ident)+)) "->"? (('{' [^ '{' '}' '\n']* '}') | ('[' [^ '[' ']' '\n']* ']'))* + rule token = parse | [' ' '\t']+ { (* propagate not_ok_for_match when it was set by the previous token *) @@ -887,7 +889,7 @@ and string_interpolate_scalar = parse | '$' ident | ['0'-'9'] | '{' [^ '{' '}']* '}' -| (ident | (ident? ("::" ident)+)) "->"? (('{' [^ '{' '}' '\n']* '}') | ('[' [^ '[' ']' '\n']* ']'))* +| in_string_expr | [^ '{' '}' ' ' '\n' '"'] { (* eg: $! $$ *) string_interpolate token "$" lexbuf } @@ -926,7 +928,7 @@ and delimited_string_interpolate_scalar = parse (* needed for delimited string l and string_interpolate_array = parse | '$' ident | '{' [^ '{' '}']* '}' -| (ident | (ident? ("::" ident)+)) { string_interpolate token "@" lexbuf } +| in_string_expr { string_interpolate token "@" lexbuf } | [ '@' '*' '<' '>' ']' '.' '(' ' ' ] { next_s ("@" ^ lexeme lexbuf) (Stack.pop next_rule) lexbuf } | '"' { putback lexbuf 1; next_s "@" (Stack.pop next_rule) lexbuf } @@ -936,7 +938,8 @@ and string_interpolate_array = parse and delimited_string_interpolate_array = parse | '$' ident | '{' [^ '{' '}']* '}' -| (ident | (ident? ("::" ident)+)) { string_interpolate token "@" lexbuf } +| in_string_expr + { string_interpolate token "@" lexbuf } | [ '@' '*' '<' '>' ']' '.' '(' ' ' ] { next_s ("@" ^ lexeme lexbuf) (Stack.pop next_rule) lexbuf } | eof { next_s "@" (Stack.pop next_rule) lexbuf } |