@@ -28,8 +28,8 @@ Author: Daniel Kroening, kroening@cs.cmu.edu
2828#define mts (x, y ) stack_expr(x).move_to_sub((irept &)stack_expr(y))
2929#define swapop (x, y ) stack_expr(x).operands().swap(stack_expr(y).operands())
3030#define addswap (x, y, z ) stack_expr(x).add(y).swap(stack_expr(z))
31- #define push_scope (x, y ) PARSER.push_scope(x, y)
32- #define pop_scope () PARSER.pop_scope();
31+ #define push_scope (x, y ) PARSER.scopes. push_scope(x, y)
32+ #define pop_scope () PARSER.scopes. pop_scope();
3333
3434int yyveriloglex ();
3535extern char *yyverilogtext;
@@ -1442,7 +1442,7 @@ net_declaration:
14421442type_declaration:
14431443 TOK_TYPEDEF data_type new_identifier ' ;'
14441444 { // add to the scope as a type name
1445- auto &name = PARSER.add_name (stack_expr ($3 ).get (ID_identifier), " " );
1445+ auto &name = PARSER.scopes . add_name (stack_expr ($3 ).get (ID_identifier), " " );
14461446 name.is_type = true ;
14471447
14481448 init ($$, ID_decl);
@@ -1535,7 +1535,7 @@ data_type:
15351535
15361536 // We attach a dummy id to distinguish two syntactically
15371537 // identical enum types.
1538- auto id = PARSER.current_scope ->prefix + " enum-" + PARSER.get_next_id ();
1538+ auto id = PARSER.scopes . current_scope ->prefix + " enum-" + PARSER.get_next_id ();
15391539 stack_expr ($$).set (ID_identifier, id);
15401540 }
15411541 | TOK_STRING
@@ -1569,7 +1569,7 @@ enum_name_declaration:
15691569 TOK_NON_TYPE_IDENTIFIER enum_name_value_opt
15701570 {
15711571 init ($$);
1572- auto &scope = PARSER.add_name (stack_expr ($1 ).id (), " " );
1572+ auto &scope = PARSER.scopes . add_name (stack_expr ($1 ).id (), " " );
15731573 stack_expr ($$).set (ID_base_name, scope.base_name ());
15741574 stack_expr ($$).set (ID_identifier, scope.identifier ());
15751575 stack_expr ($$).add (ID_value).swap (stack_expr ($2 ));
@@ -4426,7 +4426,7 @@ type_identifier: TOK_TYPE_IDENTIFIER
44264426 init ($$, ID_typedef_type);
44274427 auto base_name = stack_expr ($1 ).id ();
44284428 stack_expr ($$).set (ID_base_name, base_name);
4429- stack_expr ($$).set (ID_identifier, PARSER.current_scope ->prefix +id2string (base_name));
4429+ stack_expr ($$).set (ID_identifier, PARSER.scopes . current_scope ->prefix +id2string (base_name));
44304430 }
44314431 ;
44324432
0 commit comments