parser.setTreeAdaptor(new CommonTreeAdaptor(){
public Object create(Token payload){
return new CommonTree(payload);
}
});
literal_return result = parser.literal();
if (parser.getNumberOfSyntaxErrors() > 0){
System.out.println(parser.getNumberOfSyntaxErrors() + " Syntax error(s)\n"
+ parseErrors.toString());
}
tree = (CommonTree) result.getTree();
printTree(tree, 0);
CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
nodes.setTokenStream(tokens);
ForteAST walker = new ForteAST(nodes);
walker.literal();