Arithmetic evaluation: Difference between revisions

m
Line 956:
A compact recursive descent parser using Hanson's device. This program
* handles left and right associativity and different precedences
* is ready to handle any number of infix operators without adding more functions to handle the precedences
* accepts integers, reals, and radix constants (e.g. 3r10 is 3 in base 3)
* currently accepts the Icon operators + - * / % (remainder) and ^ (exponentiation) and unary operators + and -
* string invocation is used to evaluate binary operators hence other Icon binary operators (including handle multiple character ones) can be easily added
* uses Icon style type coercion on operands