<!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:09:00 GMT 2007 -->
<TITLE>
lalr_item_set
</TITLE>
<META NAME="keywords" CONTENT="java_cup.lalr_item_set class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="lalr_item_set";
}
</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/lalr_item_set.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/lalr_item.html" title="class in java_cup"><B>PREV CLASS</B></A>
<A HREF="../java_cup/lalr_state.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/lalr_item_set.html" target="_top"><B>FRAMES</B></A>
<A HREF="lalr_item_set.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> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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 lalr_item_set</H2>
<PRE>
java.lang.Object
<IMG SRC="../resources/inherit.gif" ALT="extended by "><B>java_cup.lalr_item_set</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>lalr_item_set</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
This class represents a set of LALR items. For purposes of building
these sets, items are considered unique only if they have unique cores
(i.e., ignoring differences in their lookahead sets).<p>
This class provides fairly conventional set oriented operations (union,
sub/super-set tests, etc.), as well as an LALR "closure" operation (see
compute_closure()).
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>last updated: 3/6/96</DD>
<DT><B>Author:</B></DT>
<DD>Scott Hudson</DD>
<DT><B>See Also:</B><DD><A HREF="../java_cup/lalr_item.html" title="class in java_cup"><CODE>lalr_item</CODE></A>,
<A HREF="../java_cup/lalr_state.html" title="class in java_cup"><CODE>lalr_state</CODE></A></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 java.util.Hashtable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#_all">_all</A></B></CODE>
<BR>
A hash table to implement the set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.lang.Integer</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#hashcode_cache">hashcode_cache</A></B></CODE>
<BR>
Cached hashcode for this set.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_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>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#lalr_item_set()">lalr_item_set</A></B>()</CODE>
<BR>
Constructor for an empty set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#lalr_item_set(java_cup.lalr_item_set)">lalr_item_set</A></B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)</CODE>
<BR>
Constructor for cloning from another set.</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> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#add(java_cup.lalr_item_set)">add</A></B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)</CODE>
<BR>
Add a complete set, merging lookaheads where items are already in
the set</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#add(java_cup.lalr_item)">add</A></B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> itm)</CODE>
<BR>
Add a singleton item, merging lookahead sets if the item is already
part of the set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#all()">all</A></B>()</CODE>
<BR>
Access to all elements of the set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#compute_closure()">compute_closure</A></B>()</CODE>
<BR>
Compute the closure of the set using the LALR closure rules.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#contains(java_cup.lalr_item)">contains</A></B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> itm)</CODE>
<BR>
Does the set contain a particular item?</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#equals(java_cup.lalr_item_set)">equals</A></B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)</CODE>
<BR>
Equality comparison.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object other)</CODE>
<BR>
Generic equality comparison.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#find(java_cup.lalr_item)">find</A></B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> itm)</CODE>
<BR>
Return the item in the set matching a particular item (or null if not
found)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#get_one()">get_one</A></B>()</CODE>
<BR>
Remove and return one item from the set (done in hash order).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
Return hash code.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#is_subset_of(java_cup.lalr_item_set)">is_subset_of</A></B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)</CODE>
<BR>
Is this set an (improper) subset of another?</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#is_superset_of(java_cup.lalr_item_set)">is_superset_of</A></B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)</CODE>
<BR>
Is this set an (improper) superset of another?</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#not_null(java.lang.Object)">not_null</A></B>(java.lang.Object obj)</CODE>
<BR>
Helper function for null test.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#remove(java_cup.lalr_item_set)">remove</A></B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)</CODE>
<BR>
Remove (set subtract) a complete set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#remove(java_cup.lalr_item)">remove</A></B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> itm)</CODE>
<BR>
Remove a single item if it is in the set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#size()">size</A></B>()</CODE>
<BR>
Size of the set</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_item_set.html#toString()">toString</A></B>()</CODE>
<BR>
Convert to string.</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, finalize, getClass, notify, notifyAll, 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="_all"><!-- --></A><H3>
_all</H3>
<PRE>
protected java.util.Hashtable <B>_all</B></PRE>
<DL>
<DD>A hash table to implement the set. We store the items using themselves
as keys.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="hashcode_cache"><!-- --></A><H3>
hashcode_cache</H3>
<PRE>
protected java.lang.Integer <B>hashcode_cache</B></PRE>
<DL>
<DD>Cached hashcode for this set.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_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>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="lalr_item_set()"><!-- --></A><H3>
lalr_item_set</H3>
<PRE>
public <B>lalr_item_set</B>()</PRE>
<DL>
<DD>Constructor for an empty set.
<P>
</DL>
<HR>
<A NAME="lalr_item_set(java_cup.lalr_item_set)"><!-- --></A><H3>
lalr_item_set</H3>
<PRE>
public <B>lalr_item_set</B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Constructor for cloning from another set.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - indicates set we should copy from.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></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="all()"><!-- --></A><H3>
all</H3>
<PRE>
public java.util.Enumeration <B>all</B>()</PRE>
<DL>
<DD>Access to all elements of the set.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <B>size</B>()</PRE>
<DL>
<DD>Size of the set
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="contains(java_cup.lalr_item)"><!-- --></A><H3>
contains</H3>
<PRE>
public boolean <B>contains</B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> itm)</PRE>
<DL>
<DD>Does the set contain a particular item?
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>itm</CODE> - the item in question.</DL>
</DD>
</DL>
<HR>
<A NAME="find(java_cup.lalr_item)"><!-- --></A><H3>
find</H3>
<PRE>
public <A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> <B>find</B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> itm)</PRE>
<DL>
<DD>Return the item in the set matching a particular item (or null if not
found)
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>itm</CODE> - the item we are looking for.</DL>
</DD>
</DL>
<HR>
<A NAME="is_subset_of(java_cup.lalr_item_set)"><!-- --></A><H3>
is_subset_of</H3>
<PRE>
public boolean <B>is_subset_of</B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Is this set an (improper) subset of another?
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other set in question.
<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="is_superset_of(java_cup.lalr_item_set)"><!-- --></A><H3>
is_superset_of</H3>
<PRE>
public boolean <B>is_superset_of</B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Is this set an (improper) superset of another?
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other set in question.
<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="add(java_cup.lalr_item)"><!-- --></A><H3>
add</H3>
<PRE>
public <A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> <B>add</B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> itm)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Add a singleton item, merging lookahead sets if the item is already
part of the set. returns the element of the set that was added or
merged into.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>itm</CODE> - the item being added.
<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="remove(java_cup.lalr_item)"><!-- --></A><H3>
remove</H3>
<PRE>
public void <B>remove</B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> itm)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Remove a single item if it is in the set.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>itm</CODE> - the item to remove.
<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="add(java_cup.lalr_item_set)"><!-- --></A><H3>
add</H3>
<PRE>
public void <B>add</B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Add a complete set, merging lookaheads where items are already in
the set
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the set to be added.
<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="remove(java_cup.lalr_item_set)"><!-- --></A><H3>
remove</H3>
<PRE>
public void <B>remove</B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Remove (set subtract) a complete set.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the set to remove.
<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="get_one()"><!-- --></A><H3>
get_one</H3>
<PRE>
public <A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A> <B>get_one</B>()
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Remove and return one item from the set (done in hash order).
<P>
<DD><DL>
<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="not_null(java.lang.Object)"><!-- --></A><H3>
not_null</H3>
<PRE>
protected void <B>not_null</B>(java.lang.Object obj)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Helper function for null test. Throws an interal_error exception if its
parameter is null.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object we are testing.
<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="compute_closure()"><!-- --></A><H3>
compute_closure</H3>
<PRE>
public void <B>compute_closure</B>()
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Compute the closure of the set using the LALR closure rules. Basically
for every item of the form: <pre>
[L ::= a *N alpha, l]
</pre>
(where N is a a non terminal and alpha is a string of symbols) make
sure there are also items of the form: <pre>
[N ::= *beta, first(alpha l)]
</pre>
corresponding to each production of N. Items with identical cores but
differing lookahead sets are merged by creating a new item with the same
core and the union of the lookahead sets (the LA in LALR stands for
"lookahead merged" and this is where the merger is). This routine
assumes that nullability and first sets have been computed for all
productions before it is called.
<P>
<DD><DL>
<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="equals(java_cup.lalr_item_set)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> other)</PRE>
<DL>
<DD>Equality comparison.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(java.lang.Object other)</PRE>
<DL>
<DD>Generic equality comparison.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD>Return hash code.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Convert to string.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</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/lalr_item_set.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/lalr_item.html" title="class in java_cup"><B>PREV CLASS</B></A>
<A HREF="../java_cup/lalr_state.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/lalr_item_set.html" target="_top"><B>FRAMES</B></A>
<A HREF="lalr_item_set.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> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>