// TODO: is it very inefficient to create a new lexer and parser for each input string?
CharStream s = new ANTLRStringStream(expression);
TwipleLexer lexer = new TwipleLexer(s);
CommonTokenStream tokens = new CommonTokenStream();
tokens.setTokenSource(lexer);
TwipleParser parser = new TwipleParser(tokens);
List<List<Resource>> sequences;
try {
sequences = parser.tweet();
} catch (RecognitionException e) {
throw new MatcherException(e);
}
for (List<Resource> sequence : sequences) {