Move arglist_len et al to parser_state
[deliverable/binutils-gdb.git] / gdb / m2-exp.y
index 6ba8eaf8554c82ac85f04bac67d7170a83ccaea8..3e4bc07380129b156187e8952019cc66baa9cbde 100644 (file)
@@ -298,11 +298,11 @@ exp     :       exp '['
                         /* This function just saves the number of arguments
                           that follow in the list.  It is *not* specific to
                           function types */
-                        { start_arglist(); }
+                        { pstate->start_arglist(); }
                 non_empty_arglist ']'  %prec DOT
                         { write_exp_elt_opcode (pstate, MULTI_SUBSCRIPT);
                          write_exp_elt_longcst (pstate,
-                                                (LONGEST) end_arglist());
+                                                pstate->end_arglist());
                          write_exp_elt_opcode (pstate, MULTI_SUBSCRIPT); }
         ;
 
@@ -313,11 +313,11 @@ exp       :       exp '[' exp ']'
 exp    :       exp '('
                        /* This is to save the value of arglist_len
                           being accumulated by an outer function call.  */
-                       { start_arglist (); }
+                       { pstate->start_arglist (); }
                arglist ')'     %prec DOT
                        { write_exp_elt_opcode (pstate, OP_FUNCALL);
                          write_exp_elt_longcst (pstate,
-                                                (LONGEST) end_arglist ());
+                                                pstate->end_arglist ());
                          write_exp_elt_opcode (pstate, OP_FUNCALL); }
        ;
 
@@ -325,21 +325,21 @@ arglist   :
        ;
 
 arglist        :       exp
-                       { arglist_len = 1; }
+                       { pstate->arglist_len = 1; }
        ;
 
 arglist        :       arglist ',' exp   %prec ABOVE_COMMA
-                       { arglist_len++; }
+                       { pstate->arglist_len++; }
        ;
 
 non_empty_arglist
         :       exp
-                        { arglist_len = 1; }
+                        { pstate->arglist_len = 1; }
        ;
 
 non_empty_arglist
         :       non_empty_arglist ',' exp %prec ABOVE_COMMA
-                       { arglist_len++; }
+                       { pstate->arglist_len++; }
        ;
 
 /* GDB construct */
This page took 0.024667 seconds and 4 git commands to generate.