!7 sS stuffToParse = [[ 1"); 1"); (5) 2 * (3) 1 * (2 + 3) (1 + 2) * 3 (1 + 2) * (3 + 4) 1 + 2 * 3 1 * 2 + 3 ]]; sS concepts = [[ ["jcnbmtmfzktxhzyf", "X + Y"], ["bwqhmnorjpyomdbv", "X * Y", "multiplication"], ["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."], ]]; sS statements = [[ olphazqzxxnvtjcx jcnbmtmfzktxhzyf "plus" olphazqzxxnvtjcx bwqhmnorjpyomdbv "multiply" hkihrqgdlkdayxzn mcoswmplpqlieruo wwaprwlmqzqeaikp "isInteger" "bigint" ]]; p-tt { centerHigherConsole(); useConcepts(concepts); useFacts_cl(statements); //set englishToConceptLanguage_xyz_debug; for (S line : toLinesFullTrim(stuffToParse)) testParse(line); } svoid testParse(S s) { Lisp l = parseIt(print(s); if (l == null) { print(" null"); ret; } printIndent(l); } // parse the arguments which are original strings static Lisp parseSub(Lisp l) { if (l == null || l.isLeaf()) ret l; Lisp x = lisp(l.head); for (Lisp a : l.args) x.add(or(parseIt(a.raw()), a)); ret x; } static Lisp parseIt(S s) { Lisp l = chooseBestArgumentHygiene(englishToLispWith_multi(s, ll("mcoswmplpqlieruo", "jcnbmtmfzktxhzyf", "bwqhmnorjpyomdbv"))); ret l == null ? lisp(s) : parseSub(l); } static O eval(Lisp l) { ret generalLispEval(l); }