72 |
72 |
73 /*******************************************/ |
73 /*******************************************/ |
74 /* B 1.1 - Letters, digits and identifiers */ |
74 /* B 1.1 - Letters, digits and identifiers */ |
75 /*******************************************/ |
75 /*******************************************/ |
76 // SYM_TOKEN(identifier_c) |
76 // SYM_TOKEN(identifier_c) |
77 /* visitor for identifier_c is necessary because spec_init_sperator_c will be called to analyse PROGRAM identfiers, |
77 /* visitor for identifier_c should no longer be necessary. All references to derived datatypes are now stored in then */ |
78 * which are still transformed into identfier_c, instead of a derived_datatype_identifier_c |
78 /* AST using either poutype_identifier_c or derived_datatype_identifier_c */ |
79 */ |
79 void *spec_init_sperator_c::visit( identifier_c *symbol) { ERROR; return NULL;} /* should never occur */ |
80 void *spec_init_sperator_c::visit( identifier_c *symbol) { |
80 |
81 TRACE("spec_init_sperator_c::identifier_c"); |
81 void *spec_init_sperator_c::visit( poutype_identifier_c *symbol) { |
|
82 TRACE("spec_init_sperator_c::poutype_identifier_c"); |
82 switch (search_what) { |
83 switch (search_what) { |
83 /* if we ever get called sith a simple identifier_c, then it must be a previously declared type... */ |
84 /* if we ever get called sith a simple identifier_c, then it must be a previously declared type... */ |
84 case search_spec: return symbol; |
85 case search_spec: return symbol; |
85 case search_init: return NULL; |
86 case search_init: return NULL; |
86 } |
87 } |
88 return NULL; |
89 return NULL; |
89 } |
90 } |
90 |
91 |
91 |
92 |
92 void *spec_init_sperator_c::visit(derived_datatype_identifier_c *symbol) { |
93 void *spec_init_sperator_c::visit(derived_datatype_identifier_c *symbol) { |
93 TRACE("spec_init_sperator_c::identifier_c"); |
94 TRACE("spec_init_sperator_c::derived_datatype_identifier_c"); |
94 switch (search_what) { |
95 switch (search_what) { |
95 /* if we ever get called sith a simple identifier_c, then it must be a previously declared type... */ |
96 /* if we ever get called sith a simple identifier_c, then it must be a previously declared type... */ |
96 case search_spec: return symbol; |
97 case search_spec: return symbol; |
97 case search_init: return NULL; |
98 case search_init: return NULL; |
98 } |
99 } |