From 8af7b7fc0a8dbe3502a7cd43c6a10fdcc6013677 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 21 Aug 2026 10:55:30 +0000 Subject: Start working on the scanner. For now, all that is implemented is some functionality which imports UTF-8 into the memory managed by aplwc, after checking that the data is in fact valid UTF-8. FossilOrigin-Name: c861e88777d8180cb7b37c11fc7016a900f9d5821a7e3c8e8aab54118d2fca94 --- src/include/aplwc.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/aplwc.h b/src/include/aplwc.h index d4d101c..75d9485 100644 --- a/src/include/aplwc.h +++ b/src/include/aplwc.h @@ -7,17 +7,24 @@ enum aplwc_rc { APLWC_OK, APLWC_OUT_OF_MEMORY, + APLWC_NOT_YET_IMPLEMENTED, + APLWC_INVALID_UTF8, - APLWC_RC_LAST = APLWC_OUT_OF_MEMORY + APLWC_RC_LAST = APLWC_INVALID_UTF8 }; struct aplwc; +struct aplwc_line; enum aplwc_rc aplwc_new(struct aplwc **, uint8_t *, size_t); void aplwc_destroy(struct aplwc *); const char *aplwc_errstr_rc(enum aplwc_rc); const char *aplwc_errstr(struct aplwc *); +enum aplwc_rc aplwc_last_error(struct aplwc *); +struct aplwc_line *aplwc_read(struct aplwc *, const char *); +void aplwc_free_line(struct aplwc_line *); +enum aplwc_rc aplwc_eval(struct aplwc_line *); -#define APLWC_MIN_MEM (128) +#define APLWC_MIN_MEM (64) #endif /* APLWC_H */ -- cgit v1.2.3