Dr. Dobb's Journal March 1999
// ... parse the file ...
public static void parseFile(InputStream s, String fname)
throws Exception {
try {
// Create a scanner that reads from the input stream
KPLLexer lexer = new KPLLexer(s);
// Create a parser that reads from the scanner
KPLParser parser = new KPLParser(lexer);
parser.setCurrentFile(fname);
// start parsing at the compilationUnit rule
parser.compilationUnit();
...