static Exp nlLogic_parseExpression(S s) { L tok = javaTokPlusBrackets(s); // a && b PairS p = splitAtTokens_once(tok, ll("&", "", "&")); if (p != null) ret And(nlLogic_parseExpression(first(p)), nlLogic_parseExpression(second(p))); // function if (l(tok) == 5 && isIdentifier(tok.get(1)) && isRoundBracketed(tok.get(3))) ret Func(tok.get(1), nlLogic_parseExpression(deRoundBracket(tok.get(3)))); // a = b LS l = splitAtTokens(tok, ll("=")); if (l(l) == 2) ret Eq(nlLogic_parseExpression(first(l)), nlLogic_parseExpression(second(l))); // default ret Sentence2(l(tok) == 3 && isQuoted(tok.get(1)) ? unquote(first(tok) : join(tok))); }