diff --git a/Makefile b/Makefile index aa42a2c..ecfa624 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ build/%.o: build/%.c #src/%.h build/%.c: src/%.re.c @echo "\033[0;34mhttps://re2c.org/ generate $@\033[0m" @mkdir -p build - re2c -W --tags --conditions -o $@ $< + re2c -W -8 --tags --conditions -o $@ $< #doc/%.md: src/%.h # # https://github.com/neil-edelman/cdoc documentation diff --git a/src/scan.re.c b/src/scan.re.c index fd29ef3..4c36f59 100644 --- a/src/scan.re.c +++ b/src/scan.re.c @@ -163,8 +163,10 @@ static int kjv_compare(const union line64 a, const union line64 b) #include "../src/tree.h" -/*!conditions:re2c*/ -/*!flags:utf-8*/ +/*!conditions:re2c */ +/*!flags:utf-8 */ +/*!include:re2c "unicode_categories.re" */ + static int scan_day(struct scan *const scan, union date32 date, const char *const buffer) { @@ -219,7 +221,10 @@ static int scan_day(struct scan *const scan, union date32 date, parlabel = (parchar glyph*) (ws+ glyph+)*; //keyword = [A-Za-z0-9][A-Za-z0-9_-]*; - keyword = [A-Za-z0-9_-é]+; + //keyword = [A-Za-z0-9_-é]+; + //keyword = [A-Za-z0-9_-]_; + // letter number dash connector + keyword = (L|N) (L|N|Pd|Pc)*; uint = [0-9]+; natural = [1-9][0-9]*; @@ -235,7 +240,8 @@ static int scan_day(struct scan *const scan, union date32 date, */ for( ; ; ) { /*!re2c /**/ - [^\n\x00] { continue; } /* Default ignore. */ + // [^\n\x00] { continue; } /* Default ignore. */ + * { continue; } * { fail = "newline expected"; goto catch; } "\x00" { fail = "no newline at end of file"; goto catch; } "\x00" { return 1; } /* End of day. */