On Jan 15, 2019, at 11:41 AM, Akim Demaille <a...@lrde.epita.fr> wrote: > >> Le 15 janv. 2019 à 16:42, Derek Clegg <de...@me.com> a écrit : >> >>> On Jan 14, 2019, at 11:56 PM, Akim Demaille <a...@lrde.epita.fr> wrote: >>> >>> I don't think flex's scanner depend on YYSTYPE. >> >> It does if you specify %option bison-bridge in your flex file. > > I have never used it, and I'm sad that this feature was designed with > consulting Bison's maintainers. > >>> #define YY_DECL int cmap_yylex (CMAP_YYSTYPE* yylval, CMAP_YYLTYPE* yylloc) >> >> While this is correct, it doesn’t fix the problem when %option bison-bridge >> is specified. > > What does bison-bridge brings you? Does it give you more than declaring > yylex? How can it possibly work with %lex-param? > > I think it's impossible for Flex to guess what it has to do, the parser needs > to tell it. > > [doc] >> I think this is good, but there still needs a way to deal with %option >> bison-bridge in my opinion. > > Well, Flex introduced a feature on top of a broken feature of Bison without > consulting us. I don't think it makes sense to try to save it.
All in all, I agree with your points. I vote to keep the changes you’ve made. For what it’s worth, this was trivial to work around: in my flex file, I added #define YYSTYPE CMAP_YYSTYPE and all was well. Thanks, Derek