aboutsummaryrefslogtreecommitdiff
path: root/lr-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lr-parser.c')
-rw-r--r--lr-parser.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lr-parser.c b/lr-parser.c
index f7197c5..0d244fd 100644
--- a/lr-parser.c
+++ b/lr-parser.c
@@ -1,8 +1,9 @@
#include <stdio.h>
#include <stdlib.h>
-// TODO: check erros and fail safely and
-// see connection with the lexer
+// TODO: - check erros and fail safely and
+// see connection with the lexer
+// - standardize this
// Requirements
#include "parts/symbol.h"
@@ -86,7 +87,7 @@ enum symbol {
size_t total_symbols = SYMBOLS_END;
-IMPLEMENT_FUNCPTR(int, symbol_is_valid, (symbol s), { return s < SYMBOLS_END; })
+IMPLEMENT_FUNCPTR(int, symbol_is_valid, (symbol s)) { return s < SYMBOLS_END; }
// implement grammar.h
#define PROD(LHS, _, ...) {LHS, (symbol[]){__VA_ARGS__}, sizeof((symbol[]){__VA_ARGS__})/sizeof(symbol)}
@@ -130,7 +131,7 @@ static symbol *tok = toklist;
symbol toklist_eat() { return *(tok++); } // unsafe
symbol toklist_peek() { return *tok; } // unsafe
-int none(int *stack_head) {(void)stack_head; return 0;};
+int none(int *stack_head) {(void)stack_head; return 0;}
semantic_action_fn *semantic_actions = (semantic_action_fn[]){none, none, none, none, none, none, none, none};
int main(void)