<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_01) on Mon Apr 23 21:08:59 GMT 2007 -->
<TITLE>
emit
</TITLE>
<META NAME="keywords" CONTENT="java_cup.emit class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="emit";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/emit.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../java_cup/assoc.html" title="class in java_cup"><B>PREV CLASS</B></A>
<A HREF="../java_cup/internal_error.html" title="class in java_cup"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?java_cup/emit.html" target="_top"><B>FRAMES</B></A>
<A HREF="emit.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
java_cup</FONT>
<BR>
Class emit</H2>
<PRE>
java.lang.Object
<IMG SRC="../resources/inherit.gif" ALT="extended by "><B>java_cup.emit</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>emit</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
This class handles emitting generated code for the resulting parser.
The various parse tables must be constructed, etc. before calling any
routines in this class.<p>
Three classes are produced by this code:
<dl>
<dt> symbol constant class
<dd> this contains constant declarations for each terminal (and
optionally each non-terminal).
<dt> action class
<dd> this non-public class contains code to invoke all the user actions
that were embedded in the parser specification.
<dt> parser class
<dd> the specialized parser class consisting primarily of some user
supplied general and initialization code, and the parse tables.
</dl><p>
Three parse tables are created as part of the parser class:
<dl>
<dt> production table
<dd> lists the LHS non terminal number, and the length of the RHS of
each production.
<dt> action table
<dd> for each state of the parse machine, gives the action to be taken
(shift, reduce, or error) under each lookahead symbol.<br>
<dt> reduce-goto table
<dd> when a reduce on a given production is taken, the parse stack is
popped back a number of elements corresponding to the RHS of the
production. This reveals a prior state, which we transition out
of under the LHS non terminal symbol for the production (as if we
had seen the LHS symbol rather than all the symbols matching the
RHS). This table is indexed by non terminal numbers and indicates
how to make these transitions.
</dl><p>
In addition to the method interface, this class maintains a series of
public global variables and flags indicating how misc. parts of the code
and other output is to be produced, and counting things such as number of
conflicts detected (see the source code and public variables below for
more details).<p>
This class is "static" (contains only static data and methods).<p>
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>last update: 11/25/95</DD>
<DT><B>Author:</B></DT>
<DD>Scott Hudson</DD>
<DT><B>See Also:</B><DD><CODE>java_cup.main</CODE></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#_lr_values">_lr_values</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#action_code">action_code</A></B></CODE>
<BR>
User declarations for direct inclusion in user action class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#action_code_time">action_code_time</A></B></CODE>
<BR>
Time to produce action code class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#action_table_time">action_table_time</A></B></CODE>
<BR>
Time to produce the action table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#goto_table_time">goto_table_time</A></B></CODE>
<BR>
Time to produce the reduce-goto table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.util.Stack</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#import_list">import_list</A></B></CODE>
<BR>
List of imports (Strings containing class names) to go with actions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#init_code">init_code</A></B></CODE>
<BR>
User code for user_init() which is called during parser initialization.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#not_reduced">not_reduced</A></B></CODE>
<BR>
Count of the number on non-reduced productions found.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#nowarn">nowarn</A></B></CODE>
<BR>
Do we skip warnings?</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#num_conflicts">num_conflicts</A></B></CODE>
<BR>
Number of conflict found while building tables.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#package_name">package_name</A></B></CODE>
<BR>
Package that the resulting code goes into (null is used for unnamed).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#parser_class_name">parser_class_name</A></B></CODE>
<BR>
Name of the generated parser class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#parser_code">parser_code</A></B></CODE>
<BR>
User declarations for direct inclusion in parser class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#parser_time">parser_time</A></B></CODE>
<BR>
Time to produce parser class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#prefix">prefix</A></B></CODE>
<BR>
The prefix placed on names that pollute someone else's name space.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#production_table_time">production_table_time</A></B></CODE>
<BR>
Time to produce the production table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#scan_code">scan_code</A></B></CODE>
<BR>
User code for scan() which is called to get the next Symbol.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../java_cup/production.html" title="class in java_cup">production</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#start_production">start_production</A></B></CODE>
<BR>
The start production of the grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#symbol_const_class_name">symbol_const_class_name</A></B></CODE>
<BR>
Name of the generated class for symbol constants.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#symbols_time">symbols_time</A></B></CODE>
<BR>
Time to produce symbol constant class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#unused_non_term">unused_non_term</A></B></CODE>
<BR>
Count of unused non terminals.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#unused_term">unused_term</A></B></CODE>
<BR>
Count of unused terminals.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#do_action_table(java.io.PrintWriter, java_cup.parse_action_table, boolean)">do_action_table</A></B>(java.io.PrintWriter out,
<A HREF="../java_cup/parse_action_table.html" title="class in java_cup">parse_action_table</A> act_tab,
boolean compact_reduces)</CODE>
<BR>
Emit the action table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#do_escaped(java.io.PrintWriter, char)">do_escaped</A></B>(java.io.PrintWriter out,
char c)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#do_newline(java.io.PrintWriter, int, int)">do_newline</A></B>(java.io.PrintWriter out,
int nchar,
int nbytes)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#do_reduce_table(java.io.PrintWriter, java_cup.parse_reduce_table)">do_reduce_table</A></B>(java.io.PrintWriter out,
<A HREF="../java_cup/parse_reduce_table.html" title="class in java_cup">parse_reduce_table</A> red_tab)</CODE>
<BR>
Emit the reduce-goto table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#do_table_as_string(java.io.PrintWriter, short[][])">do_table_as_string</A></B>(java.io.PrintWriter out,
short[][] sa)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#emit_action_code(java.io.PrintWriter, java_cup.production)">emit_action_code</A></B>(java.io.PrintWriter out,
<A HREF="../java_cup/production.html" title="class in java_cup">production</A> start_prod)</CODE>
<BR>
Emit code for the non-public class holding the actual action code.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#emit_package(java.io.PrintWriter)">emit_package</A></B>(java.io.PrintWriter out)</CODE>
<BR>
Emit a package spec if the user wants one.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#emit_production_table(java.io.PrintWriter)">emit_production_table</A></B>(java.io.PrintWriter out)</CODE>
<BR>
Emit the production table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#lr_values()">lr_values</A></B>()</CODE>
<BR>
whether or not to emit code for left and right values</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#parser(java.io.PrintWriter, java_cup.parse_action_table, java_cup.parse_reduce_table, int, java_cup.production, boolean, boolean)">parser</A></B>(java.io.PrintWriter out,
<A HREF="../java_cup/parse_action_table.html" title="class in java_cup">parse_action_table</A> action_table,
<A HREF="../java_cup/parse_reduce_table.html" title="class in java_cup">parse_reduce_table</A> reduce_table,
int start_st,
<A HREF="../java_cup/production.html" title="class in java_cup">production</A> start_prod,
boolean compact_reduces,
boolean suppress_scanner)</CODE>
<BR>
Emit the parser subclass with embedded tables.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#pre(java.lang.String)">pre</A></B>(java.lang.String str)</CODE>
<BR>
Build a string with the standard prefix.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#set_lr_values(boolean)">set_lr_values</A></B>(boolean b)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/emit.html#symbols(java.io.PrintWriter, boolean, boolean)">symbols</A></B>(java.io.PrintWriter out,
boolean emit_non_terms,
boolean sym_interface)</CODE>
<BR>
Emit code for the symbol constant class, optionally including non terms,
if they have been requested.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="prefix"><!-- --></A><H3>
prefix</H3>
<PRE>
public static java.lang.String <B>prefix</B></PRE>
<DL>
<DD>The prefix placed on names that pollute someone else's name space.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="package_name"><!-- --></A><H3>
package_name</H3>
<PRE>
public static java.lang.String <B>package_name</B></PRE>
<DL>
<DD>Package that the resulting code goes into (null is used for unnamed).
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="symbol_const_class_name"><!-- --></A><H3>
symbol_const_class_name</H3>
<PRE>
public static java.lang.String <B>symbol_const_class_name</B></PRE>
<DL>
<DD>Name of the generated class for symbol constants.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="parser_class_name"><!-- --></A><H3>
parser_class_name</H3>
<PRE>
public static java.lang.String <B>parser_class_name</B></PRE>
<DL>
<DD>Name of the generated parser class.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="action_code"><!-- --></A><H3>
action_code</H3>
<PRE>
public static java.lang.String <B>action_code</B></PRE>
<DL>
<DD>User declarations for direct inclusion in user action class.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="parser_code"><!-- --></A><H3>
parser_code</H3>
<PRE>
public static java.lang.String <B>parser_code</B></PRE>
<DL>
<DD>User declarations for direct inclusion in parser class.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="init_code"><!-- --></A><H3>
init_code</H3>
<PRE>
public static java.lang.String <B>init_code</B></PRE>
<DL>
<DD>User code for user_init() which is called during parser initialization.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="scan_code"><!-- --></A><H3>
scan_code</H3>
<PRE>
public static java.lang.String <B>scan_code</B></PRE>
<DL>
<DD>User code for scan() which is called to get the next Symbol.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="start_production"><!-- --></A><H3>
start_production</H3>
<PRE>
public static <A HREF="../java_cup/production.html" title="class in java_cup">production</A> <B>start_production</B></PRE>
<DL>
<DD>The start production of the grammar.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="import_list"><!-- --></A><H3>
import_list</H3>
<PRE>
public static java.util.Stack <B>import_list</B></PRE>
<DL>
<DD>List of imports (Strings containing class names) to go with actions.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="num_conflicts"><!-- --></A><H3>
num_conflicts</H3>
<PRE>
public static int <B>num_conflicts</B></PRE>
<DL>
<DD>Number of conflict found while building tables.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="nowarn"><!-- --></A><H3>
nowarn</H3>
<PRE>
public static boolean <B>nowarn</B></PRE>
<DL>
<DD>Do we skip warnings?
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="not_reduced"><!-- --></A><H3>
not_reduced</H3>
<PRE>
public static int <B>not_reduced</B></PRE>
<DL>
<DD>Count of the number on non-reduced productions found.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="unused_term"><!-- --></A><H3>
unused_term</H3>
<PRE>
public static int <B>unused_term</B></PRE>
<DL>
<DD>Count of unused terminals.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="unused_non_term"><!-- --></A><H3>
unused_non_term</H3>
<PRE>
public static int <B>unused_non_term</B></PRE>
<DL>
<DD>Count of unused non terminals.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="symbols_time"><!-- --></A><H3>
symbols_time</H3>
<PRE>
public static long <B>symbols_time</B></PRE>
<DL>
<DD>Time to produce symbol constant class.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="parser_time"><!-- --></A><H3>
parser_time</H3>
<PRE>
public static long <B>parser_time</B></PRE>
<DL>
<DD>Time to produce parser class.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="action_code_time"><!-- --></A><H3>
action_code_time</H3>
<PRE>
public static long <B>action_code_time</B></PRE>
<DL>
<DD>Time to produce action code class.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="production_table_time"><!-- --></A><H3>
production_table_time</H3>
<PRE>
public static long <B>production_table_time</B></PRE>
<DL>
<DD>Time to produce the production table.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="action_table_time"><!-- --></A><H3>
action_table_time</H3>
<PRE>
public static long <B>action_table_time</B></PRE>
<DL>
<DD>Time to produce the action table.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="goto_table_time"><!-- --></A><H3>
goto_table_time</H3>
<PRE>
public static long <B>goto_table_time</B></PRE>
<DL>
<DD>Time to produce the reduce-goto table.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="_lr_values"><!-- --></A><H3>
_lr_values</H3>
<PRE>
protected static boolean <B>_lr_values</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="lr_values()"><!-- --></A><H3>
lr_values</H3>
<PRE>
public static boolean <B>lr_values</B>()</PRE>
<DL>
<DD>whether or not to emit code for left and right values
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="set_lr_values(boolean)"><!-- --></A><H3>
set_lr_values</H3>
<PRE>
protected static void <B>set_lr_values</B>(boolean b)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="pre(java.lang.String)"><!-- --></A><H3>
pre</H3>
<PRE>
protected static java.lang.String <B>pre</B>(java.lang.String str)</PRE>
<DL>
<DD>Build a string with the standard prefix.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>str</CODE> - string to prefix.</DL>
</DD>
</DL>
<HR>
<A NAME="emit_package(java.io.PrintWriter)"><!-- --></A><H3>
emit_package</H3>
<PRE>
protected static void <B>emit_package</B>(java.io.PrintWriter out)</PRE>
<DL>
<DD>Emit a package spec if the user wants one.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - stream to produce output on.</DL>
</DD>
</DL>
<HR>
<A NAME="symbols(java.io.PrintWriter, boolean, boolean)"><!-- --></A><H3>
symbols</H3>
<PRE>
public static void <B>symbols</B>(java.io.PrintWriter out,
boolean emit_non_terms,
boolean sym_interface)</PRE>
<DL>
<DD>Emit code for the symbol constant class, optionally including non terms,
if they have been requested.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - stream to produce output on.<DD><CODE>emit_non_terms</CODE> - do we emit constants for non terminals?<DD><CODE>sym_interface</CODE> - should we emit an interface, rather than a class?</DL>
</DD>
</DL>
<HR>
<A NAME="emit_action_code(java.io.PrintWriter, java_cup.production)"><!-- --></A><H3>
emit_action_code</H3>
<PRE>
protected static void <B>emit_action_code</B>(java.io.PrintWriter out,
<A HREF="../java_cup/production.html" title="class in java_cup">production</A> start_prod)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Emit code for the non-public class holding the actual action code.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - stream to produce output on.<DD><CODE>start_prod</CODE> - the start production of the grammar.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="emit_production_table(java.io.PrintWriter)"><!-- --></A><H3>
emit_production_table</H3>
<PRE>
protected static void <B>emit_production_table</B>(java.io.PrintWriter out)</PRE>
<DL>
<DD>Emit the production table.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - stream to produce output on.</DL>
</DD>
</DL>
<HR>
<A NAME="do_action_table(java.io.PrintWriter, java_cup.parse_action_table, boolean)"><!-- --></A><H3>
do_action_table</H3>
<PRE>
protected static void <B>do_action_table</B>(java.io.PrintWriter out,
<A HREF="../java_cup/parse_action_table.html" title="class in java_cup">parse_action_table</A> act_tab,
boolean compact_reduces)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Emit the action table.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - stream to produce output on.<DD><CODE>act_tab</CODE> - the internal representation of the action table.<DD><CODE>compact_reduces</CODE> - do we use the most frequent reduce as default?
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="do_reduce_table(java.io.PrintWriter, java_cup.parse_reduce_table)"><!-- --></A><H3>
do_reduce_table</H3>
<PRE>
protected static void <B>do_reduce_table</B>(java.io.PrintWriter out,
<A HREF="../java_cup/parse_reduce_table.html" title="class in java_cup">parse_reduce_table</A> red_tab)</PRE>
<DL>
<DD>Emit the reduce-goto table.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - stream to produce output on.<DD><CODE>red_tab</CODE> - the internal representation of the reduce-goto table.</DL>
</DD>
</DL>
<HR>
<A NAME="do_table_as_string(java.io.PrintWriter, short[][])"><!-- --></A><H3>
do_table_as_string</H3>
<PRE>
protected static void <B>do_table_as_string</B>(java.io.PrintWriter out,
short[][] sa)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="do_newline(java.io.PrintWriter, int, int)"><!-- --></A><H3>
do_newline</H3>
<PRE>
protected static int <B>do_newline</B>(java.io.PrintWriter out,
int nchar,
int nbytes)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="do_escaped(java.io.PrintWriter, char)"><!-- --></A><H3>
do_escaped</H3>
<PRE>
protected static int <B>do_escaped</B>(java.io.PrintWriter out,
char c)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="parser(java.io.PrintWriter, java_cup.parse_action_table, java_cup.parse_reduce_table, int, java_cup.production, boolean, boolean)"><!-- --></A><H3>
parser</H3>
<PRE>
public static void <B>parser</B>(java.io.PrintWriter out,
<A HREF="../java_cup/parse_action_table.html" title="class in java_cup">parse_action_table</A> action_table,
<A HREF="../java_cup/parse_reduce_table.html" title="class in java_cup">parse_reduce_table</A> reduce_table,
int start_st,
<A HREF="../java_cup/production.html" title="class in java_cup">production</A> start_prod,
boolean compact_reduces,
boolean suppress_scanner)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Emit the parser subclass with embedded tables.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - stream to produce output on.<DD><CODE>action_table</CODE> - internal representation of the action table.<DD><CODE>reduce_table</CODE> - internal representation of the reduce-goto table.<DD><CODE>start_st</CODE> - start state of the parse machine.<DD><CODE>start_prod</CODE> - start production of the grammar.<DD><CODE>compact_reduces</CODE> - do we use most frequent reduce as default?<DD><CODE>suppress_scanner</CODE> - should scanner be suppressed for compatibility?
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/emit.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../java_cup/assoc.html" title="class in java_cup"><B>PREV CLASS</B></A>
<A HREF="../java_cup/internal_error.html" title="class in java_cup"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?java_cup/emit.html" target="_top"><B>FRAMES</B></A>
<A HREF="emit.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>