// TermRhs: ExpOperator Factor TermRhs private void MatchExprExp(out IExpr result) { IExpr lhs; MatchExprUnary(out lhs); if (curToken.Type == TokenTypes.EXP) { curToken = tokens.Extract(); IExpr rhs; MatchExprUnary(out rhs); result = new FunctionExp(lhs, rhs); } else { result = lhs; } }
// TermRhs: ExpOperator Factor TermRhs private void MatchExprExp(out IExpr result) { IExpr lhs; MatchExprUnary(out lhs); if (curToken.Type == TokenTypes.EXP) { curToken = tokens.Extract(); IExpr rhs; MatchExprUnary(out rhs); result = new FunctionExp(lhs, rhs); } else result = lhs; }