DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(bison.info.gz) RPN Calc

Info Catalog (bison.info.gz) Examples (bison.info.gz) Infix Calc
 
 Reverse Polish Notation Calculator
 ==================================
 
    The first example is that of a simple double-precision "reverse
 polish notation" calculator (a calculator using postfix operators).
 This example provides a good starting point, since operator precedence
 is not an issue.  The second example will illustrate how operator
 precedence is handled.
 
    The source code for this calculator is named `rpcalc.y'.  The `.y'
 extension is a convention used for Bison input files.
 

Menu

 
* Decls Rpcalc Decls.  Prologue (declarations) for rpcalc.
* Rules Rpcalc Rules.  Grammar Rules for rpcalc, with explanation.
* Lexer Rpcalc Lexer.  The lexical analyzer.
* Main Rpcalc Main.    The controlling function.
* Error Rpcalc Error.  The error reporting function.
* Gen Rpcalc Gen.      Running Bison on the grammar file.
* Comp Rpcalc Compile. Run the C compiler on the output code.
 
Info Catalog (bison.info.gz) Examples (bison.info.gz) Infix Calc
automatically generated byinfo2html