Split rank_one_type_parm_complex from rank_one_type
[deliverable/binutils-gdb.git] / gdb / c-exp.y
index 155fe09f37a7dda191ee03ea2912b755f919541d..508e9ef28ddc96267da047e93774518314519686 100644 (file)
@@ -234,7 +234,7 @@ static void c_print_token (FILE *file, int type, YYSTYPE value);
    legal basetypes.  */
 %token SIGNED_KEYWORD LONG SHORT INT_KEYWORD CONST_KEYWORD VOLATILE_KEYWORD DOUBLE_KEYWORD
 
-%token <sval> VARIABLE
+%token <sval> DOLLAR_VARIABLE
 
 %token <opcode> ASSIGN_MODIFY
 
@@ -798,7 +798,7 @@ exp :       FLOAT
 exp    :       variable
        ;
 
-exp    :       VARIABLE
+exp    :       DOLLAR_VARIABLE
                        {
                          write_dollar_variable (pstate, $1);
                        }
@@ -1215,12 +1215,14 @@ direct_abs_decl: '(' abs_decl ')'
                          push_type_int ($2);
                          push_type (tp_array);
                          $$ = get_type_stack ();
+                         cpstate->type_stacks.emplace_back ($$);
                        }
        |       array_mod
                        {
                          push_type_int ($1);
                          push_type (tp_array);
                          $$ = get_type_stack ();
+                         cpstate->type_stacks.emplace_back ($$);
                        }
 
        |       direct_abs_decl func_mod
@@ -1228,11 +1230,13 @@ direct_abs_decl: '(' abs_decl ')'
                          push_type_stack ($1);
                          push_typelist ($2);
                          $$ = get_type_stack ();
+                         cpstate->type_stacks.emplace_back ($$);
                        }
        |       func_mod
                        {
                          push_typelist ($1);
                          $$ = get_type_stack ();
+                         cpstate->type_stacks.emplace_back ($$);
                        }
        ;
 
@@ -2884,7 +2888,7 @@ lex_one_token (struct parser_state *par_state, bool *is_quoted_name)
       }
 
   if (*tokstart == '$')
-    return VARIABLE;
+    return DOLLAR_VARIABLE;
 
   if (parse_completion && *lexptr == '\0')
     saw_name_at_eof = 1;
@@ -3337,7 +3341,7 @@ c_print_token (FILE *file, int type, YYSTYPE value)
       break;
 
     case NSSTRING:
-    case VARIABLE:
+    case DOLLAR_VARIABLE:
       parser_fprintf (file, "sval<%s>", copy_name (value.sval));
       break;
 
This page took 0.025279 seconds and 4 git commands to generate.