Re: [Flex-help] help needed in the transition from flex 2.59 to 2.6
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Will E. <wes...@gm...> - 2016-10-07 11:57:26
|
THe version numbers you are siting are a bit muddled. What does "flex --version" report in both cases? On Friday, 7 October 2016, 8:45 am +0200, Rollastre Prostit <rol...@gm...> wrote: > Hello list. > > I looks like there are some changes in the code generated by flex 2.59 > and 2.6 (in C++) that break my build. > > in 2.59 the code in question in the XXXX.lexer.cpp is this: > > if(!yyin) > > /*%if-c-only*/ > > /*%endif*/ > > /*%if-c++-only*/ > > yyin=&std::cin; > > /*%endif*/ > > if(!yyout) > > /*%if-c-only*/ > > /*%endif*/ > > /*%if-c++-only*/ > > yyout=&std::cout; > > /*%endif*/ > > > and in 2.6 is like this: > if(!yyin) > > /*%if-c-only*/ > > /*%endif*/ > > /*%if-c++-only*/ > > yyin.rdbuf(std::cin.rdbuf()); > > /*%endif*/ > > if(!yyout) > > /*%if-c-only*/ > > /*%endif*/ > > /*%if-c++-only*/ > > yyout.rdbuf(std::cout.rdbuf()); > > /*%endif*/ > > > > It turns out that the 2.59 version works fine but the 2.6 doesn't > compile because yyin and yyout are pointers. I have searched for a > solution for my problem in the list but I couldn't find anything. I also > googled and found this > > http://stackoverflow.com/questions/34438023/openfoam-flex-yyin-rdbufstdcin-rdbuf-error > > http://htaccess9simo.blogspot.com.es/2015/12/openfoam-flex-yyinrdbufstdcinrdbuf-error.html > > Which basically workaround the problem by downgrading to 2.59 in the > /usr/bin. I already tested this and worked for me too. But I would > expect there is a better solution which doesn't require that my build > system ships a specific version of flex. Does somebody know what am I > doing (or not doing) that causes this problem? > > Thank you and sorry if the question is already posted, I just couldn't > find it! > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help -- Will Estes Flex Project Maintainer wes...@gm... https://github.com/westes/flex |