From cee55351d6c2865447e72d9e3e8ba5922647162d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 29 Apr 2023 16:46:02 +0200 Subject: Improve how the parser is generated - use long variant of options for re2c in its makefile - use `define` instead of magic numbers - add some consts - trailing `;` are now mandatory for conditions - NULL bytes are no longer allowed in configuration file - the parser shouldn't crash in the absence of trailing new line at the end of its configuration file --- src/Makefile.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Makefile.frag') diff --git a/src/Makefile.frag b/src/Makefile.frag index 454ba60..6598df2 100644 --- a/src/Makefile.frag +++ b/src/Makefile.frag @@ -1,7 +1,7 @@ $(srcdir)/sp_config_scanner.c: $(srcdir)/sp_config_scanner.re if re2c -v |grep ' [23]\.' 2>/dev/null; then \ - re2c -bc -o $@ $<; \ - re2c --no-generation-date --no-version -bci -o $(srcdir)/sp_config_scanner.cached.c $<; \ + re2c -W --conditions --bit-vectors --no-debug-info --output $@ $<; \ + re2c -W --no-generation-date --bit-vectors --no-version --conditions --no-debug-info --output $(srcdir)/sp_config_scanner.cached.c $<; \ else \ cp $(srcdir)/sp_config_scanner.cached.c $@; \ fi; -- cgit v1.3