[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: implicit declaration of function 'yylex' is invalid in C99
From: |
Akim Demaille |
Subject: |
Re: implicit declaration of function 'yylex' is invalid in C99 |
Date: |
Sat, 15 Jan 2022 17:02:07 +0100 |
Ryan,
> Le 15 janv. 2022 à 11:04, Ryan Schmidt <bison@ryandesign.com> a écrit :
>
> On Jan 15, 2022, at 03:57, Akim Demaille wrote:
>
>> I personally feel that generating these prototypes automatically is actually
>> more complex (for the user, not for Bison) than merely specifying them.
>
> Ok. Can you provide any guidance for how to specify them?
>
> I am a maintainer of packages within the MacPorts package management system.
And I thank you a lot for the effort you put into the MacPorts.
> I've encountered many of our ports that fail to build for this reason, and I
> haven't known how to fix them. For other implicit declaration of function
> problems it's usually been a simple matter of including a missing header or
> writing a function prototype, but with bison/flex, there isn't a .c or .h
> file into which such a prototype could be inserted, and even if I knew what
> file to insert it into, I wouldn't know what prototype to write.
It very much depends on the *.l and the *.y files. But most of the time it
suffices to include something like
%code provides {
int yylex (void);
void yyerror (const char *);
}
in the first part of the *.y file (before %%).
If you provide me with pointers to these packages, I can help finding the
appropriate fixes.
- implicit declaration of function 'yylex' is invalid in C99, Ryan Schmidt, 2022/01/14
- Re: implicit declaration of function 'yylex' is invalid in C99, Akim Demaille, 2022/01/15
- Re: implicit declaration of function 'yylex' is invalid in C99, Ryan Schmidt, 2022/01/15
- Re: implicit declaration of function 'yylex' is invalid in C99,
Akim Demaille <=
- Re: implicit declaration of function 'yylex' is invalid in C99, Paul Eggert, 2022/01/15
- Re: implicit declaration of function 'yylex' is invalid in C99, Ryan Schmidt, 2022/01/17
- Re: implicit declaration of function 'yylex' is invalid in C99, Paul Eggert, 2022/01/17
- Re: implicit declaration of function 'yylex' is invalid in C99, Ryan Schmidt, 2022/01/20
- Re: implicit declaration of function 'yylex' is invalid in C99, Paul Eggert, 2022/01/20
- Re: implicit declaration of function 'yylex' is invalid in C99, Ryan Schmidt, 2022/01/20
- Re: implicit declaration of function 'yylex' is invalid in C99, Paul Eggert, 2022/01/20