summaryrefslogtreecommitdiffstats
path: root/perl_checker.src
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-13 14:40:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-13 14:40:34 +0000
commit2c8b3f3ee3e78fcbd6e62fed4548a5841f97d279 (patch)
tree3b3c782b9d17e91c6f8ecae8feba35673ca4e051 /perl_checker.src
parentb3d13245b5fb1834971bbb315830af27a438d114 (diff)
downloadperl_checker-2c8b3f3ee3e78fcbd6e62fed4548a5841f97d279.tar
perl_checker-2c8b3f3ee3e78fcbd6e62fed4548a5841f97d279.tar.gz
perl_checker-2c8b3f3ee3e78fcbd6e62fed4548a5841f97d279.tar.bz2
perl_checker-2c8b3f3ee3e78fcbd6e62fed4548a5841f97d279.tar.xz
perl_checker-2c8b3f3ee3e78fcbd6e62fed4548a5841f97d279.zip
*** empty log message ***
Diffstat (limited to 'perl_checker.src')
-rw-r--r--perl_checker.src/lexer.mll2
-rw-r--r--perl_checker.src/parser.mly1
2 files changed, 2 insertions, 1 deletions
diff --git a/perl_checker.src/lexer.mll b/perl_checker.src/lexer.mll
index 8450aa9..d25e63c 100644
--- a/perl_checker.src/lexer.mll
+++ b/perl_checker.src/lexer.mll
@@ -490,7 +490,7 @@ rule token = parse
| "\\" ' '* '('
{ putback lexbuf 1; REF(pos lexbuf) }
-| "sub" ' '+ ident ' '* '(' [ '$' '@' '\\' '&' ';' ]* ')' {
+| "sub" ' '+ ident ' '* '(' [ '$' '@' '\\' '&' ';' '%' ]* ')' {
(* bloody prototypes, must be caught especially otherwise "($)" is badly tokenized *)
(* and alas "($@)" is both valid as an expression and a prototype *)
let s = lexeme lexbuf in
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly
index dfbbd2f..20d9229 100644
--- a/perl_checker.src/parser.mly
+++ b/perl_checker.src/parser.mly
@@ -257,6 +257,7 @@ term:
| PRINT { Call_op("print", var_STDOUT :: [ var_dollar_ ]), snd $1 }
| PRINT argexpr {check_parenthesized_first_argexpr (fst $1) $2; Call_op("print", var_STDOUT :: fst $2), snd $1 }
+| PRINT_TO_STAR { Call_op("print", Deref(I_star, Ident(None, fst $1, get_pos $1)) :: [ var_dollar_ ]), snd $1 }
| PRINT_TO_STAR argexpr { Call_op("print", Deref(I_star, Ident(None, fst $1, get_pos $1)) :: fst $2), snd $1 }
| PRINT_TO_SCALAR { Call_op("print", var_STDOUT :: [ Deref(I_scalar, Ident(None, fst $1, get_pos $1)) ]), snd $1 }
| PRINT_TO_SCALAR argexpr { Call_op("print", Deref(I_scalar, Ident(None, fst $1, get_pos $1)) :: fst $2), snd $1 }