diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-12-04 14:21:51 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-12-04 14:21:51 +0000 |
commit | 8f48fd94bf41b4c062db2a32803c4abd22b81a33 (patch) | |
tree | f0caa15d4584f677dcb9437214574e9cf350b97c /perl_checker.src/parser.mly | |
parent | a329f0c34eb3f9ec1ed4f699c2962ef1cc379a8a (diff) | |
download | perl-MDK-Common-8f48fd94bf41b4c062db2a32803c4abd22b81a33.tar perl-MDK-Common-8f48fd94bf41b4c062db2a32803c4abd22b81a33.tar.gz perl-MDK-Common-8f48fd94bf41b4c062db2a32803c4abd22b81a33.tar.bz2 perl-MDK-Common-8f48fd94bf41b4c062db2a32803c4abd22b81a33.tar.xz perl-MDK-Common-8f48fd94bf41b4c062db2a32803c4abd22b81a33.zip |
more restricted detection of non-use of if_()-like exprs
Diffstat (limited to 'perl_checker.src/parser.mly')
-rw-r--r-- | perl_checker.src/parser.mly | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly index 45c0db8..364ab5a 100644 --- a/perl_checker.src/parser.mly +++ b/perl_checker.src/parser.mly @@ -233,10 +233,10 @@ term: | term PATTERN_MATCH_NOT STRING {die_with_rawpos (sndsnd $3) "use a regexp, not a string"} -| term QUESTION_MARK term COLON term {sp_p($2); sp_p($3); sp_p($4); sp_p($5); check_ternary_paras $3 $5; to_Call_op_(P_ternary, "?:", [ prio_lo P_ternary $1 ; prio_lo_after P_ternary $3; prio_lo_after P_ternary $5]) (sp_pos_range $1 $5)} -| term QUESTION_MARK term COLON BRACKET expr BRACKET_END {sp_p($2); sp_p($3); check_ternary_para $3; sp_p($4); sp_p($5); sp_p($6); sp_p($7); check_ternary_para $1; to_Call_op_(P_ternary, "?:", [ prio_lo P_ternary $1 ; prio_lo_after P_ternary $3; Ref(I_hash, sndfst $6)]) (sp_pos_range $1 $7)} -| term QUESTION_MARK BRACKET expr BRACKET_END COLON term {sp_p($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); sp_p($7); check_ternary_para $7; to_Call_op_(P_ternary, "?:", [ prio_lo P_ternary $1 ; Ref(I_hash, sndfst $4); prio_lo_after P_ternary $7]) (sp_pos_range $1 $7)} -| term QUESTION_MARK BRACKET expr BRACKET_END COLON BRACKET expr BRACKET_END {sp_p($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); sp_p($7); sp_p($8); sp_p($9); to_Call_op_(P_ternary, "?:", [ prio_lo P_ternary $1 ; Ref(I_hash, sndfst $4); Ref(I_hash, sndfst $8)]) (sp_pos_range $1 $9)} +| term QUESTION_MARK term COLON term {sp_p($2); sp_p($3); sp_p($4); sp_p($5); to_Call_op_(P_ternary, "?:", check_ternary_paras(prio_lo P_ternary $1, prio_lo_after P_ternary $3, prio_lo_after P_ternary $5)) (sp_pos_range $1 $5)} +| term QUESTION_MARK term COLON BRACKET expr BRACKET_END {sp_p($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); sp_p($7); to_Call_op_(P_ternary, "?:", check_ternary_paras(prio_lo P_ternary $1, prio_lo_after P_ternary $3, Ref(I_hash, sndfst $6))) (sp_pos_range $1 $7)} +| term QUESTION_MARK BRACKET expr BRACKET_END COLON term {sp_p($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); sp_p($7); to_Call_op_(P_ternary, "?:", check_ternary_paras(prio_lo P_ternary $1, Ref(I_hash, sndfst $4), prio_lo_after P_ternary $7)) (sp_pos_range $1 $7)} +| term QUESTION_MARK BRACKET expr BRACKET_END COLON BRACKET expr BRACKET_END {sp_p($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); sp_p($7); sp_p($8); sp_p($9); to_Call_op_(P_ternary, "?:", check_ternary_paras(prio_lo P_ternary $1, Ref(I_hash, sndfst $4), Ref(I_hash, sndfst $8))) (sp_pos_range $1 $9)} /* Unary operators and terms */ |