public static void symbols(PrintStream out,boolean emit_non_terms){
  terminal term;
  non_terminal nt;
  long start_time=System.currentTimeMillis();
  out.println();
  out.println("//----------------------------------------------------");
  out.println("// The following code was generated by " + version.title_str);
  out.println("// " + new Date());
  out.println("//----------------------------------------------------");
  out.println();
  emit_package(out);
  out.println("/** JavaCup generated class containing symbol constants. */");
  out.println("public class " + symbol_const_class_name + " {");
  out.println("  /* terminals */");
  for (Enumeration e=terminal.all(); e.hasMoreElements(); ) {
    term=(terminal)e.nextElement();
    out.println("  static final int " + term.name() + " = "+ term.index()+ ";");
  }
  if (emit_non_terms) {
    out.println("\n  /* non terminals */");
    for (Enumeration e=non_terminal.all(); e.hasMoreElements(); ) {
      nt=(non_terminal)e.nextElement();
      out.println("  static final int " + nt.name() + " = "+ nt.index()+ ";");
    }
  }
  out.println("};\n");
  symbols_time=System.currentTimeMillis() - start_time;
}

public static void symbols ( PrintStream out , boolean emit_non_terms ) { terminal term ; non_terminal nt ; long start_time = System . currentTimeMillis ( ) ; out . println ( ) ; out . println ( "//----------------------------------------------------" ) ; out . println ( "// The following code was generated by " + version . title_str ) ; out . println ( "// " + new Date ( ) ) ; out . println ( "//----------------------------------------------------" ) ; out . println ( ) ; emit_package ( out ) ; out . println ( "/** JavaCup generated class containing symbol constants. */" ) ; out . println ( "public class " + symbol_const_class_name + " {" ) ; out . println ( "  /* terminals */" ) ; for ( Enumeration e = terminal . all ( ) ; e . hasMoreElements ( ) ; ) { term = ( terminal ) e . nextElement ( ) ; out . println ( "  static final int " + term . name ( ) + " = " + term . index ( ) + ";" ) ; } if ( emit_non_terms ) { out . println ( "\n  /* non terminals */" ) ; for ( Enumeration e = non_terminal . all ( ) ; e . hasMoreElements ( ) ; ) { nt = ( non_terminal ) e . nextElement ( ) ; out . println ( "  static final int " + nt . name ( ) + " = " + nt . index ( ) + ";" ) ; } } out . println ( "};\n" ) ; symbols_time = System . currentTimeMillis ( ) - start_time ; }
emit code for the symbol constant class , optionally including non terms , if they have been requested .
