I've downloaded just Bison of the GnuWin32 compiler pack, I've downloaded the
setup without sources and all got right when installing, then I tried to test
it with the simple rpcalc.y example:
/* Reverse polish notation calculator. */%{#define YYSTYPE double#include<math.h>%}%tokenNUM%%/* Grammar rules and actions follow */input:/* empty */|inputline;line:'\n'|exp'\n'{printf("\t%.10g\n",$1);};exp:NUM{$$=$1;}|expexp'+'{$$=$1+$2;}|expexp'-'{$$=$1-$2;}|expexp'*'{$$=$1*$2;}|expexp'/'{$$=$1/$2;}/* Exponentiation */|expexp'^'{$$=pow($1,$2);}/* Unary minus */|exp'n'{$$=-$1;};%%/* Lexical analyzer returns a double floating point number on the stack and the token NUM, or the ASCII character read if not a number. Skips all blanks and tabs, returns 0 for EOF. */#include<ctype.h>yylex(){intc;/* skip white space */while((c=getchar())==' '||c=='\t');/* process numbers */if(c=='.'||isdigit(c)){ungetc(c,stdin);scanf("%lf",&yylval);returnNUM;}/* return end-of-file */if(c==EOF)return0;/* return single chars */returnc;}
But when I've tried to use bison: C:> bison rpcalc.y, I just got a lot of
garbage: http://nathanpc.pastebin.com/f2fae6710, it's too much big, then I've posted at pastebin.
Why is this happening?
What I need to do?
Have this already happened to you?
Best Regards,
Nathan Paulino Campos
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to reproduce this error using the source code you have posted and it
worked perfectly on both Gnuwin and DJGPP 2.04 beta. Please state your MS
Windows version and check the versions of m4 and bison. Are you running using
the MS command window or some other shell? When you install the gnuwin
packages are you installing all to the same folder or to different folders for
each package. The way I install them all the .exe and .dll files are in the
same `bin\' directory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've downloaded just Bison of the GnuWin32 compiler pack, I've downloaded the
setup without sources and all got right when installing, then I tried to test
it with the simple rpcalc.y example:
But when I've tried to use bison: C:> bison rpcalc.y, I just got a lot of
garbage: http://nathanpc.pastebin.com/f2fae6710, it's too much big, then I've posted at pastebin.
Why is this happening?
What I need to do?
Have this already happened to you?
Best Regards,
Nathan Paulino Campos
I tried to reproduce this error using the source code you have posted and it
worked perfectly on both Gnuwin and DJGPP 2.04 beta. Please state your MS
Windows version and check the versions of m4 and bison. Are you running using
the MS command window or some other shell? When you install the gnuwin
packages are you installing all to the same folder or to different folders for
each package. The way I install them all the .exe and .dll files are in the
same `bin\' directory.