Hi! > Le 2 sept. 2016 à 18:42, Balaco Baco <balacob...@imap.cc> a écrit : > > Take the file [file.y], compile it to generate tab.[ch] files and the compile > it (without linking) with gcc. It gives a warning in this step. Can fix this > warning? > > Commands used and their output: > > ==== > $ bison -vd file.y > $ gcc -Wall -c file.tab.c > file.tab.c:1349: warning: implicit declaration of function ‘yylex’ > # A command that works, but it is out of scope for this message > $ gcc -Wall file.tab.o [other object files] -lfl > $ > ==== > > Is this warning something expected?
Yes: the user is in charge of declaring yylex. Of course this is not so nice, but it’s mainly historical. > I was thinking about adding yylex() prototype to file.y, but I do not know > what it is, yylex is the name of function that the parse calls to get tokens, i.e., it is the caller to the scanner/lexer/tokenizer. > and I could not find it in documentation. That’s really surprising. https://www.gnu.org/software/bison/manual/html_node/Lexical.html _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison