Loading...
Searching...
No Matches
Go to the documentation of this file.
29#define PREFIX_TK(tk) tk
34#define PREFIX_NT(nt) nt
37#ifndef POSTFIX_NT_REST
39#define POSTFIX_NT_REST(nt) nt ## _REST
52#define SEOB { .ty = CFG_SENTINEL, .id = EOB }
58#define SEOC { { .ty = CFG_SENTINEL, .id = EOC } }
61#define TK(tk) { .ty = CFG_TOKEN, .id = PREFIX_TK(tk) }
63#define NT(nt) { .ty = CFG_NONTERMINAL, .id = PREFIX_NT(nt) }
72#define r(...) { { __VA_ARGS__ SEOB }, SEOC }
88#define rrr(head, listelem, delim) \
89 { { listelem, NT(POSTFIX_NT_REST(head)), SEOB }, SEOC }, \
90 { { delim, NT(head), SEOB }, { SEOB }, SEOC }
99#define ropt(...) { { __VA_ARGS__, SEOB }, { SEOB }, SEOC }
106#define alt SEOB, }, {