help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does Reverse Polish Notation Calculator example work?


From: Mike cai
Subject: Re: Does Reverse Polish Notation Calculator example work?
Date: Sat, 1 Apr 2006 00:49:09 -0800 (PST)

Hi,
   
  Never Mind. I made a typo and it works now.
   
  M

Mike cai <address@hidden> wrote:
    Hi,
   
  I am learning to use bison. I read bison 2.1 online manual posted on 
http://www.gnu.org/software/bison/manual/html_mono/bison.html. There is an 
example in section 2.1 "Reverse Polish Notation Calculator". I typed in all the 
syntax rule and actions. I ran bison rpcalc.y and compile the output 
rpcalc.tab.c successful. When I try to run the program, it does not give 
correct result. No matter what expression I input, it returns 2.121995791e-314. 
For example,
  1 2 +
  2.121995791e-314
   
  It seems that the value of yylval is not passed to variables $1 and $2 in the 
action. Does anybody try that example successfully?
   
  By the way, I am using bison 2.1.
   
  Regards,
   
  M
    
---------------------------------
  How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

                
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]