aboutsummaryrefslogtreecommitdiff
path: root/demos/instant-parser.c
diff options
context:
space:
mode:
authorkartofen <kartofen.mail.0@protonmail.com>2025-07-06 21:18:28 +0300
committerkartofen <kartofen.mail.0@protonmail.com>2025-07-06 21:18:28 +0300
commit653d4b248e18f71eebea57cb39895fdb68f5c885 (patch)
tree3b86e7afe5d16899d691122c3271944dc41d324e /demos/instant-parser.c
parente37eccfabbc5c626791e9698cc6c5fb1ec335625 (diff)
modular table building
Diffstat (limited to 'demos/instant-parser.c')
-rw-r--r--demos/instant-parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/demos/instant-parser.c b/demos/instant-parser.c
index 57d1f2f..06990f6 100644
--- a/demos/instant-parser.c
+++ b/demos/instant-parser.c
@@ -16,9 +16,9 @@ enum symbol {
size_t total_symbols = SYMBOLS_END;
-IMPLEMENT_FUNCPTR(int, symbol_is_terminal, (symbol s), { return s < EP; })
-IMPLEMENT_FUNCPTR(int, symbol_is_input_end, (symbol s), { return s == END_INPUT; })
-IMPLEMENT_FUNCPTR(int, symbol_is_valid,(symbol s), { return s < SYMBOLS_END; })
+IMPLEMENT_FUNCPTR(int, symbol_is_terminal, (symbol s)) { return s < EP; }
+IMPLEMENT_FUNCPTR(int, symbol_is_input_end, (symbol s)) { return s == END_INPUT; }
+IMPLEMENT_FUNCPTR(int, symbol_is_valid,(symbol s)) { return s < SYMBOLS_END; }
#include "parts/grammar.h"
#define PROD(LHS, _, ...) {LHS, (symbol[]){__VA_ARGS__}, sizeof((symbol[]){__VA_ARGS__})/sizeof(symbol)}