Re: flex+bison and C++, second part (Solved)

2007-04-12 Thread Tamas Nagy
Hi! All problem solved by reading and applying: http://tldp.org/HOWTO/Lex-YACC-HOWTO-5.html Tamas > Hi! > > With no parser.c. Main() is in the .y file, the > following error occured: > > alfa.tab.cpp: In function `int yyparse()': > alfa.tab.cpp:1097: error: `yylex' undeclared (first > use thi

Re: flex+bison and C++, second part

2007-04-12 Thread Tamas Nagy
Hi! With no parser.c. Main() is in the .y file, the following error occured: alfa.tab.cpp: In function `int yyparse()': alfa.tab.cpp:1097: error: `yylex' undeclared (first use this function) alfa.tab.cpp:1097: error: (Each undeclared identifier is reported only once for each function it appear

Re: flex+bison and C++, second part

2007-04-12 Thread Tamas Nagy
Hi! I also have a parser.c file. (sourcehandler) Should i have to rewrite it to c++ or just link it? Because of this, which is in the .y file: vrml_filel_init(f, argv[1]); it cannot compile to c++. Even if #include "prog.tab.h" it cannot see the above function. I have the bottom files too: >

Re: flex+bison and C++, second part

2007-04-10 Thread JPerez45
Got link problem (i suppose) so the general way to compile a lex & yacc program is: 1. Generate the lexer lex my_file.l 2. Generate the parser yacc -d my_file.y 3. Compile the sources cc -c lex.yy.c y.tab.cc 4. Link the object files (this is what i think your problem is) cc -o my_

flex+bison and C++, second part

2006-07-18 Thread pasquale minervini
I'm giving some more tries to generate a C++ parser for a small language, here it's the result: http://www.neuralnoise.com/small_backup_2/ it's hevily ripped off by the example calc++, and I really don't know why I can't get scanner.cc (the file generated from "flex -+ -o scanner.cc scanner.ll")

flex+bison and C++

2006-07-17 Thread pasquale minervini
Hi, I just made a small parser using flex and bison, to integrate it in a bigger project, and it works like a charm; here it is: http://www.neuralnoise.com/small_backup/ . I'm now having problems generating a C++ parser (I'm currently trying to do it using the bison's "-d -S lalr1.cc" and flex'