liljencrantz / anna

Interpreter for statically typed, duck typed language with list style macros
BSD 2-Clause "Simplified" License
7 stars 0 forks source link

It doesn't build anymore ? #2

Open mingodad opened 11 months ago

mingodad commented 11 months ago

Trying to build this project gives several errors like:

/usr/bin/gcc -g3 -gdwarf-2 -std=c99 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_ISO99_SOURCE=1    -I include -I . -DANNA_BOOTSTRAP_DIRECTORY=L\"/usr/local/share/anna/bootstrap\" -DANNA_LIB_DIR=L\"/usr/local/lib/anna\" -Wall -Werror=implicit-function-declaration -Wmissing-braces -Wmissing-prototypes   -c -o autogen/yacc.o autogen/yacc.c
In file included from src/yacc.y:25:
autogen/yacc.h:134:22: error: unknown type name ‘yyscan_t’
  134 | int anna_yacc_parse (yyscan_t scanner, wchar_t *filename, anna_node_t **parse_tree_ptr);
      |                      ^~~~~~~~
src/yacc.y:31:5: error: conflicting types for ‘anna_yacc_lex’
   31 | int anna_yacc_lex (YYSTYPE *lvalp, YYLTYPE *llocp, yyscan_t scanner, wchar_t *filename);
      |     ^~~~~~~~~~~~~
autogen/yacc.c:64:25: note: previous declaration of ‘anna_yacc_lex’ was here
   64 | #define yylex           anna_yacc_lex
      |                         ^~~~~~~~~~~~~
autogen/lex.h:546:12: note: in expansion of macro ‘yylex’
  546 | extern int yylex \
      |            ^~~~~
src/yacc.y: In function ‘anna_yacc_lex_inner’:
src/yacc.y:1529:14: error: implicit declaration of function ‘anna_lex_lex’; did you mean ‘anna_lex_free’? [-Werror=implicit-function-declaration]
 1529 |  yylex_val = anna_lex_lex(lvalp, scanner);
      |              ^~~~~~~~~~~~
      |              anna_lex_free
src/yacc.y: At top level:
src/yacc.y:1558:5: error: conflicting types for ‘anna_yacc_lex’
 1558 | int anna_yacc_lex (
      |     ^~~~~~~~~~~~~
autogen/yacc.c:64:25: note: previous declaration of ‘anna_yacc_lex’ was here
   64 | #define yylex           anna_yacc_lex
      |                         ^~~~~~~~~~~~~
autogen/lex.h:546:12: note: in expansion of macro ‘yylex’
  546 | extern int yylex \
      |            ^~~~~
cc1: some warnings being treated as errors
<builtin>: recipe for target 'autogen/yacc.o' failed
make: *** [autogen/yacc.o] Error 1
mingodad commented 10 months ago

I've just added this project grammar to https://mingodad.github.io/parsertl-playground/playground/ where the grammar can be tested/debugged.

Would be nice if the issue reported above could be fixed !