flex-help Mailing List for flex: the fast lexical analyser (Page 6)
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: Filipp B. <b_...@zo...> - 2014-10-08 12:29:40
|
Oh, I see. When using just C you don't need to define your own main, but with C++ you do. I copied main from the c++ example and now it works. On 08.10.2014 15:37, Will Estes wrote: > Do you have the flex source to hand? There's several c++ examples in the test suite that might be helpful to you. The manual should also have working examples. (I.e. if it doesn't, or if you do what they do and still see the same problem, that's a bug.) > > On Wednesday, 8 October 2014, 3:25 pm +0400, "Filipp B." <b_...@zo...> wrote: > >> Which header is that? I tried to include FlexLexer.h but then the >> compiler says that I am trying to redefine class. >> >> >> On 08.10.2014 15:03, Will Estes wrote: >>> Looks like you need to include the flex c++ header so that you have a c++ lexer function, if I'm reading your example right. >>> >>> On Wednesday, 8 October 2014, 9:23 am +0400, "Filipp B." <b_...@zo...> wrote: >>> >>>> Hello. I am just starting with flex and trying to compile a simple >>>> program, no bison yet. >>>> >>>> /* calc.l */ >>>> >>>> %{ >>>> #include <iostream> >>>> #include <exception> >>>> %} >>>> >>>> %option debug >>>> %option nodefault >>>> %option noyywrap >>>> %option c++ >>>> >>>> %% >>>> \+ { >>>> std::cout << "PLUS" << std::endl; >>>> } >>>> >>>> \* { >>>> std::cout << "MULTIPLY" << std::endl; >>>> } >>>> >>>> - { >>>> std::cout << "MINUS" << std::endl; >>>> } >>>> >>>> \/ { >>>> std::cout << "DIVIDE" << std::endl; >>>> } >>>> >>>> .|\n { >>>> std::terminate(); >>>> } >>>> %% >>>> >>>> /* calc.l end */ >>>> >>>> The problem is the following: >>>> >>>> $ flex calc.l && g++ lex.yy.cc -lfl >>>> /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../lib64/libfl.a(libmain.o): >>>> In function `main': >>>> libmain.c:(.text.startup+0xb): undefined reference to `yylex' >>>> collect2: error: ld returned 1 exit status >>>> >>>> >>>> Writing pure C code using printf instead, with no %option c++, and >>>> compiling it with gcc works fine, but this doesn't. Why? >>>> >>>> -- >>>> Filipp B. >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >>>> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >>>> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >>>> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >>>> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >>>> -- >>>> Flex-help mailing list >>>> Fle...@li... >>>> https://lists.sourceforge.net/lists/listinfo/flex-help >> >> -- >> Filipp B. >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> -- >> Flex-help mailing list >> Fle...@li... >> https://lists.sourceforge.net/lists/listinfo/flex-help -- Filipp B. |
From: Will E. <wes...@gm...> - 2014-10-08 11:37:11
|
Do you have the flex source to hand? There's several c++ examples in the test suite that might be helpful to you. The manual should also have working examples. (I.e. if it doesn't, or if you do what they do and still see the same problem, that's a bug.) On Wednesday, 8 October 2014, 3:25 pm +0400, "Filipp B." <b_...@zo...> wrote: > Which header is that? I tried to include FlexLexer.h but then the > compiler says that I am trying to redefine class. > > > On 08.10.2014 15:03, Will Estes wrote: > > Looks like you need to include the flex c++ header so that you have a c++ lexer function, if I'm reading your example right. > > > > On Wednesday, 8 October 2014, 9:23 am +0400, "Filipp B." <b_...@zo...> wrote: > > > >> Hello. I am just starting with flex and trying to compile a simple > >> program, no bison yet. > >> > >> /* calc.l */ > >> > >> %{ > >> #include <iostream> > >> #include <exception> > >> %} > >> > >> %option debug > >> %option nodefault > >> %option noyywrap > >> %option c++ > >> > >> %% > >> \+ { > >> std::cout << "PLUS" << std::endl; > >> } > >> > >> \* { > >> std::cout << "MULTIPLY" << std::endl; > >> } > >> > >> - { > >> std::cout << "MINUS" << std::endl; > >> } > >> > >> \/ { > >> std::cout << "DIVIDE" << std::endl; > >> } > >> > >> .|\n { > >> std::terminate(); > >> } > >> %% > >> > >> /* calc.l end */ > >> > >> The problem is the following: > >> > >> $ flex calc.l && g++ lex.yy.cc -lfl > >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../lib64/libfl.a(libmain.o): > >> In function `main': > >> libmain.c:(.text.startup+0xb): undefined reference to `yylex' > >> collect2: error: ld returned 1 exit status > >> > >> > >> Writing pure C code using printf instead, with no %option c++, and > >> compiling it with gcc works fine, but this doesn't. Why? > >> > >> -- > >> Filipp B. > >> > >> > >> ------------------------------------------------------------------------------ > >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > >> -- > >> Flex-help mailing list > >> Fle...@li... > >> https://lists.sourceforge.net/lists/listinfo/flex-help > > -- > Filipp B. > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help |
From: Filipp B. <b_...@zo...> - 2014-10-08 11:27:20
|
Which header is that? I tried to include FlexLexer.h but then the compiler says that I am trying to redefine class. On 08.10.2014 15:03, Will Estes wrote: > Looks like you need to include the flex c++ header so that you have a c++ lexer function, if I'm reading your example right. > > On Wednesday, 8 October 2014, 9:23 am +0400, "Filipp B." <b_...@zo...> wrote: > >> Hello. I am just starting with flex and trying to compile a simple >> program, no bison yet. >> >> /* calc.l */ >> >> %{ >> #include <iostream> >> #include <exception> >> %} >> >> %option debug >> %option nodefault >> %option noyywrap >> %option c++ >> >> %% >> \+ { >> std::cout << "PLUS" << std::endl; >> } >> >> \* { >> std::cout << "MULTIPLY" << std::endl; >> } >> >> - { >> std::cout << "MINUS" << std::endl; >> } >> >> \/ { >> std::cout << "DIVIDE" << std::endl; >> } >> >> .|\n { >> std::terminate(); >> } >> %% >> >> /* calc.l end */ >> >> The problem is the following: >> >> $ flex calc.l && g++ lex.yy.cc -lfl >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../lib64/libfl.a(libmain.o): >> In function `main': >> libmain.c:(.text.startup+0xb): undefined reference to `yylex' >> collect2: error: ld returned 1 exit status >> >> >> Writing pure C code using printf instead, with no %option c++, and >> compiling it with gcc works fine, but this doesn't. Why? >> >> -- >> Filipp B. >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> -- >> Flex-help mailing list >> Fle...@li... >> https://lists.sourceforge.net/lists/listinfo/flex-help -- Filipp B. |
From: Will E. <wes...@gm...> - 2014-10-08 11:03:41
|
Looks like you need to include the flex c++ header so that you have a c++ lexer function, if I'm reading your example right. On Wednesday, 8 October 2014, 9:23 am +0400, "Filipp B." <b_...@zo...> wrote: > Hello. I am just starting with flex and trying to compile a simple > program, no bison yet. > > /* calc.l */ > > %{ > #include <iostream> > #include <exception> > %} > > %option debug > %option nodefault > %option noyywrap > %option c++ > > %% > \+ { > std::cout << "PLUS" << std::endl; > } > > \* { > std::cout << "MULTIPLY" << std::endl; > } > > - { > std::cout << "MINUS" << std::endl; > } > > \/ { > std::cout << "DIVIDE" << std::endl; > } > > .|\n { > std::terminate(); > } > %% > > /* calc.l end */ > > The problem is the following: > > $ flex calc.l && g++ lex.yy.cc -lfl > /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../lib64/libfl.a(libmain.o): > In function `main': > libmain.c:(.text.startup+0xb): undefined reference to `yylex' > collect2: error: ld returned 1 exit status > > > Writing pure C code using printf instead, with no %option c++, and > compiling it with gcc works fine, but this doesn't. Why? > > -- > Filipp B. > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help |
From: Filipp B. <b_...@zo...> - 2014-10-08 05:25:22
|
Hello. I am just starting with flex and trying to compile a simple program, no bison yet. /* calc.l */ %{ #include <iostream> #include <exception> %} %option debug %option nodefault %option noyywrap %option c++ %% \+ { std::cout << "PLUS" << std::endl; } \* { std::cout << "MULTIPLY" << std::endl; } - { std::cout << "MINUS" << std::endl; } \/ { std::cout << "DIVIDE" << std::endl; } .|\n { std::terminate(); } %% /* calc.l end */ The problem is the following: $ flex calc.l && g++ lex.yy.cc -lfl /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../lib64/libfl.a(libmain.o): In function `main': libmain.c:(.text.startup+0xb): undefined reference to `yylex' collect2: error: ld returned 1 exit status Writing pure C code using printf instead, with no %option c++, and compiling it with gcc works fine, but this doesn't. Why? -- Filipp B. |
From: Will E. <wes...@gm...> - 2014-07-15 11:51:40
|
Yes that'd be at runtime and yes the manual should be corrected to account for locales. On Saturday, 12 July 2014, 11:49 am +0200, "John P. Hartmann" <jph...@gm...> wrote: > The manual states: > > "These expressions all designate a set of characters equivalent to the > corresponding standard C isXXX function." > > and > > "For example, the following character classes are all equivalent: > > [[:alnum:]] > [[:alpha:][:digit:]] > [[:alpha:][0-9]] > [a-zA-Z0-9] > " > > This is clearly true in the C locale, but does this also hold for other > locales, e.g., French? If not, is it the locale at compile time or the > one at run time that applies? > > I ask because isXXX does depend on the locale, so either way it looks > like the manual needs correction, perhaps by adding "in the C locale" to > the first sentence. > > Or am I totally off my rocker? > > ------------------------------------------------------------------------------ > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help |
From: John P. H. <jph...@gm...> - 2014-07-12 09:50:10
|
The manual states: "These expressions all designate a set of characters equivalent to the corresponding standard C isXXX function." and "For example, the following character classes are all equivalent: [[:alnum:]] [[:alpha:][:digit:]] [[:alpha:][0-9]] [a-zA-Z0-9] " This is clearly true in the C locale, but does this also hold for other locales, e.g., French? If not, is it the locale at compile time or the one at run time that applies? I ask because isXXX does depend on the locale, so either way it looks like the manual needs correction, perhaps by adding "in the C locale" to the first sentence. Or am I totally off my rocker? |
From: Will E. <wes...@gm...> - 2014-06-11 20:21:44
|
Can you provide a sample flex input file that generates the error along with the commands you're using to call flex and the compiler? On Wednesday, 11 June 2014, 1:18 pm -0700, Arthur Schwarz <asc...@at...> wrote: > > > fileno is flagged as an error in gcc 4.8.2 C++11, but no error in gcc 4.8.2 > C++ or gcc 4.8.2 gnu++11. > > I don't have any other information on other compilers. > > Art > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help -- Will Estes (wl...@us...) Flex Project Maintainer http://flex.sourceforge.net/ |
From: Arthur S. <asc...@at...> - 2014-06-11 20:18:56
|
fileno is flagged as an error in gcc 4.8.2 C++11, but no error in gcc 4.8.2 C++ or gcc 4.8.2 gnu++11. I don't have any other information on other compilers. Art |
From: liugongquan123 <liu...@16...> - 2014-04-21 05:45:02
|
Thank you very much for your help. I fixed this issue by using flex-2.5.33 instead. So far as I know,the "undefined reference to 'yylex'" errors of flex-2.5.39 does exist, maybe there is something to be corrected . Best regards. At 2014-04-17 18:08:28,"Michele Bert" <mic...@gm...> wrote: >2014-04-14 10:48 GMT+02:00 liugongquan123 <liu...@16...>: >> I wonder if there is something incorrect in the generated Makefile , leading to the absence of yylex defination when generating libfl.so. ButI don't know how to fix it.Can you help me? Thank you!>The question is why the linker isn't finding yylex() in his libfl.so, even though it's looking there. I'll look into that later this >evening. The point of libfl is that it provides(among other things) a yylex(). > >Here we are going out of scope of my knowelge. If the yylex function >is defined in libfl.so, the only thing I would check is whether and >how it is exported. For example: >- is it defined static or extern? Maybe your compiler, or options >given to it implies a static declaration? >- ir it C or C++. I mean: is it exported with mangled name? > >Michele > > >-- >Michele |
From: Michele B. <mic...@gm...> - 2014-04-17 10:08:35
|
2014-04-14 10:48 GMT+02:00 liugongquan123 <liu...@16...>: > I wonder if there is something incorrect in the generated Makefile , leading to the absence of yylex defination when generating libfl.so. ButI don't know how to fix it.Can you help me? Thank you!>The question is why the linker isn't finding yylex() in his libfl.so, even though it's looking there. I'll look into that later this >evening. The point of libfl is that it provides(among other things) a yylex(). Here we are going out of scope of my knowelge. If the yylex function is defined in libfl.so, the only thing I would check is whether and how it is exported. For example: - is it defined static or extern? Maybe your compiler, or options given to it implies a static declaration? - ir it C or C++. I mean: is it exported with mangled name? Michele -- Michele |
From: liugongquan123 <liu...@16...> - 2014-04-14 08:49:04
|
Dear Michele, I wonder if there is something incorrect in the generated Makefile , leading to the absence of yylex defination when generating libfl.so. ButI don't know how to fix it.Can you help me? Thank you!>The question is why the linker isn't finding yylex() in his libfl.so, even though it's looking there. I'll look into that later this >evening. The point of libfl is that it provides(among other things) a yylex(). |
From: Will E. <wes...@gm...> - 2014-04-11 13:26:37
|
The question is why the linker isn't finding yylex() in his libfl.so, even though it's looking there. I'll look into that later this evening. The point of libfl is that it provides(among other things) a yylex(). On Friday, 11 April 2014, 8:38 am +0200, Michele Bert <mic...@gm...> wrote: > 2014-04-11 3:29 GMT+02:00 liugongquan123 <liu...@16...>: > > gcc -g -O2 -Wall -o xsup_set_pwd xsup_set_pwd.o -lfl -liw -lm -L../../../lib/libxsupgui -lxsupgui -lssl -lcrypto > > /usr/local/lib/libfl.so: undefined reference to `yylex' > > collect2: ld returned 1 exit status > > It confirm what I told you. You are trying to build the executable > "xsup_set_pwd" from the object "xsup_set_pwd.o" (which I assume is > comeing from "xsup_set_pwd.c" and some libraries, and it does not find > the function "yylex()" defined anywhere. There should be a file > <lexfile>.ll, from which a <lexfile>.c is generated, and compiled in > <lexfile>.o. If you recognise that file, try the command > > gcc -g -O2 -Wall -o xsup_set_pwd xsup_set_pwd.o <lexfile>.o -lfl > -liw -lm -L../../../lib/libxsupgui -lxsupgui -lssl -lcrypto > > and the link command should succeed. > We can give more accurate indications if you run "make clean" and than > "make", and post here the whole output. > -- > Michele > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help -- Will Estes (wl...@us...) Flex Project Maintainer http://flex.sourceforge.net/ |
From: liugongquan123 <liu...@16...> - 2014-04-11 09:49:39
|
To Michele: Thank you very much for your reply. There is no .ll file in my xsupplicant project, which is a open source project. Actually, xsupplicant needs flex (and also bison) to be installed. There are so many output when I try the make command after I run 'make clean', so I put here only the related results. ... Making all in doc make[1]: Entering directory `/open1x/xsupplicant-1.2.8/doc' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/open1x/xsupplicant-1.2.8/doc' Making all in drivers make[1]: Entering directory `/open1x/xsupplicant-1.2.8/drivers' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/open1x/xsupplicant-1.2.8/drivers' Making all in gui_tools make[1]: Entering directory `/open1x/xsupplicant-1.2.8/gui_tools' Making all in cli make[2]: Entering directory `/open1x/xsupplicant-1.2.8/gui_tools/cli' Making all in xsup_set_pwd make[3]: Entering directory `/open1x/xsupplicant-1.2.8/gui_tools/cli/xsup_set_pwd' gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"xsupplicant\" -DVERSION=\"1.2.8\" -DSTDC_HEADERS=1 -DLILENDIAN=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_PWD_RESET=1 -DOPENSSL_NO_KRB5=1 -DLINUX=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_IWLIB_H=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBSSL=1 -DLINUX_FRAMER=1 -I. -I. -g -O2 -Wall -c `test -f 'xsup_set_pwd.c' || echo './'`xsup_set_pwd.c gcc -g -O2 -Wall -o xsup_set_pwd xsup_set_pwd.o -lfl -liw -lm -L../../../lib/libxsupgui -lxsupgui -lssl -lcrypto /usr/local/lib/libfl.so: undefined reference to `yylex' collect2: ld returned 1 exit status make[3]: *** [xsup_set_pwd] Error 1 make[3]: Leaving directory `/open1x/xsupplicant-1.2.8/gui_tools/cli/xsup_set_pwd' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/open1x/xsupplicant-1.2.8/gui_tools/cli' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/open1x/xsupplicant-1.2.8/gui_tools' make: *** [all-recursive] Error 1 > We can give more accurate indications if you run "make clean" and than"make", and post here the whole output. |
From: Michele B. <mic...@gm...> - 2014-04-11 06:38:35
|
2014-04-11 3:29 GMT+02:00 liugongquan123 <liu...@16...>: > gcc -g -O2 -Wall -o xsup_set_pwd xsup_set_pwd.o -lfl -liw -lm -L../../../lib/libxsupgui -lxsupgui -lssl -lcrypto > /usr/local/lib/libfl.so: undefined reference to `yylex' > collect2: ld returned 1 exit status It confirm what I told you. You are trying to build the executable "xsup_set_pwd" from the object "xsup_set_pwd.o" (which I assume is comeing from "xsup_set_pwd.c" and some libraries, and it does not find the function "yylex()" defined anywhere. There should be a file <lexfile>.ll, from which a <lexfile>.c is generated, and compiled in <lexfile>.o. If you recognise that file, try the command gcc -g -O2 -Wall -o xsup_set_pwd xsup_set_pwd.o <lexfile>.o -lfl -liw -lm -L../../../lib/libxsupgui -lxsupgui -lssl -lcrypto and the link command should succeed. We can give more accurate indications if you run "make clean" and than "make", and post here the whole output. -- Michele |
From: liugongquan123 <liu...@16...> - 2014-04-11 01:30:28
|
When I try make,I got the following result, hope it is helpful. ... Making all in xsup_set_pwd make[3]: Entering directory `/open1x/xsupplicant-1.2.8/gui_tools/cli/xsup_set_pwd' gcc -g -O2 -Wall -o xsup_set_pwd xsup_set_pwd.o -lfl -liw -lm -L../../../lib/libxsupgui -lxsupgui -lssl -lcrypto /usr/local/lib/libfl.so: undefined reference to `yylex' collect2: ld returned 1 exit status make[3]: *** [xsup_set_pwd] Error 1 make[3]: Leaving directory `/open1x/xsupplicant-1.2.8/gui_tools/cli/xsup_set_pwd' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/open1x/xsupplicant-1.2.8/gui_tools/cli' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/open1x/xsupplicant-1.2.8/gui_tools' make: *** [all-recursive] Error 1 At 2014-04-10 19:43:21,"Will Estes" <wes...@gm...> wrote: >Would you post the transcript of the make run? It'd help to see the command line generated to link the program. > >On Thursday, 10 April 2014, 5:43 pm +0800, liugongquan123 <liu...@16...> wrote: > >> Hi all: >> To make my xsupplicant(1.2.8) works, I had flex-2.5.39,openssl,wireless_tools and bison-3.0 installed. >> But there are errors when I try (xsupplicant) make ,it says: >> /usr/local/lib/libfl.so:undefined reference to 'yylex' >> collect2:ld returned 1 exit status >> As I can see, yylex() is defined in /flex-2.5.39/yylex.c, and "/usr/local/lib/libfl.so " is >> installed by flex "make install", why there are such errors,and how to resolve it? >> >> >> Thanks alot! >> ------------------------------------------------------------------------------ >> Put Bad Developers to Shame >> Dominate Development with Jenkins Continuous Integration >> Continuously Automate Build, Test & Deployment >> Start a new project now. Try Jenkins in the cloud. >> http://p.sf.net/sfu/13600_Cloudbees >> _______________________________________________ >> Flex-help mailing list >> Fle...@li... >> https://lists.sourceforge.net/lists/listinfo/flex-help > >-- >Will Estes (wl...@us...) >Flex Project Maintainer >http://flex.sourceforge.net/ |
From: Arthur S. <asc...@at...> - 2014-04-10 14:20:43
|
What I do is to create a separate header file containing a reference to lex(). Such as: // <lex.h> /** *@brief Scanner Name. */ extern int lex( parser::semantic_type* yylval , parser::location_type* yylloc); where I am interfacing to a Bison generated C++ file and a C generated LEX file. In my Bison generated code I include a reference to this header file as in: %{ # include "lex.h" %} where the brackets, %{ and %}, specify where in the generated Bison file to place the include statement. Seems to work. art ________________________________ From: Michele Bert <mic...@gm...> To: fle...@li... Sent: Thursday, April 10, 2014 5:58 AM Subject: Re: [Flex-help] undefined reference to 'yylex' 2014-04-10 11:43 GMT+02:00 liugongquan123 <liu...@16...>: > /usr/local/lib/libfl.so:undefined reference to 'yylex' > collect2:ld returned 1 exit status > As I can see, yylex() is defined in /flex-2.5.39/yylex.c, and "/usr/local/lib/libfl.so " is > installed by flex "make install", why there are such errors,and how to resolve it? As far as I understand, yylex() is the function genereted by flex, so it is not provided by flex libraries themselves. If you write <yourfile>.flex, and run it through flex, it generates <yourfile>.c, which contains the function yylex(). You have to compile that program, and link it to the final package. Is it right? -- Michele ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ Flex-help mailing list Fle...@li... https://lists.sourceforge.net/lists/listinfo/flex-help |
From: Michele B. <mic...@gm...> - 2014-04-10 12:58:49
|
2014-04-10 11:43 GMT+02:00 liugongquan123 <liu...@16...>: > /usr/local/lib/libfl.so:undefined reference to 'yylex' > collect2:ld returned 1 exit status > As I can see, yylex() is defined in /flex-2.5.39/yylex.c, and "/usr/local/lib/libfl.so " is > installed by flex "make install", why there are such errors,and how to resolve it? As far as I understand, yylex() is the function genereted by flex, so it is not provided by flex libraries themselves. If you write <yourfile>.flex, and run it through flex, it generates <yourfile>.c, which contains the function yylex(). You have to compile that program, and link it to the final package. Is it right? -- Michele |
From: Will E. <wes...@gm...> - 2014-04-10 11:43:33
|
Would you post the transcript of the make run? It'd help to see the command line generated to link the program. On Thursday, 10 April 2014, 5:43 pm +0800, liugongquan123 <liu...@16...> wrote: > Hi all: > To make my xsupplicant(1.2.8) works, I had flex-2.5.39,openssl,wireless_tools and bison-3.0 installed. > But there are errors when I try (xsupplicant) make ,it says: > /usr/local/lib/libfl.so:undefined reference to 'yylex' > collect2:ld returned 1 exit status > As I can see, yylex() is defined in /flex-2.5.39/yylex.c, and "/usr/local/lib/libfl.so " is > installed by flex "make install", why there are such errors,and how to resolve it? > > > Thanks alot! > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help -- Will Estes (wl...@us...) Flex Project Maintainer http://flex.sourceforge.net/ |
From: liugongquan123 <liu...@16...> - 2014-04-10 09:43:40
|
Hi all: To make my xsupplicant(1.2.8) works, I had flex-2.5.39,openssl,wireless_tools and bison-3.0 installed. But there are errors when I try (xsupplicant) make ,it says: /usr/local/lib/libfl.so:undefined reference to 'yylex' collect2:ld returned 1 exit status As I can see, yylex() is defined in /flex-2.5.39/yylex.c, and "/usr/local/lib/libfl.so " is installed by flex "make install", why there are such errors,and how to resolve it? Thanks alot! |
From: Nikos B. <nba...@gm...> - 2014-02-27 19:49:14
|
Hi, I have the following flex piece of code: %x PLAYBACK IDIR TABLES SKIPLN HEX <PLAYBACK>{ ^Tuner\ set\ to\ [^\n]+ { BEGIN(HEX); yy_push_state(SKIPLN); } [^\n]+ | \n {} } <IDIR>{ {path} { memcpy(indexDir, yytext, yyleng); if (indexDir[yyleng - 1] != '/') { indexDir[yyleng] = '/'; indexDir[yyleng + 1] = '\0'; } else indexDir[yyleng] = '\0'; } .{6} { fprintf(stderr, "Error: loadConfig ~> Illegal text \"%s\" in group " "\"rainbow\" of \"sdmp.conf\" (line:%d)\n", yytext, lineno); yyterminate(); do_exit(13); } \n { lineno++; yy_push_state(TABLES); } } I am calling it from my C Program: A) BEGIN(IDIR); yylex(); At a different part I call: B) BEGIN(PLAYBACK); yylex(); My problem is that in (A), if it gets the Error in <IDIR> instead of exiting flex du to yyterminate(), it just jumps to <PLAYBACK> and continues scanning the wrong rules. <PLAYBACK> is nowhere in the rulepath of <IDIR>. How can I keep those 2 ruletrees separate and when I use yyterminate() have yylex() exit? TIA, Nikos |
From: Timothy S. Ph.D. <sch...@gm...> - 2014-01-31 05:09:28
|
Hello, I am using flex to scan a buffer I have in memory. I see the methods yy_scan_string, yy_scan_bytes and yy_scan_buffer. These methods appear to (1) copy data and (2) want to see two trailing NULLs at the end of the buffer. So my question is: is there a way to have flex use an existing in-memory buffer that doesn't necessarily have two trailing NULLs without making an entire copy of it? For example, can I just define the YY_INPUT macro to read from my buffer or something similar? As a follow up, what is the motivation for requiring the trailing NULLs? If you know the length why does it matter that a buffer has these? I could make my own yy_scan_bytes method but I am worried that flex will not find the trailing NULLs it wants and everything will crash and burn. Thanks! Tim |
From: Arthur S. <asc...@at...> - 2014-01-09 22:56:18
|
The header file for the C++ class is not generated. I don't know why and I've run out of imagination to try more guesses. Does anyone know what I'm doing wrong? In a similar vein, %option prefix works as advertised for C generated scanners but for C++ generated scanners most yy<variables>, yy<methods> retain their yy prefix. Probably because they are internal to the scanner? %option yyclass doesn't seem to do anything. All class scopes seem to be 'yyFlexLexer::'. Have I misunderstood what the %option does? I've tried to run the example by Timo Bingmann on generating a simple C++ scanner for a calculator. "flex scanner.ll" generates the file "lex.Examples.cc" but not the header file(s). My flex options are given below (some taken from Timo Bingman's scanner example. thanks art %option noyywrap %option prefix="Slip" /* %option c++ */ %option prefix="Slip" /* the manual says "somewhat more optimized" */ %option batch %option nounistd %option yyclass="SlipFlex" /* --header-file generates a C header file */ /* --noline is used because %option noline generates an error */ /* flex --header-file="SlipLex.h" --noline Slip.lex */ |
From: Arthur S. <asc...@at...> - 2013-12-04 19:01:14
|
I don't understand the need for rescanning the input. The reasoning (that I have) for why it is not needed is: A scanned token consists of: prefix suffix Where the prefix and suffix are strings. If the RE is: prefix/suffix, where suffix is a single character then: 1: prefix is accepted which implies that on next use of the scanner we start in some state, BEGIN(state). 2: Because the FOLLOW set suffix is a single character, by definition, it is possible to determine the start RE to be evaluated without rescanning. 3: The exit condition, then consists of the 3-tuple <suffix, state, RE> 3: On reentry to yylex(), assuming that acceptance means "return", the exit condition is processed by a yylex() preamble. if the RE is: prefix/suffix, where suffix is multiple characters 1: prefix is accepted which implies that on next use of the scanner we start in some state, BEGIN(state). 2: Because the FOLLOW set suffix is multiple character the RE to be used on reentry must be determined by RE test execution. 3: The exit condition, then consists of the 3-tuple <suffix, state, RE> 3: On reentry to yylex(), assuming that acceptance means "return", the exit condition is processed by a yylex() preamble. The user supplied RE's should be concatenated, not made into separate RE DFSM's. This means: prefixsuffix becomes part of a single machine rather than two machines, prefix and prefixsuffix. For example the following flex input should generate a machine with no backup: CHAR [cC] LONG [lL] SIGNED ({CHAR}|{LONG}) UNSIGNED ([uU]({CHAR}|{LONG})?) OCTAL 0[0-7]* FOLLOW [,;:\(\)<>/{}|[:cntrl:]| ] %% {OCTAL}/{FOLLOW} { printf("OCTAL %s\n", yytext); return 1;} {OCTAL}{SIGNED}/{FOLLOW} { printf("OCTAL[C|L] %s\n", yytext); return 2;} {OCTAL}{UNSIGNED}/{FOLLOW} { printf("OCTAL[UC|UL] %s\n", yytext); return 3;} . %% The resultant machine would accept {OCTAL}/{FOLLOW}, return the value of OCTAL (return 1) and remember the FOLLOW character seen as input in the INITIAL state for RE '.'. And similarly for the remainder. I have a included a scanner, for an example in John Levine's "flex & bison" O'Reilly book. Unfortunately, the original flex input does not have any backup states (sigh) so the example is deficient. But it shows state concatenation and a yylex() preamble. The example scanner input is: /* Companion source code for "flex & bison", published by O'Reilly * Media, ISBN 978-0-596-15597-1 * Copyright (c) 2009, Taughannock Networks. All rights reserved. * See the README file for license conditions and contact info. * $Header: /home/johnl/flnb/code/RCS/fb1-5.l,v 2.1 2009/11/08 02:53:18 johnl Exp $ */ /* recognize tokens for the calculator and print them out */ %{ # include "fb1-5.tab.h" %} %% "+" { return ADD; } "-" { return SUB; } "*" { return MUL; } "/" { return DIV; } "|" { return ABS; } "(" { return OP; } ")" { return CP; } [0-9]+ { yylval = atoi(yytext); return NUMBER; } \n { return EOL; } "//".* [ \t] { /* ignore white space */ } . { yyerror("Mystery character %c\n", *yytext); } %% |
From: Mark H. <ma...@co...> - 2013-11-08 18:57:16
|
On 11/06/2013 07:57 AM, Mark Hounschell wrote: > On 11/06/2013 03:19 AM, Akim Demaille wrote: >> >> Le 5 nov. 2013 ? 14:11, Mark Hounschell <ma...@co...> a »crit : >> >>> Thanks Akim, >> >> Hi! >> >>> Like I said in my original post, I am yacc/lex ignorant. The strange thing, that I haven't mentioned is that this all built successfully 4, 5, or more years ago on Linux. >> >> I would not have expected that, given what you sent. >> >>> I was recently able to find that executable that I had checked into CVS those years back and it works. I also found some notes of what I originally had to do to get it to build. All I had to do back then was: >>> >>> 1. Changed all ocurrances of yylval.ntype >>> to yylval.nvaltype.ntype >>> 2. Changed all occurances of yylval.nval >>> to yylval.nvaltype.nval >>> >>> 3. Changed all occurances of yybgin to yy_start >>> >>> 4. Changed all occurrences of "k =/ 10" to "k /= 10" >> >> Wow, that piece of software _is_ old! Could you tell us what >> it is? >> > > It's a micro code assembler for a legacy CPU boards micro engine. It is > an early 80s generation CPU board. From back in the days when powerfull > CPUs were not yet on a chip. I still repair these boards and often a > micro diagnostic has to be modified to create tight scope loops. The > peice of software I'm trying to build creates the assembler used to > compile the micros and firmware for this board. There was a time this > peice of software was "Company private". That was long ago though. I > would have no problem providing the code if it would help me get it to > build again? > >>> As far as including the whole scanner in the yacc file, the y.tab.c file does include the lex file but at the very end of it. After this BEGIN shows up. >> >> BEGIN is a macro, so it must be #defined before it is >> used. >> >>> I assume lex.yy.c is the whole scanner? >> >> Yes, that's what I meant. >> >>> And I also assume you mean trying to include it before the BEGIN? >> >> To include it before the body of the parser. You'll have to find >> the right place, as the scanner certainly also wants to "see" things >> from the parser, such as YYSTYPE I guess. >> > > Since I don't remember what version of SuSE Linux I used when it > actually did built right, I might just get out all my old dist CDs and > see if I can pin down the versions that did work. > > Regards > Mark I have determined it was SuSE-8.2 that the working executable was built on. Verified by installing a SuSE-8.2 system and it builds just fine. SuSE-8.2 has the following revisions of software #rpm -q gcc glibc yacc flex bison gcc-3.3-23 glibc-2.3.2-6 yacc-91.7.30-663 flex-2.5.4a-97 bison-1.75-39 What I've found is lex/flex is NOT the problem at all. The problem is bison -y is NOT doing the same thing yacc does. On the 8.2 system the makefile specifies "YACC = yacc". If I change it to "YACC = bison -y", I get the same failure I do on the current system. But, I found a package called byacc. Using this instead of "bison -y" or "yacc" has fixed my problem. Back on SuSE-8.2 yacc was it's own package. I guess when yacc and bison were combined someone had the insight to still provide the original yacc package as byacc. I'm happy... Mark |