<!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_06) on Mon Mar 10 09:02:55 ART 2008 -->
<TITLE>
Grammar
</TITLE>

<META NAME="keywords" CONTENT="core.grammar.Grammar interface">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="Grammar";
}
</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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Grammar.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../core/grammar/FunctionImpl.html" title="class in core.grammar"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?core/grammar/Grammar.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Grammar.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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">
core.grammar</FONT>
<BR>
Interface Grammar</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../core/grammar/StochasticContextFreeGrammar.html" title="interface in core.grammar">StochasticContextFreeGrammar</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../core/grammar/GrammarImpl.html" title="class in core.grammar">GrammarImpl</A>, <A HREF="../../core/grammar/StochasticContextFreeGrammarImpl.html" title="class in core.grammar">StochasticContextFreeGrammarImpl</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>Grammar</B></DL>
</PRE>

<P>
The inteface declares the methods that define the responsabilities of a general Grammar.
     
     
     At this level should be declared the methods that are responsability of the Grammar, por example,
     the derivation of a Production is responsability of the Grammar that knows all the productions and
     Symbols that define the Grammar, it isn´t a responsability of a Production for example.
     
     It belongs to the Public API.
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>Jorge Couchet</DD>
</DL>
<HR>

<P>

<!-- ========== 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>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#areThereNonTerminals()">areThereNonTerminals</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns TRUE if the Grammar has NonTerminals associated, FALSE otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#areThereProductions()">areThereProductions</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns TRUE if the Grammar has Productions associated, FALSE otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#areThereTerminals()">areThereTerminals</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns TRUE if the Grammar has Terminals associated, FALSE otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#calculateLenghtNonTerminal(core.grammar.NonTerminal)">calculateLenghtNonTerminal</A></B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculates the length of the NonTerminal nt of the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#calculateLenghtProduction(core.grammar.Production)">calculateLenghtProduction</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculates (doesn´t store) the length of the Production p of the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#calculateLengthNonTerminals()">calculateLengthNonTerminals</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculates and stores the length of each NonTerminal of the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#calculateLengthProductions()">calculateLengthProductions</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculates and stores the length of each Production of the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#calculateMinimumDepth()">calculateMinimumDepth</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Grammar's minimum depth.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#compareProductions(java.util.Collection, java.util.Collection, core.grammar.Production, int)">compareProductions</A></B>(java.util.Collection&lt;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&gt;&nbsp;R,
                   java.util.Collection&lt;<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&gt;&nbsp;X,
                   <A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;generateCrossoverNode,
                   int&nbsp;posRigth)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares each Production in R against the generateCrossoverNode Production.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#createNonTerminal(java.lang.String)">createNonTerminal</A></B>(java.lang.String&nbsp;symbol)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method creates a new NonTerminal (with symbol associated) and adds it to the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#createProduction(java.lang.String, core.grammar.NonTerminal, java.util.Collection)">createProduction</A></B>(java.lang.String&nbsp;symbol,
                 <A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;lnt,
                 java.util.Collection&lt;<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&gt;&nbsp;els)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method creates a new Production and adds it to the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#createTerminal(java.lang.String)">createTerminal</A></B>(java.lang.String&nbsp;symbol)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method creates a new Terminal (with symbol associated) and adds it to the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#drawGrammar()">drawGrammar</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws the Grammar using the Graph that maps it.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findNonTerminal(int)">findNonTerminal</A></B>(int&nbsp;id)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a NonTerminal in the Grammar that fulfills the condition that there is a 
 NonTerminal in the Grammar that has its id equal to "id".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findNonTerminal(core.grammar.NonTerminal)">findNonTerminal</A></B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a NonTerminal in the Grammar that fulfills the following conditions:
 a) There is a NonTerminal in the Grammar that has the same ID that nt,
 OR
 b) There is a NonTerminal in the Grammar that has the same Symbol that nt.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findNonTerminal(java.lang.String)">findNonTerminal</A></B>(java.lang.String&nbsp;symbol)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a NonTerminal in the Grammar that fulfills the condition that there is a 
 NonTerminal in the Grammar that has its symbol equal to "symbol".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findProduction(int)">findProduction</A></B>(int&nbsp;id)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a Production in the Grammar that fulfills the condition that there is a 
 Production in the Grammar that has its id equal to "id".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findProduction(core.grammar.Production)">findProduction</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a Production in the Grammar that fulfills the following conditions:
 a) There is a Production in the Grammar that has the same ID that p,
 OR
 b) There is a Production in the Grammar that has the same Symbol that p.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findProduction(core.grammar.Production, int, core.grammar.NonTerminal)">findProduction</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;prod,
               int&nbsp;pos,
               <A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a Production that fulfills the following properties:
 
 a) The same NonTerminal symbol at the left side,
 AND
 b) A right side with the same lenght that the right side of prod,
 AND
 c) The same Elements at the right side, with the exception of the Element at the position pos,
 AND
 d) The Element at the position pos must be equal to the NonTerminal nt.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findProduction(java.lang.String)">findProduction</A></B>(java.lang.String&nbsp;symbol)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a Production in the Grammar that fulfills the condition that there is a 
 Production in the Grammar that has its symbol equal to "symbol".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findTerminal(int)">findTerminal</A></B>(int&nbsp;id)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a Terminal in the Grammar that fulfills the condition that there is a 
 Terminal in the Grammar that has its id equal to "id".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findTerminal(java.lang.String)">findTerminal</A></B>(java.lang.String&nbsp;symbol)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a Terminal in the Grammar that fulfills the condition that there is a 
 Terminal in the Grammar that has its symbol equal to "symbol".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#findTerminal(core.grammar.Terminal)">findTerminal</A></B>(<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A>&nbsp;t)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method looks for a Terminal in the Grammar that fulfills the following conditions:
 a) There is a Terminal in the Grammar that has the same ID that t,
 OR
 b) There is a Terminal in the Grammar that has the same Symbol that t.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getElement(int)">getElement</A></B>(int&nbsp;id)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Element object that has the id = "id", otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getElement(java.lang.String)">getElement</A></B>(java.lang.String&nbsp;symbol)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Element object that has the symbol = "symbol", otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getIdMax()">getIdMax</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum ID associated to the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getLenghtNonTerminal(core.grammar.NonTerminal)">getLenghtNonTerminal</A></B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the length associated to the NonTerminal nt.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getLenghtProduction(core.grammar.Production)">getLenghtProduction</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the length associated to the Production p.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getNonTerminal(int)">getNonTerminal</A></B>(int&nbsp;id)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the NonTerminal object that has the id = "id", otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getNonTerminal(core.grammar.NonTerminal)">getNonTerminal</A></B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the NonTerminal nt is associated to the Grammar returns the NonTerminal object that has the ID = nt.getID,
 otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getNonTerminal(java.lang.String)">getNonTerminal</A></B>(java.lang.String&nbsp;symbol)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the NonTerminal object that has the symbol = "symbol", otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Collection&lt;<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getNonTerminals()">getNonTerminals</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the NonTerminals associated to the Grammar as a Collection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getProduction(int)">getProduction</A></B>(int&nbsp;id)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Production object that has the id = "id", otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getProduction(core.grammar.Production)">getProduction</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the Production p is associated to the Grammar returns the Production object that has the ID = p.getID,
 otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getProduction(java.lang.String)">getProduction</A></B>(java.lang.String&nbsp;symbol)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Production object that has the symbol = "symbol", otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Collection&lt;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getProductions()">getProductions</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Productions associated to the Grammar as a Collection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getRandomDerivation()">getRandomDerivation</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a random Derivation of the Grammar starting from the Start symbol.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getRandomDerivation(core.grammar.NonTerminal)">getRandomDerivation</A></B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a random Derivation of the Grammar starting from the NonTerminal nt.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getRandomDerivation(core.grammar.Production)">getRandomDerivation</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a random Derivation of the Grammar starting from the Production p.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getRandomDerivationMaxLenght(int)">getRandomDerivationMaxLenght</A></B>(int&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a random Derivation of the Grammar starting from the Start symbol and that satisfies
 the restriction that its length is at the most l.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getRandomDerivationMaxLenght(core.grammar.NonTerminal, int)">getRandomDerivationMaxLenght</A></B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt,
                             int&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a random Derivation of the Grammar starting from the NonTerminal nt and that satisfies
 the restriction that its length is at the most l.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getRandomDerivationMaxLenght(core.grammar.Production, int)">getRandomDerivationMaxLenght</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p,
                             int&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a random Derivation of the Grammar starting from the Production p and that satisfies
 the restriction that its length is at the most l.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getStart()">getStart</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the Start symbol of the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getTerminal(int)">getTerminal</A></B>(int&nbsp;id)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Terminal object that has its id = "id", otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getTerminal(java.lang.String)">getTerminal</A></B>(java.lang.String&nbsp;symbol)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Terminal object that has its symbol = "symbol", otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getTerminal(core.grammar.Terminal)">getTerminal</A></B>(<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A>&nbsp;t)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the Terminal t is associated to the Grammar returns the Terminal object that has the ID = t.getID,
 otherwise returns NULL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Collection&lt;<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#getTerminals()">getTerminals</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Terminals associated to the Grammar as a Collection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#grammarToGraph(boolean)">grammarToGraph</A></B>(boolean&nbsp;resumed)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maps the Grammar to a Graph.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#hasCalculatedLenghtsNonTerminals()">hasCalculatedLenghtsNonTerminals</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns TRUE if the lenghts of the NonTerminals associated to the Grammar
 where calculated, FALSE otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#hasCalculatedLenghtsProductions()">hasCalculatedLenghtsProductions</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns TRUE if the lenghts of the Productions associated to the Grammar
 where calculated, FALSE otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#setIdMax(int)">setIdMax</A></B>(int&nbsp;idMax)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum ID associated with the Elements of the Grammar (NonTerminals, Terminals and Productions)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#setLenghtNonTerminal(core.grammar.NonTerminal, int)">setLenghtNonTerminal</A></B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt,
                     int&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stores (it doesn´t make any calculation) the length of the NonTerminal p of the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#setLenghtProduction(core.grammar.Production, int)">setLenghtProduction</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p,
                    int&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stores (it doesn´t make any calculation) the length of the Production p of the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#setNonTerminal(core.grammar.NonTerminal)">setNonTerminal</A></B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Associates the NonTerminal nt to the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#setProduction(core.grammar.Production)">setProduction</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Associates the Production p with the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#setProduction(core.grammar.Production, java.util.Collection, core.grammar.Element)">setProduction</A></B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p,
              java.util.Collection&lt;<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&gt;&nbsp;l,
              <A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&nbsp;leftSide)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#setStart(core.grammar.NonTerminal)">setStart</A></B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets Start symbol of the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#setTerminal(core.grammar.Terminal)">setTerminal</A></B>(<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A>&nbsp;t)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Associates the Terminal t to the Grammar.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../core/grammar/Grammar.html#updateProduction(java.lang.String, core.grammar.Element, int)">updateProduction</A></B>(java.lang.String&nbsp;symbol,
                 <A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&nbsp;e,
                 int&nbsp;pos)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method updates a Production associated to the Grammar.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ 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="setIdMax(int)"><!-- --></A><H3>
setIdMax</H3>
<PRE>
void <B>setIdMax</B>(int&nbsp;idMax)</PRE>
<DL>
<DD>Sets the maximum ID associated with the Elements of the Grammar (NonTerminals, Terminals and Productions)
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>idMax</CODE> - The maximum ID used in the Grammar, then if a new Element is created, its ID will be idMax + 1.</DL>
</DD>
</DL>
<HR>

<A NAME="getIdMax()"><!-- --></A><H3>
getIdMax</H3>
<PRE>
int <B>getIdMax</B>()</PRE>
<DL>
<DD>Returns the maximum ID associated to the Grammar.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getNonTerminal(core.grammar.NonTerminal)"><!-- --></A><H3>
getNonTerminal</H3>
<PRE>
<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A> <B>getNonTerminal</B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</PRE>
<DL>
<DD>If the NonTerminal nt is associated to the Grammar returns the NonTerminal object that has the ID = nt.getID,
 otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nt</CODE> - The NonTerminal that is necessary to know if belongs to the Grammar. It only need to have
          a value in the ID field.</DL>
</DD>
</DL>
<HR>

<A NAME="getNonTerminal(int)"><!-- --></A><H3>
getNonTerminal</H3>
<PRE>
<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A> <B>getNonTerminal</B>(int&nbsp;id)</PRE>
<DL>
<DD>Returns the NonTerminal object that has the id = "id", otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - The NonTerminal's id that is necessary to know if belongs to the Grammar.</DL>
</DD>
</DL>
<HR>

<A NAME="getNonTerminal(java.lang.String)"><!-- --></A><H3>
getNonTerminal</H3>
<PRE>
<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A> <B>getNonTerminal</B>(java.lang.String&nbsp;symbol)</PRE>
<DL>
<DD>Returns the NonTerminal object that has the symbol = "symbol", otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The NonTerminal's symbol that is necessary to know if belongs to the Grammar.</DL>
</DD>
</DL>
<HR>

<A NAME="getNonTerminals()"><!-- --></A><H3>
getNonTerminals</H3>
<PRE>
java.util.Collection&lt;<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&gt; <B>getNonTerminals</B>()</PRE>
<DL>
<DD>Returns the NonTerminals associated to the Grammar as a Collection.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setNonTerminal(core.grammar.NonTerminal)"><!-- --></A><H3>
setNonTerminal</H3>
<PRE>
<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A> <B>setNonTerminal</B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)
                           throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Associates the NonTerminal nt to the Grammar.
 
 The method returns NULL if the ID of nt doesn´t collide with other ID. If there is a collision, 
 then the new nt replace the old_nt, and the method returns the old_nt.
 
 Throws a GrammarExceptionImpl if the NonTerminal is NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nt</CODE> - The new NonTerminal symbol to be associated to the Grammar.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getTerminal(core.grammar.Terminal)"><!-- --></A><H3>
getTerminal</H3>
<PRE>
<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A> <B>getTerminal</B>(<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A>&nbsp;t)</PRE>
<DL>
<DD>If the Terminal t is associated to the Grammar returns the Terminal object that has the ID = t.getID,
 otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>t</CODE> - The Terminal that is necessary to know if belongs to the Grammar. It only need to have
          a value in the ID field.</DL>
</DD>
</DL>
<HR>

<A NAME="getTerminal(int)"><!-- --></A><H3>
getTerminal</H3>
<PRE>
<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A> <B>getTerminal</B>(int&nbsp;id)</PRE>
<DL>
<DD>Returns the Terminal object that has its id = "id", otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - The Terminal's id that is necessary to know if belongs to the Grammar.</DL>
</DD>
</DL>
<HR>

<A NAME="getTerminal(java.lang.String)"><!-- --></A><H3>
getTerminal</H3>
<PRE>
<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A> <B>getTerminal</B>(java.lang.String&nbsp;symbol)</PRE>
<DL>
<DD>Returns the Terminal object that has its symbol = "symbol", otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The Terminal's symbol that is necessary to know if belongs to the Grammar.</DL>
</DD>
</DL>
<HR>

<A NAME="getTerminals()"><!-- --></A><H3>
getTerminals</H3>
<PRE>
java.util.Collection&lt;<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A>&gt; <B>getTerminals</B>()</PRE>
<DL>
<DD>Returns the Terminals associated to the Grammar as a Collection.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setTerminal(core.grammar.Terminal)"><!-- --></A><H3>
setTerminal</H3>
<PRE>
<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A> <B>setTerminal</B>(<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A>&nbsp;t)
                     throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Associates the Terminal t to the Grammar.
 
 The method returns NULL if the ID of t doesn´t collide with other ID. If there is a collision, 
 then the new t replace the old_t, and the method returns the old_t.
 
 Throws a GrammarExceptionImpl if the Terminal is NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>t</CODE> - The new Terminal symbol to be associated to the Grammar.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getProduction(core.grammar.Production)"><!-- --></A><H3>
getProduction</H3>
<PRE>
<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A> <B>getProduction</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</PRE>
<DL>
<DD>If the Production p is associated to the Grammar returns the Production object that has the ID = p.getID,
 otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - The production that is necessary to know if belongs to the Grammar. It only need to have
          a value in the ID field.</DL>
</DD>
</DL>
<HR>

<A NAME="getProduction(int)"><!-- --></A><H3>
getProduction</H3>
<PRE>
<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A> <B>getProduction</B>(int&nbsp;id)</PRE>
<DL>
<DD>Returns the Production object that has the id = "id", otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - The Production's id that is necessary to know if belongs to the Grammar.</DL>
</DD>
</DL>
<HR>

<A NAME="getProduction(java.lang.String)"><!-- --></A><H3>
getProduction</H3>
<PRE>
<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A> <B>getProduction</B>(java.lang.String&nbsp;symbol)</PRE>
<DL>
<DD>Returns the Production object that has the symbol = "symbol", otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The Production's symbol that is necessary to know if belongs to the Grammar.</DL>
</DD>
</DL>
<HR>

<A NAME="getProductions()"><!-- --></A><H3>
getProductions</H3>
<PRE>
java.util.Collection&lt;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&gt; <B>getProductions</B>()</PRE>
<DL>
<DD>Returns the Productions associated to the Grammar as a Collection.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setProduction(core.grammar.Production)"><!-- --></A><H3>
setProduction</H3>
<PRE>
void <B>setProduction</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)
                   throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Associates the Production p with the Grammar.
 
 The method must check first that the NonTerminal and Terminal symbols that are in the Production
 are associated to the Grammar, if it isn´t the case then the method must associate first these 
 symbols to the Grammar.
 
 The method must call the methods setRelations of the NonTerminals and Terminals objects.
 
 The method throws a GrammarException if the Production is NULL or there were any collision.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - The new production to be associated to the Grammar.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="setProduction(core.grammar.Production, java.util.Collection, core.grammar.Element)"><!-- --></A><H3>
setProduction</H3>
<PRE>
void <B>setProduction</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p,
                   java.util.Collection&lt;<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&gt;&nbsp;l,
                   <A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&nbsp;leftSide)
                   throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getStart()"><!-- --></A><H3>
getStart</H3>
<PRE>
<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A> <B>getStart</B>()</PRE>
<DL>
<DD>Return the Start symbol of the Grammar.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setStart(core.grammar.NonTerminal)"><!-- --></A><H3>
setStart</H3>
<PRE>
void <B>setStart</B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)
              throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Sets Start symbol of the Grammar.
 
 Throws a GrammarExceptionImpl if the NonTerminal is NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nt</CODE> - The NonTerminal symbol that is the Start symbol of the Grammar.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="calculateLengthNonTerminals()"><!-- --></A><H3>
calculateLengthNonTerminals</H3>
<PRE>
void <B>calculateLengthNonTerminals</B>()
                                 throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Calculates and stores the length of each NonTerminal of the Grammar.
 
 It's necessary to take care of to have associated all the Productions to the Grammar before
 the calculation of the length of the NonTerminals (because is possible that theirs lengths 
 depends of the others Productions).
 
 Only works if the method hasCalculatedLengthsNonTerminals == FALSE.
 
 Throws a GrammarException if there the Grammar is NULL, of the Grammar doesn't has 
 NonTerminals symbols, or doesn't has a start symbol, or there is any problem in the
 calculation of the lengths of the NonTerminals.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="calculateLengthProductions()"><!-- --></A><H3>
calculateLengthProductions</H3>
<PRE>
void <B>calculateLengthProductions</B>()
                                throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Calculates and stores the length of each Production of the Grammar.
 
 It's necessary to take care of to have associated all the Productions to the Grammar before
 the calculation of the length of the Productions (because is possible that theirs lengths 
 depends of the others Productions).
 
 Only works if the method hasCalculatedLengthsProductions == FALSE. 
 
 Throws a GrammarException if there the Grammar is NULL, of the Grammar doesn't has 
 Productions symbols, or doesn't has a start symbol, or there is any problem with the 
 calculation of the lengths of  the NonTerminals.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="calculateLenghtNonTerminal(core.grammar.NonTerminal)"><!-- --></A><H3>
calculateLenghtNonTerminal</H3>
<PRE>
int <B>calculateLenghtNonTerminal</B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)
                               throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Calculates the length of the NonTerminal nt of the Grammar.
 
 It's necessary to take care of to have associated all the Productions to the Grammar before
 call this method (because is possible that its length depends of the others Productions).
 
 Returns -2 if the Grammar is NULL or the NonTerminal nt doesn´t belong to the Grammar.
 Returns -1 if the NonTerminal nt doesn´t have associated Productions (an associated 
 Production is a Production that have nt at the left side).
 Returns the lenght of the NonTerminal nt if the above conditions are´nt fullfiled. 
 
 Throws a GrammarException if there is a problem in the calculation of the lenght, or
 if there is an infinite loop with the Productions that are associated to the 
 NonTerminal nt.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nt</CODE> - The NonTerminal that will be used for the length calculation.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="calculateMinimumDepth()"><!-- --></A><H3>
calculateMinimumDepth</H3>
<PRE>
int <B>calculateMinimumDepth</B>()
                          throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Returns the Grammar's minimum depth. The length of the Grammar's axiom (S) establishes the minimum size
 of a derivation tree.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="calculateLenghtProduction(core.grammar.Production)"><!-- --></A><H3>
calculateLenghtProduction</H3>
<PRE>
int <B>calculateLenghtProduction</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)
                              throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Calculates (doesn´t store) the length of the Production p of the Grammar.
 
 It's necessary to take care of to have associated all the Productions to the Grammar before
 call this method (because is possible that its length depends of the others Productions).
 
 Returns -2 if the Grammar is NULL or the Production p doesn´t belong to the Grammar.
 Returns -1 if the Production p doesn´t have associated NonTerminals (an associated 
 NonTerminals is a NonTerminal that is at the right side of the Production).
 Returns the lenght of the Production p if the above conditions are´nt fullfiled.
 
 Throws a GrammarException if the Production doesn´t has right symbols, or there is a 
 problem in the calculation of the lenght, or if there is an infinite loop.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - The Production that will be used for the length calculation.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getLenghtProduction(core.grammar.Production)"><!-- --></A><H3>
getLenghtProduction</H3>
<PRE>
int <B>getLenghtProduction</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</PRE>
<DL>
<DD>Returns the length associated to the Production p.
 If the Production isn´t in the Grammar returns a negative value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - The Production that is necessary to know his length.</DL>
</DD>
</DL>
<HR>

<A NAME="getLenghtNonTerminal(core.grammar.NonTerminal)"><!-- --></A><H3>
getLenghtNonTerminal</H3>
<PRE>
int <B>getLenghtNonTerminal</B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</PRE>
<DL>
<DD>Returns the length associated to the NonTerminal nt.
 If the NonTerminal isn´t in the Grammar returns a negative value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nt</CODE> - The NonTerminal that is necessary to know his length.</DL>
</DD>
</DL>
<HR>

<A NAME="setLenghtProduction(core.grammar.Production, int)"><!-- --></A><H3>
setLenghtProduction</H3>
<PRE>
int <B>setLenghtProduction</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p,
                        int&nbsp;l)
                        throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Stores (it doesn´t make any calculation) the length of the Production p of the Grammar.
 
 The method returns a negative if the ID of p doesn´t collide with other ID. If there is a collision, 
 then the new lenght replace the old_lenght, and the method returns the old_lenght of 
 the Production that collides.
 
 Throws a GrammarExceptionImpl if the Production is NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - The Production that will be associated with the length l.<DD><CODE>l</CODE> - The actual length of the Production p.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="setLenghtNonTerminal(core.grammar.NonTerminal, int)"><!-- --></A><H3>
setLenghtNonTerminal</H3>
<PRE>
int <B>setLenghtNonTerminal</B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt,
                         int&nbsp;l)
                         throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Stores (it doesn´t make any calculation) the length of the NonTerminal p of the Grammar.
 
 The method returns a negative if the ID of nt doesn´t collide with other ID. If there is a collision, 
 then the new lenght replace the old_lenght, and the method returns the old_lenght of 
 the NonTerminal that collides.
 
 Throws a GrammarExceptionImpl if the NonTerminal is NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nt</CODE> - The NonTerminal that will be associated with the length l.<DD><CODE>l</CODE> - The actual length of the NonTerminal nt.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getRandomDerivation()"><!-- --></A><H3>
getRandomDerivation</H3>
<PRE>
<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A> <B>getRandomDerivation</B>()</PRE>
<DL>
<DD>Returns a random Derivation of the Grammar starting from the Start symbol.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getRandomDerivation(core.grammar.Production)"><!-- --></A><H3>
getRandomDerivation</H3>
<PRE>
<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A> <B>getRandomDerivation</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</PRE>
<DL>
<DD>Returns a random Derivation of the Grammar starting from the Production p.
 
 Take care because it isn´t a complete Derivation (that is: the Derivation 
 doesn´t start with the Start symbol, unless the NonTerminal symbol at the left side of the 
 Production == Start symbol).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - The Production p that is derivated until a Derivation is obtained.</DL>
</DD>
</DL>
<HR>

<A NAME="getRandomDerivation(core.grammar.NonTerminal)"><!-- --></A><H3>
getRandomDerivation</H3>
<PRE>
<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A> <B>getRandomDerivation</B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</PRE>
<DL>
<DD>Returns a random Derivation of the Grammar starting from the NonTerminal nt.
 
 Take care because it isn´t a complete Derivation (that is: the Derivation doesn´t start with 
 the Start symbol, unless nt == Start symbol).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nt</CODE> - The symbol from whom the derivation stars.</DL>
</DD>
</DL>
<HR>

<A NAME="getRandomDerivationMaxLenght(int)"><!-- --></A><H3>
getRandomDerivationMaxLenght</H3>
<PRE>
<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A> <B>getRandomDerivationMaxLenght</B>(int&nbsp;l)</PRE>
<DL>
<DD>Returns a random Derivation of the Grammar starting from the Start symbol and that satisfies
 the restriction that its length is at the most l.
 
 l= the maximum length from the root symbol (the Start in this case) of the Derivation until one 
 of its Terminal symbol.
 
 If it isn´t possible to fulfill the restriction then returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - The number that imposes the length restriction.</DL>
</DD>
</DL>
<HR>

<A NAME="getRandomDerivationMaxLenght(core.grammar.Production, int)"><!-- --></A><H3>
getRandomDerivationMaxLenght</H3>
<PRE>
<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A> <B>getRandomDerivationMaxLenght</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p,
                                        int&nbsp;l)</PRE>
<DL>
<DD>Returns a random Derivation of the Grammar starting from the Production p and that satisfies
 the restriction that its length is at the most l.
 
 Take care because it isn´t a complete Derivation (that is: the Derivation 
 doesn´t start with the Start symbol, unless the NonTerminal symbol at the left side of the 
 Production == Start symbol).
 
 l= the maximum length from the root symbol (the Start in this case) of the Derivation until one 
 of its Terminal symbols.
 
 If it isn´t possible to fulfill the restriction then returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - The Production p that is derivated until a Derivation is obtained.<DD><CODE>l</CODE> - The number that imposes the length restriction.</DL>
</DD>
</DL>
<HR>

<A NAME="getRandomDerivationMaxLenght(core.grammar.NonTerminal, int)"><!-- --></A><H3>
getRandomDerivationMaxLenght</H3>
<PRE>
<A HREF="../../core/grammar/Derivation.html" title="interface in core.grammar">Derivation</A> <B>getRandomDerivationMaxLenght</B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt,
                                        int&nbsp;l)</PRE>
<DL>
<DD>Returns a random Derivation of the Grammar starting from the NonTerminal nt and that satisfies
 the restriction that its length is at the most l.
 
 Take care because it isn´t a complete Derivation (that is: the Derivation doesn´t start with 
 the Start symbol, unless nt == Start symbol).
 
 If it isn´t possible to fulfill the restriction then returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nt</CODE> - The symbol from whom the Derivation starts.<DD><CODE>l</CODE> - The number that imposes the length restriction.</DL>
</DD>
</DL>
<HR>

<A NAME="areThereTerminals()"><!-- --></A><H3>
areThereTerminals</H3>
<PRE>
boolean <B>areThereTerminals</B>()</PRE>
<DL>
<DD>Returns TRUE if the Grammar has Terminals associated, FALSE otherwise.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="areThereNonTerminals()"><!-- --></A><H3>
areThereNonTerminals</H3>
<PRE>
boolean <B>areThereNonTerminals</B>()</PRE>
<DL>
<DD>Returns TRUE if the Grammar has NonTerminals associated, FALSE otherwise.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="areThereProductions()"><!-- --></A><H3>
areThereProductions</H3>
<PRE>
boolean <B>areThereProductions</B>()</PRE>
<DL>
<DD>Returns TRUE if the Grammar has Productions associated, FALSE otherwise.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="hasCalculatedLenghtsProductions()"><!-- --></A><H3>
hasCalculatedLenghtsProductions</H3>
<PRE>
boolean <B>hasCalculatedLenghtsProductions</B>()</PRE>
<DL>
<DD>Returns TRUE if the lenghts of the Productions associated to the Grammar
 where calculated, FALSE otherwise.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="hasCalculatedLenghtsNonTerminals()"><!-- --></A><H3>
hasCalculatedLenghtsNonTerminals</H3>
<PRE>
boolean <B>hasCalculatedLenghtsNonTerminals</B>()</PRE>
<DL>
<DD>Returns TRUE if the lenghts of the NonTerminals associated to the Grammar
 where calculated, FALSE otherwise.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="grammarToGraph(boolean)"><!-- --></A><H3>
grammarToGraph</H3>
<PRE>
void <B>grammarToGraph</B>(boolean&nbsp;resumed)
                    throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Maps the Grammar to a Graph.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resumed</CODE> - If is TRUE is mapped to a resumed Graph, if is FALSE is mapped to a 
                                   full Graph.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="drawGrammar()"><!-- --></A><H3>
drawGrammar</H3>
<PRE>
void <B>drawGrammar</B>()</PRE>
<DL>
<DD>Draws the Grammar using the Graph that maps it.  It is necessary to call the method
 grammarToGraph before.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="findProduction(core.grammar.Production, int, core.grammar.NonTerminal)"><!-- --></A><H3>
findProduction</H3>
<PRE>
<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A> <B>findProduction</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;prod,
                          int&nbsp;pos,
                          <A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)
                          throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>The method looks for a Production that fulfills the following properties:
 
 a) The same NonTerminal symbol at the left side,
 AND
 b) A right side with the same lenght that the right side of prod,
 AND
 c) The same Elements at the right side, with the exception of the Element at the position pos,
 AND
 d) The Element at the position pos must be equal to the NonTerminal nt.
 
 If the method finds a Production with the properties  of above, then it returns the Production, 
 otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>prod</CODE> - The Production that is used for the search.<DD><CODE>pos</CODE> - The position of the Production prod where must be the NonTerminal nt.<DD><CODE>nt</CODE> - The NonTerminal that must be in the position pos of the Production to look for.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="findProduction(core.grammar.Production)"><!-- --></A><H3>
findProduction</H3>
<PRE>
boolean <B>findProduction</B>(<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;p)</PRE>
<DL>
<DD>The method looks for a Production in the Grammar that fulfills the following conditions:
 a) There is a Production in the Grammar that has the same ID that p,
 OR
 b) There is a Production in the Grammar that has the same Symbol that p.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - The Production that is used for the search
<DT><B>Returns:</B><DD>TRUE if one of the conditions are fulfilled or FALSE if none of them are fulfilled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="findProduction(int)"><!-- --></A><H3>
findProduction</H3>
<PRE>
boolean <B>findProduction</B>(int&nbsp;id)</PRE>
<DL>
<DD>The method looks for a Production in the Grammar that fulfills the condition that there is a 
 Production in the Grammar that has its id equal to "id".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - The Production's id that is used for the search
<DT><B>Returns:</B><DD>TRUE if the condition is fulfilled or FALSE if isn't fulfilled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="findProduction(java.lang.String)"><!-- --></A><H3>
findProduction</H3>
<PRE>
boolean <B>findProduction</B>(java.lang.String&nbsp;symbol)</PRE>
<DL>
<DD>The method looks for a Production in the Grammar that fulfills the condition that there is a 
 Production in the Grammar that has its symbol equal to "symbol".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The Production's symbol that is used for the search
<DT><B>Returns:</B><DD>TRUE if the condition is fulfilled or FALSE if isn't fulfilled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="findNonTerminal(core.grammar.NonTerminal)"><!-- --></A><H3>
findNonTerminal</H3>
<PRE>
boolean <B>findNonTerminal</B>(<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;nt)</PRE>
<DL>
<DD>The method looks for a NonTerminal in the Grammar that fulfills the following conditions:
 a) There is a NonTerminal in the Grammar that has the same ID that nt,
 OR
 b) There is a NonTerminal in the Grammar that has the same Symbol that nt.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nt</CODE> - The NonTerminal that is used for the search
<DT><B>Returns:</B><DD>TRUE if one of the conditions are fulfilled or FALSE if none of them are fulfilled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="findNonTerminal(int)"><!-- --></A><H3>
findNonTerminal</H3>
<PRE>
boolean <B>findNonTerminal</B>(int&nbsp;id)</PRE>
<DL>
<DD>The method looks for a NonTerminal in the Grammar that fulfills the condition that there is a 
 NonTerminal in the Grammar that has its id equal to "id".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - The NonTerminal's id that is used for the search
<DT><B>Returns:</B><DD>TRUE if the condition is fulfilled or FALSE if isn't fulfilled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="findNonTerminal(java.lang.String)"><!-- --></A><H3>
findNonTerminal</H3>
<PRE>
boolean <B>findNonTerminal</B>(java.lang.String&nbsp;symbol)</PRE>
<DL>
<DD>The method looks for a NonTerminal in the Grammar that fulfills the condition that there is a 
 NonTerminal in the Grammar that has its symbol equal to "symbol".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The NonTerminal's symbol that is used for the search
<DT><B>Returns:</B><DD>TRUE if the condition is fulfilled or FALSE if isn't fulfilled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="findTerminal(core.grammar.Terminal)"><!-- --></A><H3>
findTerminal</H3>
<PRE>
boolean <B>findTerminal</B>(<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A>&nbsp;t)</PRE>
<DL>
<DD>The method looks for a Terminal in the Grammar that fulfills the following conditions:
 a) There is a Terminal in the Grammar that has the same ID that t,
 OR
 b) There is a Terminal in the Grammar that has the same Symbol that t.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>t</CODE> - The Terminal that is used for the search
<DT><B>Returns:</B><DD>TRUE if one of the conditions are fulfilled or FALSE if none of them are fulfilled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="findTerminal(int)"><!-- --></A><H3>
findTerminal</H3>
<PRE>
boolean <B>findTerminal</B>(int&nbsp;id)</PRE>
<DL>
<DD>The method looks for a Terminal in the Grammar that fulfills the condition that there is a 
 Terminal in the Grammar that has its id equal to "id".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - The Terminal's id that is used for the search.
<DT><B>Returns:</B><DD>TRUE if the condition is fulfilled or FALSE if isn't fulfilled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="findTerminal(java.lang.String)"><!-- --></A><H3>
findTerminal</H3>
<PRE>
boolean <B>findTerminal</B>(java.lang.String&nbsp;symbol)</PRE>
<DL>
<DD>The method looks for a Terminal in the Grammar that fulfills the condition that there is a 
 Terminal in the Grammar that has its symbol equal to "symbol".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The Terminal's symbol that is used for the search.
<DT><B>Returns:</B><DD>TRUE if the condition is fulfilled or FALSE if isn't fulfilled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="createNonTerminal(java.lang.String)"><!-- --></A><H3>
createNonTerminal</H3>
<PRE>
<A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A> <B>createNonTerminal</B>(java.lang.String&nbsp;symbol)
                              throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>The method creates a new NonTerminal (with symbol associated) and adds it to the Grammar.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The symbol associated to the NonTerminal.
<DT><B>Returns:</B><DD>The new NonTerminal object created or NULL if it wasn't possible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="createTerminal(java.lang.String)"><!-- --></A><H3>
createTerminal</H3>
<PRE>
<A HREF="../../core/grammar/Terminal.html" title="interface in core.grammar">Terminal</A> <B>createTerminal</B>(java.lang.String&nbsp;symbol)
                        throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>The method creates a new Terminal (with symbol associated) and adds it to the Grammar.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The symbol associated to the Terminal.
<DT><B>Returns:</B><DD>The new Terminal object created or NULL if it wasn't possible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="createProduction(java.lang.String, core.grammar.NonTerminal, java.util.Collection)"><!-- --></A><H3>
createProduction</H3>
<PRE>
<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A> <B>createProduction</B>(java.lang.String&nbsp;symbol,
                            <A HREF="../../core/grammar/NonTerminal.html" title="interface in core.grammar">NonTerminal</A>&nbsp;lnt,
                            java.util.Collection&lt;<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&gt;&nbsp;els)
                            throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>The method creates a new Production and adds it to the Grammar.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The name of the Production.<DD><CODE>lnt</CODE> - The NonTerminal symbol at the left side of the Production.<DD><CODE>els</CODE> - The Terminal and NonTerminal symbols at the right side of the Producti,
<DT><B>Returns:</B><DD>The new Production object created or NULL if it wasn't possible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="updateProduction(java.lang.String, core.grammar.Element, int)"><!-- --></A><H3>
updateProduction</H3>
<PRE>
<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A> <B>updateProduction</B>(java.lang.String&nbsp;symbol,
                            <A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&nbsp;e,
                            int&nbsp;pos)
                            throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>The method updates a Production associated to the Grammar. It changes the symbol at the position
 pos of the right side of the Production by the Element e.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The name of the Production in the Grammar.<DD><CODE>e</CODE> - The new Element to be associated to the Production.<DD><CODE>pos</CODE> - The position at the right side of the Production (the symbol that is here will be
          changed by e).
<DT><B>Returns:</B><DD>The Production updated or NULL if it wasn't possible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="compareProductions(java.util.Collection, java.util.Collection, core.grammar.Production, int)"><!-- --></A><H3>
compareProductions</H3>
<PRE>
void <B>compareProductions</B>(java.util.Collection&lt;<A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&gt;&nbsp;R,
                        java.util.Collection&lt;<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A>&gt;&nbsp;X,
                        <A HREF="../../core/grammar/Production.html" title="interface in core.grammar">Production</A>&nbsp;generateCrossoverNode,
                        int&nbsp;posRigth)
                        throws <A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></PRE>
<DL>
<DD>Compares each Production in R against the generateCrossoverNode Production.
 For each Production in R, first it looks that its right side have the same length that the right side of 
 generateCrossoverNode, if fulfill this condition then checks that the symbols at any position (with the 
 exception of the position posRigth), are equals to the symbols at the same position in the 
 generateCrossoverNode Production. If these conditions aren´t fulfilled then this Production is deleted from R.
 
 For the Productions that aren´t deleted from R, their symbols at the position posRigth are added to X.
 
 Take care because only looks at the right side of the Productions of R, that is, doesn´t look that their lefts
 side agree with the left side of generateCrossoverNode. If this condition is needed, then must be checked 
 before.
 
 
 The method throws an GrammarExceptionImpl if generateCrossoverNode doesn't have right symbols.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>R</CODE> - The Productions to be compared. R cannot be null or empty (in this case the method doesn´t do nothing).<DD><CODE>X</CODE> - The collection that will hold the symbols at the position posRight of the Productions of R that
                        fulfill the above condition. X cannot be null (in this case the method doesn´t do nothing).<DD><CODE>generateCrossoverNode</CODE> - The Production against which the Productions of R are compared. It cannot be null (in this case the method doesn´t do nothing).<DD><CODE>posRigth</CODE> - The position of generateCrossoverNode against which the symbols at the same position on the 
          Productions of R aren´t compared. It must be greater than zero (the position starts at one).
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar">GrammarExceptionImpl</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getElement(int)"><!-- --></A><H3>
getElement</H3>
<PRE>
<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A> <B>getElement</B>(int&nbsp;id)</PRE>
<DL>
<DD>Returns the Element object that has the id = "id", otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - The Element's id that is necessary to know if belongs to the Grammar.</DL>
</DD>
</DL>
<HR>

<A NAME="getElement(java.lang.String)"><!-- --></A><H3>
getElement</H3>
<PRE>
<A HREF="../../core/grammar/Element.html" title="interface in core.grammar">Element</A> <B>getElement</B>(java.lang.String&nbsp;symbol)</PRE>
<DL>
<DD>Returns the Element object that has the symbol = "symbol", otherwise returns NULL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The Element's symbol that is necessary to know if belongs to the Grammar.</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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Grammar.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../core/grammar/FunctionImpl.html" title="class in core.grammar"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../core/grammar/GrammarExceptionImpl.html" title="class in core.grammar"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?core/grammar/Grammar.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Grammar.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>
