Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add yylex prototype #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryandesign
Copy link

Fixes:

conf.tab.c:1429:16: error: implicit declaration of function 'yylex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      yychar = YYLEX;
               ^
conf.tab.c:745:16: note: expanded from macro 'YYLEX'
# define YYLEX yylex (&yylval, &yylloc)
               ^

I don't know bison and I do not know if this is the best fix for this issue. On the bison mailing list Paul Eggert said that the prototype should be

in an include file that both conf.lex and conf.y include so that they both agree with the declaration

and I have not attempted to do that here so you may want to do that instead.

I have also read about a define called YY_DECL; I don't know if that would be relevant in this circumstance.

I figure since you know bison well enough to have written a program using it, you will know how best to resolve this issue.

Fix "error: implicit declaration of function 'yylex' is invalid in C99"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant