示例#1
0
        // 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;
            }
        }
示例#2
0
		// 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;
		}