aboutsummaryrefslogtreecommitdiff
path: root/parts/grammar.h
diff options
context:
space:
mode:
Diffstat (limited to 'parts/grammar.h')
-rw-r--r--parts/grammar.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/parts/grammar.h b/parts/grammar.h
index 594e61e..d1bf176 100644
--- a/parts/grammar.h
+++ b/parts/grammar.h
@@ -3,20 +3,10 @@
#include <stddef.h> // size_t
-enum precedence_flag {
- PRECEDENCE_LEFT_ASSOC,
- PRECEDENCE_RIGHT_ASSOC,
- PRECEDENCE_NO_ASSOC,
-};
-
-#define PRECEDENCE_NUM(prec) ((prec) >> 2)
-#define PRECEDENCE_FLAG(prec) ((prec) & 0x3)
-
extern struct production {
symbol LHS;
symbol *RHS;
size_t nRHS;
- unsigned int precedence;
} *grammar;
extern size_t total_productions;
@@ -39,7 +29,7 @@ void grammar_print_cstyle()
printf("{%d, (symbol[]){", grammar[i].LHS);
for(size_t j = 0; j < grammar[i].nRHS; j++)
printf("%d, ", grammar[i].RHS[j]);
- printf("}, %zu, %d},\n", grammar[i].nRHS, grammar[i].precedence);
+ printf("}, %zu},\n", grammar[i].nRHS);
}
}