ael: Regenerate lexers and parsers.

Various changes to ensure that the lexers and parsers can be correctly
generated when REBUILD_PARSERS is enabled.

Some notes:

* Because of the version of flex we are using to generate the lexers
  (2.5.35) some post-processing in the Makefile is still required.

* The generated lexers do not contain the problematic C99 check that
  was being replaced by the call to sed in the respective Makefiles so
  it was removed.

* Since these files are generated, they will include trailing
  whitespace in some places. This does not need to be corrected.

Change-Id: Ibbd343606fcf5c0d285b1599e6e8e59f514f2e4e
This commit is contained in:
Sean Bright
2023-03-21 09:24:59 -04:00
committed by Friendly Automation
parent 7dc73c8151
commit acd1513111
9 changed files with 579 additions and 608 deletions

View File

@@ -133,13 +133,10 @@ else
ast_expr2f.c:
endif
$(ECHO_PREFIX) echo " [FLEX] $< -> $@"
$(CMD_PREFIX) $(FLEX) -o $@ ast_expr2.fl
$(CMD_PREFIX) sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' $@ > $@.fix
$(CMD_PREFIX) echo "#define ASTMM_LIBC ASTMM_REDIRECT" > $@
$(CMD_PREFIX) echo "#include \"asterisk.h\"" >> $@
$(CMD_PREFIX) echo >> $@
$(CMD_PREFIX) cat $@.fix >> $@
$(CMD_PREFIX) rm $@.fix
$(CMD_PREFIX) $(FLEX) -t ast_expr2.fl >> $@
ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),)
GMIMELDFLAGS+=$(GMIME_LIB)