[scripting] Arithmetic parser
authorLynus Vaz <lynusvaz@gmail.com>
Sun, 26 Jul 2009 05:20:54 +0000 (10:50 +0530)
committerLynus Vaz <lynusvaz@gmail.com>
Fri, 31 Jul 2009 16:26:58 +0000 (21:56 +0530)
commitd6f7017ac5827009d21648b079538fb5eeaed002
tree5e5e7e2a9173be8c38157204860c76403204afc8
parentd5fb663f0205ed3e7b9474222db562a139e2356b
[scripting] Arithmetic parser

This patch adds in arithmetic operations. The expression is to be
enclosed within a $(). It also has support for string comparison.
E.g.:
echo $(12+3+${i})
set other 10.23.1.$(${base}^${mask})
echo $(${net1/ip} != "")
src/hci/arith.c [new file with mode: 0644]
src/hci/parse.c
src/include/gpxe/errfile.h
src/include/gpxe/parse.h
src/tests/arith_test.gpxe [new file with mode: 0644]
src/tests/arith_test.out [new file with mode: 0644]