production.html
来自「数据挖掘的最常用工具。由于开源」· HTML 代码 · 共 918 行 · 第 1/3 页
HTML
918 行
<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="../../../../weka/core/parser/java_cup/production.html#num_reductions()">num_reductions</A></B>()</CODE><BR> Count of number of reductions using this production.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/core/parser/java_cup/production.html#number()">number</A></B>()</CODE><BR> Total number of productions.</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="../../../../weka/core/parser/java_cup/production.html#precedence_num()">precedence_num</A></B>()</CODE><BR> Access to the precedence of the rule</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="../../../../weka/core/parser/java_cup/production.html#precedence_side()">precedence_side</A></B>()</CODE><BR> </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="../../../../weka/core/parser/java_cup/production.html#rhs_length()">rhs_length</A></B>()</CODE><BR> How much of the right hand side array we are presently using.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../weka/core/parser/java_cup/production_part.html" title="class in weka.core.parser.java_cup">production_part</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/core/parser/java_cup/production.html#rhs(int)">rhs</A></B>(int indx)</CODE><BR> Access to the collection of parts for the right hand side.</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="../../../../weka/core/parser/java_cup/production.html#set_precedence_num(int)">set_precedence_num</A></B>(int prec_num)</CODE><BR> Setting the precedence of a rule</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="../../../../weka/core/parser/java_cup/production.html#set_precedence_side(int)">set_precedence_side</A></B>(int prec_side)</CODE><BR> </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="../../../../weka/core/parser/java_cup/production.html#to_simple_string()">to_simple_string</A></B>()</CODE><BR> Convert to a simpler string.</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="../../../../weka/core/parser/java_cup/production.html#toString()">toString</A></B>()</CODE><BR> Convert to a 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>getClass, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ========= 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="production(weka.core.parser.java_cup.non_terminal, weka.core.parser.java_cup.production_part[], int, java.lang.String)"><!-- --></A><H3>production</H3><PRE>public <B>production</B>(<A HREF="../../../../weka/core/parser/java_cup/non_terminal.html" title="class in weka.core.parser.java_cup">non_terminal</A> lhs_sym, <A HREF="../../../../weka/core/parser/java_cup/production_part.html" title="class in weka.core.parser.java_cup">production_part</A>[] rhs_parts, int rhs_l, java.lang.String action_str) throws <A HREF="../../../../weka/core/parser/java_cup/internal_error.html" title="class in weka.core.parser.java_cup">internal_error</A></PRE><DL><DD>Full constructor. This constructor accepts a LHS non terminal, an array of RHS parts (including terminals, non terminals, and actions), and a string for a final reduce action. It does several manipulations in the process of creating a production object. After some validity checking it translates labels that appear in actions into code for accessing objects on the runtime parse stack. It them merges adjacent actions if they appear and moves any trailing action into the final reduce actions string. Next it removes any embedded actions by factoring them out with new action productions. Finally it assigns a unique index to the production.<p> Factoring out of actions is accomplished by creating new "hidden" non terminals. For example if the production was originally: <pre> A ::= B {action} C D </pre> then it is factored into two productions:<pre> A ::= B X C D X ::= {action} </pre> (where X is a unique new non terminal). This has the effect of placing all actions at the end where they can be handled as part of a reduce by the parser.<P><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../weka/core/parser/java_cup/internal_error.html" title="class in weka.core.parser.java_cup">internal_error</A></CODE></DL></DL><HR><A NAME="production(weka.core.parser.java_cup.non_terminal, weka.core.parser.java_cup.production_part[], int)"><!-- --></A><H3>production</H3><PRE>public <B>production</B>(<A HREF="../../../../weka/core/parser/java_cup/non_terminal.html" title="class in weka.core.parser.java_cup">non_terminal</A> lhs_sym, <A HREF="../../../../weka/core/parser/java_cup/production_part.html" title="class in weka.core.parser.java_cup">production_part</A>[] rhs_parts, int rhs_l) throws <A HREF="../../../../weka/core/parser/java_cup/internal_error.html" title="class in weka.core.parser.java_cup">internal_error</A></PRE><DL><DD>Constructor with no action string.<P><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../weka/core/parser/java_cup/internal_error.html" title="class in weka.core.parser.java_cup">internal_error</A></CODE></DL></DL><HR><A NAME="production(weka.core.parser.java_cup.non_terminal, weka.core.parser.java_cup.production_part[], int, java.lang.String, int, int)"><!-- --></A><H3>production</H3><PRE>public <B>production</B>(<A HREF="../../../../weka/core/parser/java_cup/non_terminal.html" title="class in weka.core.parser.java_cup">non_terminal</A> lhs_sym, <A HREF="../../../../weka/core/parser/java_cup/production_part.html" title="class in weka.core.parser.java_cup">production_part</A>[] rhs_parts, int rhs_l, java.lang.String action_str, int prec_num, int prec_side) throws <A HREF="../../../../weka/core/parser/java_cup/internal_error.html" title="class in weka.core.parser.java_cup">internal_error</A></PRE><DL><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../weka/core/parser/java_cup/internal_error.html" title="class in weka.core.parser.java_cup">internal_error</A></CODE></DL></DL><HR><A NAME="production(weka.core.parser.java_cup.non_terminal, weka.core.parser.java_cup.production_part[], int, int, int)"><!-- --></A><H3>production</H3><PRE>public <B>production</B>(<A HREF="../../../../weka/core/parser/java_cup/non_terminal.html" title="class in weka.core.parser.java_cup">non_terminal</A> lhs_sym, <A HREF="../../../../weka/core/parser/java_cup/production_part.html" title="class in weka.core.parser.java_cup">production_part</A>[] rhs_parts, int rhs_l, int prec_num, int prec_side) throws <A HREF="../../../../weka/core/parser/java_cup/internal_error.html" title="class in weka.core.parser.java_cup">internal_error</A></PRE><DL><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../weka/core/parser/java_cup/internal_error.html" title="class in weka.core.parser.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 static java.util.Enumeration <B>all</B>()</PRE><DL><DD>Access to all productions.<P><DD><DL></DL></DD></DL><HR><A NAME="find(int)"><!-- --></A><H3>find</H3><PRE>public static <A HREF="../../../../weka/core/parser/java_cup/production.html" title="class in weka.core.parser.java_cup">production</A> <B>find</B>(int indx)</PRE><DL><DD>Lookup a production by index.<P><DD><DL></DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public static void <B>clear</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="number()"><!-- --></A><H3>number</H3><PRE>public static int <B>number</B>()</PRE><DL><DD>Total number of productions.<P><DD><DL></DL></DD></DL><HR><A NAME="lhs()"><!-- --></A><H3>lhs</H3><PRE>public <A HREF="../../../../weka/core/parser/java_cup/symbol_part.html" title="class in weka.core.parser.java_cup">symbol_part</A> <B>lhs</B>()</PRE><DL><DD>The left hand side non-terminal.<P><DD><DL></DL></DD></DL><HR><A NAME="precedence_num()"><!-- --></A><H3>precedence_num</H3><PRE>public int <B>precedence_num</B>()</PRE><DL><DD>Access to the precedence of the rule<P><DD><DL></DL></DD></DL><HR><A NAME="precedence_side()"><!-- --></A><H3>precedence_side</H3><PRE>public int <B>precedence_side</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="set_precedence_num(int)"><!-- --></A><H3>set_precedence_num</H3><PRE>public void <B>set_precedence_num</B>(int prec_num)</PRE><DL><DD>Setting the precedence of a rule<P><DD><DL></DL></DD></DL><HR><A NAME="set_precedence_side(int)"><!-- --></A><H3>set_precedence_side</H3><PRE>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?