codea: parameteranzahl wird durchgereicht und ggf. geprueft wenn die eingabe nicht...
[uebersetzerbau-ss10.git] / codea / symtable.c
index 5476ae8243fb71637f0ae3f6e73b70cafecdcc1f..dc11f878318a6c4cc56450778a6ad93ca2d62a19 100755 (executable)
@@ -35,6 +35,11 @@ struct symbol *tab_add_symbol(struct symbol *tab, char *ident, short type, short
        fprintf(stderr, "tab_add_symbol: tab(%08X), ident(%s), type(%i), check(%i), param_index(%i)\n", tab, ident, type, check, param_index);
 #endif
 
+       if(param_index >= 6) {
+               fprintf(stderr, "eine methode hat zu viele parameter (max. 6 inkl. this erlaubt)\n");
+               exit(4);
+       }
+
        if(tab_lookup(tab, ident, type) != SYMNULL) {
                if(check) {
                        fprintf(stderr, "Identifier doppelt vorhanden: \"%s\"\n", ident);