flex-help Mailing List for flex: the fast lexical analyser (Page 2)
flex is a tool for generating scanners
Brought to you by:
wlestes
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(3) |
Jun
(4) |
Jul
(10) |
Aug
(6) |
Sep
(20) |
Oct
(30) |
Nov
(10) |
Dec
(40) |
2007 |
Jan
(25) |
Feb
(18) |
Mar
(34) |
Apr
(36) |
May
(29) |
Jun
(1) |
Jul
(35) |
Aug
(5) |
Sep
(7) |
Oct
(15) |
Nov
(16) |
Dec
(13) |
2008 |
Jan
(11) |
Feb
(23) |
Mar
(17) |
Apr
(32) |
May
(7) |
Jun
(20) |
Jul
(2) |
Aug
(13) |
Sep
(13) |
Oct
(16) |
Nov
(3) |
Dec
(17) |
2009 |
Jan
(10) |
Feb
(10) |
Mar
(13) |
Apr
(3) |
May
(25) |
Jun
(11) |
Jul
(1) |
Aug
(17) |
Sep
(19) |
Oct
(9) |
Nov
(20) |
Dec
(22) |
2010 |
Jan
(29) |
Feb
(13) |
Mar
(11) |
Apr
(10) |
May
(9) |
Jun
(13) |
Jul
(4) |
Aug
(28) |
Sep
(8) |
Oct
(8) |
Nov
(4) |
Dec
(7) |
2011 |
Jan
(3) |
Feb
(3) |
Mar
(5) |
Apr
(4) |
May
(2) |
Jun
(7) |
Jul
(12) |
Aug
(10) |
Sep
(6) |
Oct
(14) |
Nov
(1) |
Dec
(9) |
2012 |
Jan
(6) |
Feb
(1) |
Mar
(13) |
Apr
(4) |
May
(5) |
Jun
(1) |
Jul
(6) |
Aug
(18) |
Sep
(12) |
Oct
(46) |
Nov
(7) |
Dec
(4) |
2013 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
(5) |
May
(2) |
Jun
(11) |
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(16) |
Dec
(1) |
2014 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(11) |
May
|
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
(8) |
Nov
(1) |
Dec
(7) |
2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(11) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2016 |
Jan
(1) |
Feb
(4) |
Mar
(6) |
Apr
(2) |
May
(15) |
Jun
(19) |
Jul
(10) |
Aug
|
Sep
(1) |
Oct
(6) |
Nov
(4) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2018 |
Jan
(4) |
Feb
(1) |
Mar
(5) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Simon S. <sim...@gn...> - 2018-03-16 20:05:36
|
Hi flex-users and developers, I've just did a profiling (using callgrind) on the GnuCOBOL compiler (parsing only) with 2,500,000 LOC and found out that the recent scanner[1] consumes most of the time: * 44% spent in yylex (16% of these are spent in GnuCOBOL internal functions leaving 28% of the complete parser process in this single flex generated file) * 13% in yy_get_previous_state * 5.6% spent in yy_get_next_buffer with 1.3% in fgets Removing all the "noise" there is still over 25% spent in the scanner and "get_previous_state" doesn't sound like it should be called that often. I guess there are some bad practices used in scanner.l, but I don't know what to look out for. Can you please have a look at this and post suggestions or point to bad practice found in there? Is the amount of calls to get_previous_state normal? scanner.c was generated with flex 2.5.37 - Do you expect a speedup with a more recent release? Thank you for taking the time to answer and maybe even for checking the source, Simon [1] https://sourceforge.net/p/open-cobol/code/HEAD/tree/trunk/cobc/scanner.l |
From: David S. <dsa...@ne...> - 2018-02-28 05:45:41
|
Sorry for the delay in response; it had failed on both the pre-installed mac version (2.5.35 Apple(flex-31)) and 2.6.4. Tracing ended up being non-trivial because of macOS's System Integrity Protection. The issue ended up being that something that had been installed through MacPorts didn't work after the upgrade to High Sierra, (presumably something the flex was using); I'm not sure which thing it was, but cleaning out (and updating as needed) the MacPorts installs fixed it. Thanks for helping out! David On Thu, Jan 11, 2018 at 11:54 AM Will Estes <wes...@gm...> wrote: > That's a really old version of flex. Can you upgrade to the current > release -- 2.6.4? > > Does flex --version work? > > What does strace (or whatever the equivalent is on OSX is called) say is > happening? > > On Thursday, 11 January 2018, 7:48 pm +0000, David Saltzman < > dsa...@ne...> wrote: > > > Thanks Will, > > > > Version: flex 2.5.35 Apple(flex-31) > > > > It gives no output whenever I run any file through it or anything that > > should succeed, eg: > > > > ~$ echo %% | flex -t > > > > ~$ > > > > > > Though if I run a file with an error through, it will spit out the error. > > > > On Thu, Jan 11, 2018 at 11:24 AM Will Estes <wes...@gm...> wrote: > > > > > What version of flex? > > > > > > And your version of flex gives no output when you do what? > > > > > > On Thursday, 11 January 2018, 7:21 pm +0000, David Saltzman < > > > dsa...@ne...> wrote: > > > > > > > Hi, > > > > > > > > After I upgraded to macOS High Sierra and Xcode 9, running flex > gives me > > > no > > > > output. > > > > > > > > Same symptoms as in these (unanswered) questions: > > > > > > > > https://stackoverflow.com/questions/47765188/flex-gives-no-output-on-macos-high-sierra-xcode-9 > > > > > > > > https://superuser.com/questions/1276478/flex-gives-no-output-on-macos-high-sierra-xcode-9 > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > David > > > > > > > > ------------------------------------------------------------------------------ > > > > 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 > > > > > > ------------------------------------------------------------------------------ > > 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 > |
From: Will E. <wes...@gm...> - 2018-01-11 19:54:28
|
That's a really old version of flex. Can you upgrade to the current release -- 2.6.4? Does flex --version work? What does strace (or whatever the equivalent is on OSX is called) say is happening? On Thursday, 11 January 2018, 7:48 pm +0000, David Saltzman <dsa...@ne...> wrote: > Thanks Will, > > Version: flex 2.5.35 Apple(flex-31) > > It gives no output whenever I run any file through it or anything that > should succeed, eg: > > ~$ echo %% | flex -t > > ~$ > > > Though if I run a file with an error through, it will spit out the error. > > On Thu, Jan 11, 2018 at 11:24 AM Will Estes <wes...@gm...> wrote: > > > What version of flex? > > > > And your version of flex gives no output when you do what? > > > > On Thursday, 11 January 2018, 7:21 pm +0000, David Saltzman < > > dsa...@ne...> wrote: > > > > > Hi, > > > > > > After I upgraded to macOS High Sierra and Xcode 9, running flex gives me > > no > > > output. > > > > > > Same symptoms as in these (unanswered) questions: > > > > > https://stackoverflow.com/questions/47765188/flex-gives-no-output-on-macos-high-sierra-xcode-9 > > > > > https://superuser.com/questions/1276478/flex-gives-no-output-on-macos-high-sierra-xcode-9 > > > > > > Any ideas? > > > > > > Thanks, > > > David > > > > > ------------------------------------------------------------------------------ > > > 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 > > > ------------------------------------------------------------------------------ > 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 |
From: David S. <dsa...@ne...> - 2018-01-11 19:48:48
|
Thanks Will, Version: flex 2.5.35 Apple(flex-31) It gives no output whenever I run any file through it or anything that should succeed, eg: ~$ echo %% | flex -t ~$ Though if I run a file with an error through, it will spit out the error. On Thu, Jan 11, 2018 at 11:24 AM Will Estes <wes...@gm...> wrote: > What version of flex? > > And your version of flex gives no output when you do what? > > On Thursday, 11 January 2018, 7:21 pm +0000, David Saltzman < > dsa...@ne...> wrote: > > > Hi, > > > > After I upgraded to macOS High Sierra and Xcode 9, running flex gives me > no > > output. > > > > Same symptoms as in these (unanswered) questions: > > > https://stackoverflow.com/questions/47765188/flex-gives-no-output-on-macos-high-sierra-xcode-9 > > > https://superuser.com/questions/1276478/flex-gives-no-output-on-macos-high-sierra-xcode-9 > > > > Any ideas? > > > > Thanks, > > David > > > ------------------------------------------------------------------------------ > > 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 > |
From: Will E. <wes...@gm...> - 2018-01-11 19:24:54
|
What version of flex? And your version of flex gives no output when you do what? On Thursday, 11 January 2018, 7:21 pm +0000, David Saltzman <dsa...@ne...> wrote: > Hi, > > After I upgraded to macOS High Sierra and Xcode 9, running flex gives me no > output. > > Same symptoms as in these (unanswered) questions: > https://stackoverflow.com/questions/47765188/flex-gives-no-output-on-macos-high-sierra-xcode-9 > https://superuser.com/questions/1276478/flex-gives-no-output-on-macos-high-sierra-xcode-9 > > Any ideas? > > Thanks, > David > ------------------------------------------------------------------------------ > 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 |
From: David S. <dsa...@ne...> - 2018-01-11 19:21:32
|
Hi, After I upgraded to macOS High Sierra and Xcode 9, running flex gives me no output. Same symptoms as in these (unanswered) questions: https://stackoverflow.com/questions/47765188/flex-gives-no-output-on-macos-high-sierra-xcode-9 https://superuser.com/questions/1276478/flex-gives-no-output-on-macos-high-sierra-xcode-9 Any ideas? Thanks, David |
From: Chris v. <che...@gm...> - 2017-10-08 20:34:06
|
Hello, I have a very silly developer-level question. I see the following generated yyrestart function (reformatted for consistency): void yyrestart ( FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } yy_init_buffer( YY_CURRENT_BUFFER, input_file ); yy_load_buffer_state( ); } Why is yy_create_buffer called with yyin but yy_init_buffer called with input_file? I don't know that this is incorrect (or otherwise causing any problems), I just noticed it and it seemed strange. I'm using Flex 2.6.4. -Chris |
From: Will E. <wes...@gm...> - 2016-11-13 14:10:26
|
Firstly, the flex distribution comes with an info version of the manul. You can, with not too much extra tooling, generate html yourself if you're so inclined. Secondly, as per my comment on https://github.com/westes/flex/issues/91, you can find a copy of the manual at http://westes.github.io/flex/manual/ There's some additional work that needs to happen, too, for which I do welcome pull requests as I deal with some recent regressions in flex. On Sunday, 13 November 2016, 10:23 am +0100, "John P. Hartmann" <jph...@gm...> wrote: > The old links a are now defunct and the github project offers no manual. > Not eve google can help. > > What gives? > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > -- > 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 |
From: Todd D. <ptd...@gm...> - 2016-11-13 12:53:14
|
https://www.amazon.com/flex-bison-Text-Processing-Tools/dp/0596155972/ref=sr_1_1?s=books&ie=UTF8&qid=1479041515&sr=1-1&keywords=Flex --- P. Todd Decker 913-284-8814 On Nov 13, 2016, at 3:23 AM, John P. Hartmann <jph...@gm...> wrote: The old links a are now defunct and the github project offers no manual. Not eve google can help. What gives? ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi -- Flex-help mailing list Fle...@li... https://lists.sourceforge.net/lists/listinfo/flex-help |
From: John P. H. <jph...@gm...> - 2016-11-13 09:24:03
|
The old links a are now defunct and the github project offers no manual. Not eve google can help. What gives? |
From: Rollastre P. <rol...@gm...> - 2016-11-10 10:02:50
|
Hi, it's been a while now and I was wondering if there has been some progress/feedback on this issue. (?) Best and kind regards. On 07-Oct-16 4:40 PM, Will Estes wrote: > Thanks for the additional detail. I'll look into it. > > On Friday, 7 October 2016, 3:31 pm +0200, Rollastre Prostit <rol...@gm...> wrote: > >> Thanks for the response. >> >> I am sorry. You are right. I did read the version wrong. When I say >> 2.59 it should have been 2.5.39. But the problem is the same. >> >> JDF@JDF /usr/bin >> $ flex -V >> flex 2.5.39 >> >> which is when it works fine as it assigns a reference to std::cin to the >> pointer yyin (yyin=&std::cin). >> >> but when using flex 2.6.1 >> >> JDF@JDF /usr/bin >> $ flex --version >> flex 2.6.1 >> >> is when it uses the . operator >> >> yyin.rdbuf(std::cin.rdbuf()); >> >> when it should be using the -> operator. >> >> yyin->rdbuf(std::cin.rdbuf()); >> >> In fact, if I edit it manually, the compile error goes away. >> >> I don't know if this is a bug or that I have to specify something in the >> .ll file. >> >> >> On 07-Oct-16 1:57 PM, Will Estes wrote: >>> 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 >> >> ------------------------------------------------------------------------------ >> 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 |
From: Will E. <wes...@gm...> - 2016-10-27 12:48:32
|
Chris, See here: https://github.com/westes/flex/issues/98 Thanks for the additional report and log info. On Thursday, 27 October 2016, 12:42 pm +0100, Chris Clayton <chr...@go...> wrote: > Hi, > > I'm building flex-2.6.2 and get a segmentation fault when running make check. > > I've attached the log for the failing test (cxx_restart) and the output when I run the test under gdb > > My system is a roll-your-own based on (Beyond) Linux From Scratch. It's very stable and has been since I built it a year > ago. > > Please let me know if I can provide any additional diagnostics or tesrt a fix. > > Thanks > > Chris > [chris:~/rpm/build/flex-2.6.2/tests]$ gdb ./cxx_restart > GNU gdb (GDB) 7.12 > Copyright (C) 2016 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "x86_64-unknown-linux-gnu". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > <http://www.gnu.org/software/gdb/bugs/>. > Find the GDB manual and other documentation resources online at: > <http://www.gnu.org/software/gdb/documentation/>. > For help, type "help". > Type "apropos word" to search for commands related to "word"... > Reading symbols from ./cxx_restart...done. > (gdb) run < /home/chris/rpm/build/flex-2.6.2/tests/cxx_restart.txt > Starting program: /home/chris/rpm/BUILD/flex-2.6.2/tests/cxx_restart < /home/chris/rpm/build/flex-2.6.2/tests/cxx_restart.txt > > > > Program received signal SIGSEGV, Segmentation fault. > testFlexLexer::yy_init_buffer (this=this@entry=0x7fffffffdc70, b=0x616c20, file=...) at cxx_restart.cc:1319 > 1319 > ------------------------------------------------------------------------------ > The Command Line: Reinvented for Modern Developers > Did the resurgence of CLI tooling catch you by surprise? > Reconnect with the command line and become more productive. > Learn the new .NET and ASP.NET CLI. Get your free copy! > http://sdm.link/telerik > -- > 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 |
From: Chris C. <chr...@go...> - 2016-10-27 11:42:35
|
Hi, I'm building flex-2.6.2 and get a segmentation fault when running make check. I've attached the log for the failing test (cxx_restart) and the output when I run the test under gdb My system is a roll-your-own based on (Beyond) Linux From Scratch. It's very stable and has been since I built it a year ago. Please let me know if I can provide any additional diagnostics or tesrt a fix. Thanks Chris |
From: Will E. <wes...@gm...> - 2016-10-07 14:40:12
|
Thanks for the additional detail. I'll look into it. On Friday, 7 October 2016, 3:31 pm +0200, Rollastre Prostit <rol...@gm...> wrote: > Thanks for the response. > > I am sorry. You are right. I did read the version wrong. When I say > 2.59 it should have been 2.5.39. But the problem is the same. > > JDF@JDF /usr/bin > $ flex -V > flex 2.5.39 > > which is when it works fine as it assigns a reference to std::cin to the > pointer yyin (yyin=&std::cin). > > but when using flex 2.6.1 > > JDF@JDF /usr/bin > $ flex --version > flex 2.6.1 > > is when it uses the . operator > > yyin.rdbuf(std::cin.rdbuf()); > > when it should be using the -> operator. > > yyin->rdbuf(std::cin.rdbuf()); > > In fact, if I edit it manually, the compile error goes away. > > I don't know if this is a bug or that I have to specify something in the > .ll file. > > > On 07-Oct-16 1:57 PM, Will Estes wrote: > > 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 > > > ------------------------------------------------------------------------------ > 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 |
From: Rollastre P. <rol...@gm...> - 2016-10-07 13:31:51
|
Thanks for the response. I am sorry. You are right. I did read the version wrong. When I say 2.59 it should have been 2.5.39. But the problem is the same. JDF@JDF /usr/bin $ flex -V flex 2.5.39 which is when it works fine as it assigns a reference to std::cin to the pointer yyin (yyin=&std::cin). but when using flex 2.6.1 JDF@JDF /usr/bin $ flex --version flex 2.6.1 is when it uses the . operator yyin.rdbuf(std::cin.rdbuf()); when it should be using the -> operator. yyin->rdbuf(std::cin.rdbuf()); In fact, if I edit it manually, the compile error goes away. I don't know if this is a bug or that I have to specify something in the .ll file. On 07-Oct-16 1:57 PM, Will Estes wrote: > 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 |
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 |
From: Rollastre P. <rol...@gm...> - 2016-10-07 06:45:27
|
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! |
From: André W. V. <awv...@gm...> - 2016-09-11 19:58:49
|
Hello, I'm new to flex. I tried running examples from this page http://flex.sourceforge.net/manual/Simple-Examples.html#Simple-Examples on flex 2.6.0 (which came installed on Linux Mint 18). This example int num_lines = 0, num_chars = 0; %% \n ++num_lines; ++num_chars; . ++num_chars; %% int main() { yylex(); printf( "# of lines = %d, # of chars = %d\n", num_lines, num_chars ); } first produced a premature end-of-file as a result. After removing leading tabs, it produced a C source file with the following errors when compiled using gcc: <stdin>: In function ‘yylex’: <stdin>:4:3: error: ‘num_lines’ undeclared (first use in this function) <stdin>:4:3: note: each undeclared identifier is reported only once for each function it appears in <stdin>:4:16: error: ‘num_chars’ undeclared (first use in this function) <stdin>: In function ‘main’: <stdin>:14:9: error: ‘num_lines’ undeclared (first use in this function) <stdin>:14:20: error: ‘num_chars’ undeclared (first use in this function) I searched for a solution and found out that the first section of the file should be put between %{ and %}. The manual might need to be updated to conform with current versions of flex. Is that the case? Cheers, André |
From: Georgios P. <pe...@ii...> - 2016-07-19 11:23:20
|
Hi all, I think that flex, when considering the match length, it also counts the look-ahead. Adding the same look-ahead as in rule 2 to rule 1, seems to fix the problem. Regards, George On 18/7/2016 22:09, Georgios Petasis wrote: > Hi all, > > I am having trouble understanding why gnu flex does not match a > specific string the way I think it should be matched. > And I don't know how to debug/trace how the match is done. > > My rule set tries to implement a natural language tokenizer. > > I have a rule that says: > > syz\./[:space:] -> tag token as an abbreviation (lets name this "rule 1") > > Further in the rule set, there is a rule that says: > {consonant}+/\.[:space:]+{capital} -> tag as word & split sentence > > where {consonant} & {capital} are my definitions. (lets name this > "rule 2") > > I cannot understand why when matching string "syz. test" rule 1 is > used (what I want), but when matching "syz. Test" rule 2 is matched > (what I do not want). Rule 2 is not only after rule 1, but it also > matches a shorter text (as the period is in the trailing context). Why > is this happening? > > I have tried the option "%option debug", but nothing is written in > stderr (perhaps because I load the scanner as a dynamic library). > > Regards, > > George > |
From: Georgios P. <pet...@ya...> - 2016-07-19 11:05:51
|
Hi all, I think that flex, when considering the match length, it also counts the look-ahead. Adding the same look-ahead as in rule 2 to rule 1, seems to fix the problem. Regards, George On 18/7/2016 22:09, Georgios Petasis wrote: > Hi all, > > I am having trouble understanding why gnu flex does not match a > specific string the way I think it should be matched. > And I don't know how to debug/trace how the match is done. > > My rule set tries to implement a natural language tokenizer. > > I have a rule that says: > > syz\./[:space:] -> tag token as an abbreviation (lets name this "rule 1") > > Further in the rule set, there is a rule that says: > {consonant}+/\.[:space:]+{capital} -> tag as word & split sentence > > where {consonant} & {capital} are my definitions. (lets name this > "rule 2") > > I cannot understand why when matching string "syz. test" rule 1 is > used (what I want), but when matching "syz. Test" rule 2 is matched > (what I do not want). Rule 2 is not only after rule 1, but it also > matches a shorter text (as the period is in the trailing context). Why > is this happening? > > I have tried the option "%option debug", but nothing is written in > stderr (perhaps because I load the scanner as a dynamic library). > > Regards, > > George > |
From: Georgios P. <pet...@ya...> - 2016-07-18 19:21:53
|
Hi all, I am having trouble understanding why gnu flex does not match a specific string the way I think it should be matched. And I don't know how to debug/trace how the match is done. My rule set tries to implement a natural language tokenizer. I have a rule that says: syz\./[:space:] -> tag token as an abbreviation (lets name this "rule 1") Further in the rule set, there is a rule that says: {consonant}+/\.[:space:]+{capital} -> tag as word & split sentence where {consonant} & {capital} are my definitions. (lets name this "rule 2") I cannot understand why when matching string "syz. test" rule 1 is used (what I want), but when matching "syz. Test" rule 2 is matched (what I do not want). Rule 2 is not only after rule 1, but it also matches a shorter text (as the period is in the trailing context). Why is this happening? I have tried the option "%option debug", but nothing is written in stderr (perhaps because I load the scanner as a dynamic library). Regards, George |
From: Will E. <wes...@gm...> - 2016-07-07 22:11:24
|
I'm glad everything works; that's always good news! On Thursday, 7 July 2016, 5:46 pm -0400, John Gibson <joh...@gm...> wrote: > Okay, as you suspected, this was all about the user having an ancient version of flex. Not sure how that got on his system, but when he replaced it with the current package (flex 2.6.0), everything worked fine. > > Thanks for your help. > > John > > > > On Jul 6, 2016, at 7:05 PM, Will Estes <wes...@gm...> wrote: > > > > I have a vague memory that there was some cleanup regarding lex compatibility, but short of git bisect or re-reading the NEWS file, I couldn't tell you when that was. > > > > On Wednesday, 6 July 2016, 6:40 pm -0400, John Gibson <joh...@gm...> wrote: > > > >> Thanks, Will. > >> > >> I don't have Ubuntu, so I'm just going off info I got from the user. We've been using yyget_lineno and friends for a while. It certainly works in 2.5.35 using the -l flag. > >> > >> I'll ask my colleagues about losing lex compat. mode. Not sure whether this is still really necessary for us. The original code for this project does date from the mid'80s, though. ;-) > >> > >> John > >> > >> > >>> On Jul 6, 2016, at 6:22 PM, Will Estes <wes...@gm...> wrote: > >>> > >>> You said Ubuntu 16.04 includes flex 2.5.4? That's ancient and the tokens you mention weren't added till after 2.5.4. > >>> > >>> Is that right, though? Seems odd that Ubuntu would be shipping that old version of flex. > >>> > >>> But the lex compatibility mode is your problem. The tokens you list are not a part of "lex"; they're a part of "flex". That is, they're in the list of things that gets left out if you say you want "lex". > >>> > >>>> On Wednesday, 6 July 2016, 3:13 pm -0400, John Gibson <joh...@gm...> wrote: > >>>> > >>>> Hi, > >>>> > >>>> The project I work with (https://github.com/rtcmix/rtcmix) embeds a lexer built with flex. This builds correctly using flex 2.5.35 (macOS) and all previous versions. We use the lex compatibility mode flag (-l). > >>>> > >>>> Recently, we received a report from a user on Ubuntu 16.04, which includes flex 2.5.4, about not being able to build our software. The problem is that the yyget_lineno, yyset_lineno, and yylex_destroy functions are not included in the lex.yy.c file generated by flex 2.5.4. Adding "%option yylineno" at the top of our .l file did not help -- not surprisingly, since the docs say that lex compat. mode already implies %option yylineno. We use no other options. > >>>> > >>>> Is there something simple that I'm missing here? Has something changed that requires us to compile differently than we've had to before? Or is there something missing in this user's installation? > >>>> > >>>> Thanks much, > >>>> John > >>>> > >>>> > >>>> ------------------------------------------------------------------------------ > >>>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > >>>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries > >>>> present their vision of the future. This family event has something for > >>>> everyone, including kids. Get more information and register today. > >>>> http://sdm.link/attshape > >>>> -- > >>>> 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 > > > > -- > > Will Estes > > Flex Project Maintainer > > wes...@gm... > > https://github.com/westes/flex > -- Will Estes Flex Project Maintainer wes...@gm... https://github.com/westes/flex |
From: John G. <joh...@gm...> - 2016-07-07 21:46:45
|
Okay, as you suspected, this was all about the user having an ancient version of flex. Not sure how that got on his system, but when he replaced it with the current package (flex 2.6.0), everything worked fine. Thanks for your help. John > On Jul 6, 2016, at 7:05 PM, Will Estes <wes...@gm...> wrote: > > I have a vague memory that there was some cleanup regarding lex compatibility, but short of git bisect or re-reading the NEWS file, I couldn't tell you when that was. > > On Wednesday, 6 July 2016, 6:40 pm -0400, John Gibson <joh...@gm...> wrote: > >> Thanks, Will. >> >> I don't have Ubuntu, so I'm just going off info I got from the user. We've been using yyget_lineno and friends for a while. It certainly works in 2.5.35 using the -l flag. >> >> I'll ask my colleagues about losing lex compat. mode. Not sure whether this is still really necessary for us. The original code for this project does date from the mid'80s, though. ;-) >> >> John >> >> >>> On Jul 6, 2016, at 6:22 PM, Will Estes <wes...@gm...> wrote: >>> >>> You said Ubuntu 16.04 includes flex 2.5.4? That's ancient and the tokens you mention weren't added till after 2.5.4. >>> >>> Is that right, though? Seems odd that Ubuntu would be shipping that old version of flex. >>> >>> But the lex compatibility mode is your problem. The tokens you list are not a part of "lex"; they're a part of "flex". That is, they're in the list of things that gets left out if you say you want "lex". >>> >>>> On Wednesday, 6 July 2016, 3:13 pm -0400, John Gibson <joh...@gm...> wrote: >>>> >>>> Hi, >>>> >>>> The project I work with (https://github.com/rtcmix/rtcmix) embeds a lexer built with flex. This builds correctly using flex 2.5.35 (macOS) and all previous versions. We use the lex compatibility mode flag (-l). >>>> >>>> Recently, we received a report from a user on Ubuntu 16.04, which includes flex 2.5.4, about not being able to build our software. The problem is that the yyget_lineno, yyset_lineno, and yylex_destroy functions are not included in the lex.yy.c file generated by flex 2.5.4. Adding "%option yylineno" at the top of our .l file did not help -- not surprisingly, since the docs say that lex compat. mode already implies %option yylineno. We use no other options. >>>> >>>> Is there something simple that I'm missing here? Has something changed that requires us to compile differently than we've had to before? Or is there something missing in this user's installation? >>>> >>>> Thanks much, >>>> John >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San >>>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries >>>> present their vision of the future. This family event has something for >>>> everyone, including kids. Get more information and register today. >>>> http://sdm.link/attshape >>>> -- >>>> 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 > > -- > Will Estes > Flex Project Maintainer > wes...@gm... > https://github.com/westes/flex |
From: John G. <joh...@gm...> - 2016-07-07 01:26:03
|
That flex version number he gave me has to be wrong. I'll report back if I can resolve this one way or another. > On Jul 6, 2016, at 7:05 PM, Will Estes <wes...@gm...> wrote: > > I have a vague memory that there was some cleanup regarding lex compatibility, but short of git bisect or re-reading the NEWS file, I couldn't tell you when that was. > > On Wednesday, 6 July 2016, 6:40 pm -0400, John Gibson <joh...@gm...> wrote: > >> Thanks, Will. >> >> I don't have Ubuntu, so I'm just going off info I got from the user. We've been using yyget_lineno and friends for a while. It certainly works in 2.5.35 using the -l flag. >> >> I'll ask my colleagues about losing lex compat. mode. Not sure whether this is still really necessary for us. The original code for this project does date from the mid'80s, though. ;-) >> >> John >> >> >>> On Jul 6, 2016, at 6:22 PM, Will Estes <wes...@gm...> wrote: >>> >>> You said Ubuntu 16.04 includes flex 2.5.4? That's ancient and the tokens you mention weren't added till after 2.5.4. >>> >>> Is that right, though? Seems odd that Ubuntu would be shipping that old version of flex. >>> >>> But the lex compatibility mode is your problem. The tokens you list are not a part of "lex"; they're a part of "flex". That is, they're in the list of things that gets left out if you say you want "lex". >>> >>>> On Wednesday, 6 July 2016, 3:13 pm -0400, John Gibson <joh...@gm...> wrote: >>>> >>>> Hi, >>>> >>>> The project I work with (https://github.com/rtcmix/rtcmix) embeds a lexer built with flex. This builds correctly using flex 2.5.35 (macOS) and all previous versions. We use the lex compatibility mode flag (-l). >>>> >>>> Recently, we received a report from a user on Ubuntu 16.04, which includes flex 2.5.4, about not being able to build our software. The problem is that the yyget_lineno, yyset_lineno, and yylex_destroy functions are not included in the lex.yy.c file generated by flex 2.5.4. Adding "%option yylineno" at the top of our .l file did not help -- not surprisingly, since the docs say that lex compat. mode already implies %option yylineno. We use no other options. >>>> >>>> Is there something simple that I'm missing here? Has something changed that requires us to compile differently than we've had to before? Or is there something missing in this user's installation? >>>> >>>> Thanks much, >>>> John >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San >>>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries >>>> present their vision of the future. This family event has something for >>>> everyone, including kids. Get more information and register today. >>>> http://sdm.link/attshape >>>> -- >>>> 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 > > -- > Will Estes > Flex Project Maintainer > wes...@gm... > https://github.com/westes/flex |
From: Will E. <wes...@gm...> - 2016-07-06 23:05:58
|
I have a vague memory that there was some cleanup regarding lex compatibility, but short of git bisect or re-reading the NEWS file, I couldn't tell you when that was. On Wednesday, 6 July 2016, 6:40 pm -0400, John Gibson <joh...@gm...> wrote: > Thanks, Will. > > I don't have Ubuntu, so I'm just going off info I got from the user. We've been using yyget_lineno and friends for a while. It certainly works in 2.5.35 using the -l flag. > > I'll ask my colleagues about losing lex compat. mode. Not sure whether this is still really necessary for us. The original code for this project does date from the mid'80s, though. ;-) > > John > > > > On Jul 6, 2016, at 6:22 PM, Will Estes <wes...@gm...> wrote: > > > > You said Ubuntu 16.04 includes flex 2.5.4? That's ancient and the tokens you mention weren't added till after 2.5.4. > > > > Is that right, though? Seems odd that Ubuntu would be shipping that old version of flex. > > > > But the lex compatibility mode is your problem. The tokens you list are not a part of "lex"; they're a part of "flex". That is, they're in the list of things that gets left out if you say you want "lex". > > > >> On Wednesday, 6 July 2016, 3:13 pm -0400, John Gibson <joh...@gm...> wrote: > >> > >> Hi, > >> > >> The project I work with (https://github.com/rtcmix/rtcmix) embeds a lexer built with flex. This builds correctly using flex 2.5.35 (macOS) and all previous versions. We use the lex compatibility mode flag (-l). > >> > >> Recently, we received a report from a user on Ubuntu 16.04, which includes flex 2.5.4, about not being able to build our software. The problem is that the yyget_lineno, yyset_lineno, and yylex_destroy functions are not included in the lex.yy.c file generated by flex 2.5.4. Adding "%option yylineno" at the top of our .l file did not help -- not surprisingly, since the docs say that lex compat. mode already implies %option yylineno. We use no other options. > >> > >> Is there something simple that I'm missing here? Has something changed that requires us to compile differently than we've had to before? Or is there something missing in this user's installation? > >> > >> Thanks much, > >> John > >> > >> > >> ------------------------------------------------------------------------------ > >> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > >> Francisco, CA to explore cutting-edge tech and listen to tech luminaries > >> present their vision of the future. This family event has something for > >> everyone, including kids. Get more information and register today. > >> http://sdm.link/attshape > >> -- > >> 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 -- Will Estes Flex Project Maintainer wes...@gm... https://github.com/westes/flex |