How are we going to do this?

This commit is contained in:
Neil 2022-12-28 11:27:01 -08:00
parent af7678e802
commit 9a0a8ae809

View File

@ -3,6 +3,11 @@
Lexer for journal entries. Lexer for journal entries.
"^[edict: expect; there; to; be; args] Something.\n"
"^[<num>] Something.\n"
"<num>+.<num>{2}(<num>)$"
"<bookref> -- \"*\n"
@std C89/90 */ @std C89/90 */
#include "../src/lex.h" #include "../src/lex.h"
@ -12,17 +17,13 @@
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>
/* This defines `enum condition`. */ /* This defines `enum condition`. */
/*!types:re2c*/ /*!types:re2c*/
/* "[edict: expect; there; to; be; args]", in this case, expect would be a /* In this case, expect
stack of `size = 5` `EXPECT_KEYWORD`. This mirrors arguments in `LEX_SYMBOL` would be a stack of `size = 5` `EXPECT_KEYWORD`. This mirrors arguments in
and should also be an `edict_*` in <fn:lex_next> and <fn:expect_pop>. */ `LEX_SYMBOL` and should also be an `edict_*` in <fn:lex_next> and
<fn:expect_pop>. */
#define EXPECT_HEAD X(keyword, KEYWORD) X(date, DATE) X(natural, NATURAL) \ #define EXPECT_HEAD X(keyword, KEYWORD) X(date, DATE) X(natural, NATURAL) \
X(restrict_text, RESTRICT_TEXT) X(restrict_text, RESTRICT_TEXT)
#define EXPECT_CONS Y(end_text, END_TEXT) #define EXPECT_CONS Y(end_text, END_TEXT)