hi
I m newbie to flex-bison. Its very urgent for me to learn and write my
own compiler. I found a post on this forum related to flex/bison very
helpful with respect to learning. I am using compiler.y and compiler.l
,syntaxtree.h from the below link.Shared Ali imran Zafar (matrix1)
flex-bison.http://bitbucket.org/matrix/changed-tiny
If i use this input to parse
a = 5;
b = 6;
print(a);
scan(b);
compiler.y works fine and output the parse tree successfully.
I am facing the problem to parse the if condition in the above
compiler.y when But i run this input
a = 5;
b = 6;
if(a <=5 )
a = b;
end
it gives the syntax error on line 3 for if statement.
Compiler.y is not parsing the if condition.I am unable to figure out if
there is some thing wrong with input or grammar compiler.y. Same is the
case for while/for statements.
Please share sample input file to parse the whole grammar so that i can
debug and run compiler or there is something incorrect with
grammar.Please help.
NOTE: I am compiling these files from VS2005 using custom build rules
with flex and bison.I made the VS2005 setup using this link
http://blogs.msdn.com/b/devdev/archive/2005/09/13/465034.aspx
Thanks in advance
Sidra