Code example for PushbackReader

0
	public WarriorScript build(InputStream in) throws ParserException, LexerException, IOException {
		return build(new InputStreamReader(in));
	} 
 
	public WarriorScript build(Reader reader) throws ParserException, LexerException, IOException {
		Lexer lexer = new Lexer(new PushbackReader(reader));
		Parser parser = new Parser(lexer);
		Start ast = parser.parse();
		 
		Compiler compiler = new Compiler();
		 
		ast.apply(pruner);
		ast.apply(dotted);
		ast.apply(compiler);
		 
		return compiler.getScript();
	} 
}