Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > Facing problems with lex/bison

Thread Tools

Facing problems with lex/bison

prashantkyal prashantkyal is offline
Junior Member
Join Date: Sep 2007
Posts: 1
Hi ppl!
I am new to bison and lex. I have written a set of programs in lex and bison where yylex generated thru lex is used as an input in bison.
When I try to compile the files, the tab.c file generated thru bison is compiled successfully. But during the compilation of the file generated thru the lex starts I get the following error:

g++ -o obj/conf_parser.o -I/home/pkyal/WORK/SWAT/MMDSP/parser/test/devkit/libmmparser/obj -I/home/pkyal/WORK/SWAT/MMDSP/parser/devkit/libmmparser/include -Wno-deprecated -c obj/conf_parser.cpp
In file included from conf_parser.l:4:
conf_parser.y:130: syntax error before `*' token
conf_parser.y:131: syntax error before `*' token
conf_parser.y:132: syntax error before `*' token
conf_parser.y:133: syntax error before `*' token

the lines in cinf_parser.y as per the error are as follows:
126 %union {
127 int integer;
128 float float_ieee;
129 char* str;
130 YYLIST_T* list;
131 YYCORE_T* coretype;
132 YYBLOC_T* bloctype;
133 YYPARAM_T* paramtype;
134 }

I'm using YYLIST_T etc as datatypes that I wish to parse. I have typedef them in an included header.

Any suggestions as to what may be the possible error... a problem due to different version or somethng... bcoz I dont see any syntactic error in the code..
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
facing problems in xml parser using C Ajit-the Gick C Programming 2 02-09-2007 09:46 AM
Facing problem in loading data from CArchive in VCDotNet. Konark Khera ASP .Net 0 03-22-2005 11:24 AM
Re: Problems facing in datagrid pagecount Daniel Joskovski MCSD 0 04-08-2004 10:14 PM
Re: Problems facing in datagrid pagecount Daniel Joskovski MCSD 0 04-07-2004 12:40 AM
Facing problems with Dual listbox Custom Server Control Avneesh Kumar ASP .Net Building Controls 1 10-01-2003 03:29 PM