!7 // We can parse and evaluate ALL THIS: sS stuffToParse = [[ 1 1 - 2 1 - 2 - 3 1 - (2 - 3) -5 - 4 (4 - 3) - 2 100 / (10 * 2) 100 / 10 / 10 ]]; sS concepts = [[ // ...just by giving a few parsing concepts (w/increasing binding power): ["jcnbmtmfzktxhzyf", "X + Y"], ["jxcubqjtqykhfvyo", "X - Y", "as in minus"], ["erdirznfvsrbtfns", "X / Y", "division"], ["bwqhmnorjpyomdbv", "X * Y", "multiplication"], // ...and a bit of meta-level stuff: ["mcoswmplpqlieruo", "(X)"], ["olphazqzxxnvtjcx", "X evaluates through standard function Y."], ["wwaprwlmqzqeaikp", "A leaf satisfying standard function X evaluates through standard function Y."], ["hkihrqgdlkdayxzn", "X is just bracketing."], ]]; // ...and finally linking everything together by relating concepts // to JavaX standard functions. sS statements = [[ olphazqzxxnvtjcx jcnbmtmfzktxhzyf "plus" olphazqzxxnvtjcx jxcubqjtqykhfvyo "minus" olphazqzxxnvtjcx bwqhmnorjpyomdbv "multiply" olphazqzxxnvtjcx erdirznfvsrbtfns "divide" hkihrqgdlkdayxzn mcoswmplpqlieruo wwaprwlmqzqeaikp "isInteger" "bigint" ]]; // The rest is boilerplate. p-tt { centerHigherConsole(); testLispEval(concepts, statements, stuffToParse); }