struct boolexpr *rtn;
rtn = malloc(sizeof(struct boolexpr));
rtn->overusage = 0;
- rtn->id = symlist_id(sl, sym->name);
- if (rtn->id != 0)
- rtn->type = BT_SYM;
- else
- rtn->type = BT_FALSE;
+ if (!strcmp(sym->name, "m") || !strcmp(sym->name, "n")) {
+ rtn->type = BT_FALSE;
+ } else if (!strcmp(sym->name, "y")) {
+ rtn->type = BT_TRUE;
+ } else {
+ rtn->id = symlist_id(sl, sym->name);
+ if (rtn->id != 0)
+ rtn->type = BT_SYM;
+ else
+ rtn->type = BT_FALSE;
+ }
return rtn;
}
fprintf(frules, "\n");
}
+// Functions for variable_count
void output_write_variable_count(char *var_file, int count) {
FILE *f;
f = fopen(var_file, "w");
// Functions for variable_count
void output_write_variable_count(char *var_file, int count);
+
#endif /* _OUTPUT_H_ */
}
void symlist_closesym(struct symlist *sl) {
- sl->lastsym = (unsigned) sl->pos;
+ sl->lastsym = (unsigned) sl->pos + 1;
}
unsigned symlist_adddummy(struct symlist *sl) {