#define DD
-static void check_gen(struct symbol *tab, char *ident, short type);
-
struct symbol *new_tab(void)
{
return SYMNULL;
return tab;
}
-void check_variable(struct symbol *tab, char *ident)
-{
- check_gen(tab, ident, S_VAR);
-}
-
-void check_field(struct symbol *tab, char *ident)
-{
- check_gen(tab, ident, S_FIELD);
-}
-
-static void check_gen(struct symbol *tab, char *ident, short type)
+void check(struct symbol *tab, char *ident, short type)
{
- struct symbol *elm = tab_lookup(tab, ident, type);
+ struct symbol *elm;
#ifdef DD
- printf("check_variable: tab(%08X), ident(%s), type(%i), elm(%08X)\n", tab, ident, type, elm);
+ printf("check: tab(%08X), ident(%s), type(%i), elm(%08X)\n", tab, ident, type, elm);
#endif
+
+ if(type == S_VAR) {
+ elm = tab_lookup(tab, ident, type);
+ if(elm != SYMNULL) {
+ return;
+ }
+ }
+
+ elm = tab_lookup(tab, ident, S_FIELD);
if(elm == SYMNULL) {
fprintf(stderr, "Unbekannter Identifier: \"%s\"\n", ident);
exit(3);