The syntax is given by the following productions:
<expression> ::= <value> | <value> <operator> <expression> <value> ::= <number> | <sign> <number> <number> ::= <unsigned> | <unsigned> . <unsigned> <unsigned> ::= <digit> | <digit> <unsigned> <digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 <sign> ::= + | - <operator> ::= + | - | * | /
No operator precedence rules are recognized and no spaces are allowed.
Click here to download a zip file containing the source code.
Click here to download a zip file containing the Java executable applet classes calcApplet.class and calcPanel.class.