| Class to calculate expressions. It implements a simple LL(1)
grammar to calculate simple expressions with the basic
operators +,-,*,/ and brackets.
The grammar in EBNF notation:
<expr> -> <term> { '+' <term> } | <term> { '-' <term> }
<term> -> <fact> { '*' <fact> } | <fact> { '/' <fact> }
<fact> -> <nmeral> | '(' <expr> ')'
author: Arnold Beck version: $Id: ExprCalc.java,v 1.12 2004/09/29 14:29:24 pierre Exp $ |