public TemplateSyntaxTree parse(Reader input, String templateName, EscapeMode escapeMode)
throws JSilverIOException, JSilverBadSyntaxException {
try {
PushbackReader pushbackReader = new PushbackReader(input, PUSHBACK_SIZE);
Lexer lexer = new Lexer(pushbackReader);
Parser parser = new Parser(lexer);
Start root = parser.parse();
process(root, escapeMode, templateName);
return new TemplateSyntaxTree(root);
} catch (IOException exception) {
throw new JSilverIOException(exception);
} catch (ParserException exception) {