Reputation: 1404
I've just installed flex and I'm trying some simple tests with its 2.5.4 version on windows 7 64bits. I'd like to integrate it with a bison generated parser. Therefore, the flex manual says that one must declare %option bison-bridge.
When running flex on the input .l file, I get an error:
Unrecognized %option bison-bridge
I tried to set this option in the command line rather than in the input, but when typing:
flex.exe --help
No available option sets a "bison-bridge"...
Can someone help me out ?
Upvotes: 3
Views: 3218
Reputation: 754760
Why are you using such an ancient version of Flex? Version 2.5.31 was released in 2003; the current version is 2.5.37 from August 2012.
I'm not sure when Flex 2.5.4 was released (the source is still available at the URL above), but it probably simply does not include the functionality you're after.
Upgrade!
Upvotes: 4
Reputation: 21
you can use latest versions of flex&bison for windows from http://sourceforge.net/projects/winflexbison/
Upvotes: 2
Reputation: 126438
Well, using a more recent version of flex is the best answer, but if you really MUST use an older version of flex, this kind of functionality used to be accessible by defining the YY_DECL
macro in the top of the .l file:
%{
#define YY_DECL int yylex(YYSTYPE *yylval)
%}
would do the equivalent of %option bison-bridge
Upvotes: 4