expr: Replace expression engine
commitbd5139c89e714bb7e10a0da55d9a10f51e93516c
authorSteve Bennett <steveb@workware.net.au>
Fri, 12 May 2017 03:33:44 +0000 (12 13:33 +1000)
committerSteve Bennett <steveb@workware.net.au>
Tue, 23 May 2017 04:36:56 +0000 (23 14:36 +1000)
treea1fb42986a3abc588e05f0b7eea4361c723f779c
parent7b2250a7e60968b0c3716a7caa780e6ca0a2ce9b
expr: Replace expression engine

Rework the expression engine to use recursive descent evaluation rather than
a shunting yard algorithm. Among other things, it is easier to make lazy operators
and the ternary operator work correctly.

In particular, the following expression no longer crashes: $(99?9,99?9:*9:999)?9)

And the code is now smaller.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.c
jim.h
regtest.tcl
tests/expr.test