src/main/java/com/upcrob/tagexp/Evaluator.java
public boolean evaluate(String expression, Collection<String> tags, boolean caseSensitive) {
		// Verify arguments are non-null
		if (expression == null || tags == null) {
			throw new IllegalArgumentException("Input arguments must be non-null.");
		}
		
		// Setup lexer and parser
		TagExpLexer lexer = new TagExpLexer(new ANTLRStringStream(expression));
		TagExpParser parser = new TagExpParser(new CommonTokenStream(lexer));
		
		// Build parse tree
		Node root;
		try {
			root = parser.eval();
		} catch (RecognitionException e) {
			throw new ParseException("Invalid expression.", e);
		}

		// Evaluate tree
		return eval(root, new HashSet<String>(tags), caseSensitive);
	}
/**
	 * Evaluates a tag expression against an input Collection of Strings
	 * to determine its truth value.
	 *
	 * @param expression Input expression String.
	 * @param tags Input Collection of tag Strings.
	 * @param caseSensitive Toggles case-sensitivity of tag-search.  Note that
	 *   a case-insensitive search may be slower.
	 * @throws ParseException Thrown if the expression could not be parsed.
	 * @return Expression result.
	 */
Evaluates a tag expression against an input Collection of Strings
to determine its truth value.

@param expression Input expression String.
@param tags Input Collection of tag Strings.
@param caseSensitive Toggles case-sensitivity of tag-search.  Note that
a case-insensitive search may be slower.
@throws ParseException Thrown if the expression could not be parsed.
@return Expression result.
Evaluates a tag expression against an input Collection of Strings to determine its truth value . @param expression Input expression String . @param tags Input Collection of tag Strings . @param caseSensitive Toggles case - sensitivity of tag - search . Note that a case - insensitive search may be slower . @throws ParseException Thrown if the expression could not be parsed . @return Expression result .
public boolean evaluate(String expression, Collection<String> tags, boolean caseSensitive) {
		if (expression == null || tags == null) {
			throw new IllegalArgumentException("Input arguments must be non-null.");
		}
		TagExpLexer lexer = new TagExpLexer(new ANTLRStringStream(expression));
		TagExpParser parser = new TagExpParser(new CommonTokenStream(lexer));
		Node root;
		try {
			root = parser.eval();
		} catch (RecognitionException e) {
			throw new ParseException("Invalid expression.", e);
		}
		return eval(root, new HashSet<String>(tags), caseSensitive);
	}
public boolean evaluate ( String expression , Collection < String > tags , boolean caseSensitive ) { if ( expression == null || tags == null ) { throw new IllegalArgumentException ( "Input arguments must be non-null." ) ; } TagExpLexer lexer = new TagExpLexer ( new ANTLRStringStream ( expression ) ) ; TagExpParser parser = new TagExpParser ( new CommonTokenStream ( lexer ) ) ; Node root ; try { root = parser . eval ( ) ; } catch ( RecognitionException e ) { throw new ParseException ( "Invalid expression." , e ) ; } return eval ( root , new HashSet < String > ( tags ) , caseSensitive ) ; }
Evaluates a tag expression against an input Collection of Strings
 to determine its truth value.
Evaluates a tag expression against an input Collection of Strings to determine its truth value .
// Verify arguments are non-null // Setup lexer and parser // Build parse tree // Evaluate tree