// Create a parser that reads from the scanner
JavaRecognizer parser = new JavaRecognizer(lexer);
parser.setFilename(f);
// start parsing at the compilationUnit rule
parser.compilationUnit();
// do something with the tree
doTreeAction(f, parser.getAST(), parser.getTokenNames());
}
catch (Exception e) {