poundSignFilterStream psfstream = new poundSignFilterStream(new CharArrayReader(scriptWithEndTag));
ANTLRNoCaseReaderStream input = new ANTLRNoCaseReaderStream(psfstream); // +
//ANTLRNoCaseReaderStream input = new ANTLRNoCaseReaderStream(new CharArrayReader(scriptWithEndTag)); // +
CFScriptLexer lexer = new CFScriptLexer(input);
tokenStream = new CommonTokenStream(lexer);
CFScriptParser parser = new CFScriptParser(tokenStream);
StdErrReporter errorReporter = new StdErrReporter();
lexer.setErrorReporter(errorReporter);
parser.setErrorReporter(errorReporter);
try {
// "</CFSCRIPT>")
// )
// );
ParserRuleReturnScope r = parser.scriptBlock();
CommonTree tree = (CommonTree) r.getTree();
// first item is EOF, so get kids to get kids
if (tree == null) {
ScriptItem errorNode = new ScriptItem(0, 0, 0, "error");
errorNode.setItemData("Error creating outline: " + parserState.getMessages().toString());