/* class header */
public static void symbols(PrintWriter out,
			boolean emit_non_terms, boolean sym_interface)
	{
		terminal term;
		non_terminal nt;
		String class_or_interface = (sym_interface) ? "interface" : "class";
		long start_time = System.currentTimeMillis();
		/* top of file */
		out.println();
		out.println("//----------------------------------------------------");
		out.println("// The following code was generated by " + version.title_str);
		out.println("//----------------------------------------------------");
		out.println();
		emit_package(out);
		/* class header */
		out.println("/** CUP generated " + class_or_interface +
				" containing symbol constants. */");
		out.println("public " + class_or_interface + " " +
				symbol_const_class_name + " {");
		out.println("  /* terminals */");
		/* walk over the terminals *//* later might sort these */
		for (Enumeration e = terminal.all(); e.hasMoreElements();)
		{
			term = (terminal) e.nextElement();
			/* output a constant decl for the terminal */
			out.println("  public static final int " + term.name() + " = " +
					term.index() + ";");
		}
		/* Emit names of terminals */
		out.println("  public static final String[] terminalNames = new String[] {");
		for (int i = 0; i < terminal.number(); i++) {
			out.print("  \"");
			out.print(terminal.find(i).name());
			out.print("\"");
			if (i < terminal.number() - 1) {
				out.print(",");
			}
			out.println();
		}
		out.println("  };");
		/* do the non terminals if they want them (parser doesn't need them) */
		if (emit_non_terms)
		{
			out.println();
			out.println("  /* non terminals */");
			/* walk over the non terminals *//* later might sort these */
			for (Enumeration e = non_terminal.all(); e.hasMoreElements();)
			{
				nt = (non_terminal) e.nextElement();
				// ****
				// TUM Comment: here we could add a typesafe enumeration
				// ****
				/* output a constant decl for the terminal */
				out.println("  static final int " + nt.name() + " = " +
						nt.index() + ";");
			}
		}
		/* end of class */
		out.println("}");
		out.println();
		symbols_time = System.currentTimeMillis() - start_time;
	}
out.println();
emit_package(out);
/* class header */
out.println("/** CUP generated " + class_or_interface +
" containing symbol constants. */");
non_terminal nt;
String class_or_interface = (sym_interface) ? "interface" : "class";
long start_time = System.currentTimeMillis();
/* top of file */
out.println();
out.println("//----------------------------------------------------");
out.println("// The following code was generated by " + version.title_str);
out.println("//----------------------------------------------------");
out.println();
emit_package(out);
/* class header */
out.println("/** CUP generated " + class_or_interface +
" containing symbol constants. */");
out.println("public " + class_or_interface + " " +
symbol_const_class_name + " {");
out.println(" /* terminals */");
/* walk over the terminals *//* later might sort these */
for (Enumeration e = terminal.all(); e.hasMoreElements();)
{
term = (terminal) e.nextElement();
/* output a constant decl for the terminal */
public static void symbols(PrintWriter out,
boolean emit_non_terms, boolean sym_interface)
{
terminal term;
non_terminal nt;
String class_or_interface = (sym_interface) ? "interface" : "class";
long start_time = System.currentTimeMillis();
/* top of file */
out.println();
out.println("//----------------------------------------------------");
out.println("// The following code was generated by " + version.title_str);
out.println("//----------------------------------------------------");
out.println();
emit_package(out);
/* class header */
out.println("/** CUP generated " + class_or_interface +
" containing symbol constants. */");
out.println("public " + class_or_interface + " " +
symbol_const_class_name + " {");
out.println(" /* terminals */");
/* walk over the terminals *//* later might sort these */
for (Enumeration e = terminal.all(); e.hasMoreElements();)
{
term = (terminal) e.nextElement();
/* output a constant decl for the terminal */
out.println(" public static final int " + term.name() + " = " +
term.index() + ";");
}
/* Emit names of terminals */
out.println(" public static final String[] terminalNames = new String[] {");
for (int i = 0; i < terminal.number(); i++) {
out.print(" \"");
out.print(terminal.find(i).name());
out.print("\"");
if (i < terminal.number() - 1) {