summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser.mly
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-05-26 15:16:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-05-26 15:16:45 +0000
commitbbbd2021a1d23239df6bad78feefd974c8e72a4b (patch)
treee65b0711e3114f33828482f472ed83e9cbf95664 /perl_checker.src/parser.mly
parent6d28f2c186d0b1967b3f25e6933e4a509d59a9a0 (diff)
downloadperl_checker-bbbd2021a1d23239df6bad78feefd974c8e72a4b.tar
perl_checker-bbbd2021a1d23239df6bad78feefd974c8e72a4b.tar.gz
perl_checker-bbbd2021a1d23239df6bad78feefd974c8e72a4b.tar.bz2
perl_checker-bbbd2021a1d23239df6bad78feefd974c8e72a4b.tar.xz
perl_checker-bbbd2021a1d23239df6bad78feefd974c8e72a4b.zip
simplify
Diffstat (limited to 'perl_checker.src/parser.mly')
-rw-r--r--perl_checker.src/parser.mly6
1 files changed, 2 insertions, 4 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly
index a2b3bc1..36d8a74 100644
--- a/perl_checker.src/parser.mly
+++ b/perl_checker.src/parser.mly
@@ -330,10 +330,6 @@ term:
| term ARROW word_or_scalar parenthesized {sp_0($2); sp_0($3); sp_0($4); if $4.any.expr = [] then warn $4.pos "remove these unneeded parentheses"; new_pesp M_unknown P_tok (to_Method_call($1.any.expr, $3.any, $4.any.expr)) $1 $4} /* $foo->bar(list) */
| term ARROW word_or_scalar {sp_0($2); sp_0($3); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, $3.any, [])) $1 $3} /* $foo->bar */
-| term ARROW MULT_L_STR parenthesized {sp_0($2); sp_0($3); sp_0($4); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, "x", get_pos $3), $4.any.expr)) $1 $4} /* $foo->bar(list) */
-| term ARROW MULT_L_STR {sp_0($2); sp_0($3); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, "x", get_pos $3), [])) $1 $3} /* $foo->bar */
-| term ARROW FOR parenthesized {sp_0($2); sp_0($3); sp_0($4); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, $3.any, get_pos $3), $4.any.expr)) $1 $4} /* $foo->bar(list) */
-| term ARROW FOR {sp_0($2); sp_0($3); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, Ident(None, $3.any, get_pos $3), [])) $1 $3} /* $foo->bar */
| NEW word { sp_n($2); new_pesp (M_ref M_unknown) P_call_no_paren (to_Method_call ($2.any, Ident(None, "new", get_pos $1), [])) $1 $2} /* new Class */
| NEW word_paren parenthesized { sp_n($2); sp_0($3); new_pesp (M_ref M_unknown) P_call_no_paren (to_Method_call($2.any, Ident(None, "new", get_pos $1), $3.any.expr)) $1 $3} /* new Class(...) */
@@ -450,6 +446,8 @@ word_or_scalar:
| word {$1}
| scalar {$1}
| word_paren {$1}
+| MULT_L_STR { new_1esp (Ident(None, "x", get_pos $1)) $1 }
+| FOR { new_1esp (Ident(None, $1.any, get_pos $1)) $1 }
bareword:
| NEW { new_1esp (Ident(None, "new", get_pos $1)) $1 }