aboutsummaryrefslogtreecommitdiff
path: root/parts/table.h
diff options
context:
space:
mode:
authorkartofen <kartofen.mail.0@protonmail.com>2025-07-20 01:32:24 +0300
committerkartofen <kartofen.mail.0@protonmail.com>2025-07-20 01:32:24 +0300
commit34357640c0676f33ad13aac1fe28effc6f6e47c7 (patch)
treed656ee61da7d7a0b133aa57311266653ef100569 /parts/table.h
parent174e9b35ce3b6e99e500907f1bb24c6f31f481bf (diff)
start of grammar parsing
Diffstat (limited to 'parts/table.h')
-rw-r--r--parts/table.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/parts/table.h b/parts/table.h
index efd19bb..c60ad4f 100644
--- a/parts/table.h
+++ b/parts/table.h
@@ -2,7 +2,7 @@
#define TABLE_H
#include <stddef.h> // size_t
-#include "util/util.h"
+#include "util/util.h" // X_TO_...
#define ACTION_TYPE(X) \
X(ACTION_NOT_SET) \
@@ -28,7 +28,7 @@ extern void (*table_free)();
void table_print();
void table_print_cstyle();
-int table_insert(size_t state, symbol sym, struct action a); // should it be here??
+int table_insert(size_t state, symbol sym, struct action a); // should this be here??
#include "symbol.h"
@@ -103,7 +103,7 @@ int table_insert(size_t state, symbol sym, struct action a)
if(prec_num(tbl_a) > prec_num(new_a)) set_tbl_a = 0;
else if(prec_num(tbl_a) < prec_num(new_a)) set_tbl_a = 1;
else { report = 1;
- if(new_a->arg > tbl_a->arg) set_tbl_a = 1;
+ if(new_a->arg < tbl_a->arg) set_tbl_a = 1;
}
} else if(shift_reduce) {
int favor_shift = 0;