/**
* Creates a properly-configured parser object for the E4X grammar.
*/
public static RegexSimpleParser parserOn(Reader in) throws IOException {
ANTLRReaderStream cs = new ANTLRReaderStream(in);
RegexSimpleLexer lexer = new RegexSimpleLexer(cs);
LinkedListTokenSource source = new LinkedListTokenSource(lexer);
LinkedListTokenStream stream = new LinkedListTokenStream(source);
RegexSimpleParser parser = new RegexSimpleParser(stream);
parser.setTreeAdaptor(TREE_ADAPTOR);
parser.setInput(lexer, cs);