diff options
Diffstat (limited to 'gdb/f-exp.y')
-rw-r--r-- | gdb/f-exp.y | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/gdb/f-exp.y b/gdb/f-exp.y index 0deb81682c2..4e1f6359e2e 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -283,18 +283,39 @@ arglist : exp { arglist_len = 1; } ; -arglist : substring - { arglist_len = 2;} +arglist : subrange + { arglist_len = 1; } ; arglist : arglist ',' exp %prec ABOVE_COMMA { arglist_len++; } ; -substring: exp ':' exp %prec ABOVE_COMMA - { } +/* There are four sorts of subrange types in F90. */ + +subrange: exp ':' exp %prec ABOVE_COMMA + { write_exp_elt_opcode (OP_F90_RANGE); + write_exp_elt_longcst (NONE_BOUND_DEFAULT); + write_exp_elt_opcode (OP_F90_RANGE); } + ; + +subrange: exp ':' %prec ABOVE_COMMA + { write_exp_elt_opcode (OP_F90_RANGE); + write_exp_elt_longcst (HIGH_BOUND_DEFAULT); + write_exp_elt_opcode (OP_F90_RANGE); } ; +subrange: ':' exp %prec ABOVE_COMMA + { write_exp_elt_opcode (OP_F90_RANGE); + write_exp_elt_longcst (LOW_BOUND_DEFAULT); + write_exp_elt_opcode (OP_F90_RANGE); } + ; + +subrange: ':' %prec ABOVE_COMMA + { write_exp_elt_opcode (OP_F90_RANGE); + write_exp_elt_longcst (BOTH_BOUND_DEFAULT); + write_exp_elt_opcode (OP_F90_RANGE); } + ; complexnum: exp ',' exp { } |