Beispiel #1
0
        private void MatchExprNot(out IExpr result)
        {
            TokenTypes t;                               // remember the type

            t = curToken.Type;
            if (t == TokenTypes.NOT)
            {
                curToken = tokens.Extract();
            }
            MatchExprRelop(out result);
            if (t == TokenTypes.NOT)
            {
                if (result.GetTypeCode() != TypeCode.Boolean)
                {
                    throw new ParserException("NOT requires boolean expression." + "  At column " + Convert.ToString(curToken.StartCol));
                }
                result = new FunctionNot(result);
            }
        }
Beispiel #2
0
		private void MatchExprNot(out IExpr result)
		{
			TokenTypes t;			// remember the type
			t = curToken.Type;
			if (t == TokenTypes.NOT)
			{
				curToken = tokens.Extract();
			}
			MatchExprRelop(out result);
			if (t == TokenTypes.NOT)
			{
				if (result.GetTypeCode() != TypeCode.Boolean)
					throw new ParserException("NOT requires boolean expression." + "  At column " + Convert.ToString(curToken.StartCol));
				result = new FunctionNot(result);
			}
		}
Beispiel #3
0
		private void MatchExprNot(out IExpr result)
		{
			TokenTypes t;			// remember the type
			t = curToken.Type;
			if (t == TokenTypes.NOT)
			{
				curToken = tokens.Extract();
			}
			MatchExprRelop(out result);
			if (t == TokenTypes.NOT)
			{
				if (result.GetTypeCode() != TypeCode.Boolean)
					throw new ParserException(Strings.Parser_ErrorP_NOTRequiresBoolean + GetLocationInfo(curToken));
				result = new FunctionNot(result);
			}
		}