Re: [Flex-help] Error changing yylex return.
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Chris v. <che...@gm...> - 2016-03-05 02:33:35
|
I gave this a shot on my own (using the same version) and got it working with a tweak. My next question: where did lex.yy.h come from? As far as I know, flex does not generate header files unless you put it in C++ mode. I got your main.c to compile by changing its include from "lex.yy.h" to "lex.yy.c", and the resulting binary recognizes "test" input and prints out "T: 2.000000". Of course the best-practices answer is to not to #include a .c file, but rather add a bunch of extern declarations and link, blah blah blah... But the point is the YY_DECL worked. -Chris On Wed, Mar 2, 2016 at 6:13 AM, Fabricio S. Paranhos < fab...@gm...> wrote: > > What version of flex are you running? > > flex 2.5.39 > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help > |