if (expression.startsWith("not ")) { expression = "!" + expression.substring( "not ".length() ); }
	public boolean evaluate( String expression, String fileName, int line ) 	throws BuildException 	{		// main loop: extract all simple expressions (without parenthesisses) and 		// evaluate each of them.				// replace all tabs by spaces:		expression = expression.replace('\t', ' ');				// first step: replace all properties:		if ( this.environment != null) {			//System.out.println("BooleanEvaluator: prev: " + expression);			expression = this.environment.writeProperties( expression );			//System.out.println("BooleanEvaluator: post: " + expression);		} else {			expression = PropertyUtil.writeProperties(expression, this.variables);		}		// second step: replace " and " with && and " or " with ||		expression = StringUtil.replace( expression, " and ", " && " );		expression = StringUtil.replace( expression, " or ", " || " );		expression = StringUtil.replace( expression, " not ", " !" );		expression = StringUtil.replace( expression, " xor ", " ^ " );				// now extract each term:		Matcher matcher = TERM_PATTERN.matcher( expression );		try {			boolean foundParenthesis = matcher.find(); 			while ( foundParenthesis ) {				String group = matcher.group();				String term = group.substring( 1, group.length() -1 ); // the term has no parenthesis				boolean result = evaluateTerm( term, fileName, line );				expression = StringUtil.replaceFirst( expression, group, "" + result );								// find next "(...)" term:				foundParenthesis = matcher.find();				if (!foundParenthesis) {					matcher = TERM_PATTERN.matcher( expression );					foundParenthesis = matcher.find();				}			}			// now the expression is simplified to a term without parenthesis:			return evaluateTerm( expression, fileName, line );		} catch (IndexOutOfBoundsException e) {			System.err.println("Error while evaluating expression [" + expression + "].");			throw e;		}	}