// Walk the token vocabulary and generate code to register every TokenID->ASTNodeType
// mapping specified in the tokens {...} section with the ASTFactory.
Vector v = g.tokenManager.getVocabulary();
for (int i = 0; i < v.size(); i++) {
String s = (String)v.elementAt(i);
if (s != null) {
TokenSymbol ts = g.tokenManager.getTokenSymbol(s);
if (ts != null && ts.getASTNodeType() != null) {
println("factory.setTokenTypeASTNodeType(" + s + ", \"" + ts.getASTNodeType() + "\");");
}