/* * STANDARD ML OF NEW JERSEY COPYRIGHT NOTICE, LICENSE AND DISCLAIMER. * * Copyright (c) 1989-1998 by Lucent Technologies * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both the * copyright notice and this permission notice and warranty disclaimer appear * in supporting documentation, and that the name of Lucent Technologies, Bell * Labs or any Lucent entity not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior permission. * * Lucent disclaims all warranties with regard to this software, including all * implied warranties of merchantability and fitness. In no event shall Lucent * be liable for any special, indirect or consequential damages or any damages * whatsoever resulting from loss of use, data or profits, whether in an action * of contract, negligence or other tortious action, arising out of or in * connection with the use or performance of this software. * * Taken from this URL: * http://www.smlnj.org/license.html * * This license is compatible with the GNU GPL (see section "Standard ML of New * Jersey Copyright License"): * http://www.gnu.org/licenses/license-list.html#StandardMLofNJ */ /* * Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian */ package weka.core.parser.java_cup; /** A specialized version of a production used when we split an existing * production in order to remove an embedded action. Here we keep a bit * of extra bookkeeping so that we know where we came from. * @version last updated: 11/25/95 * @author Scott Hudson */ public class action_production extends production { /** Constructor. * @param base the production we are being factored out of. * @param lhs_sym the LHS symbol for this production. * @param rhs_parts array of production parts for the RHS. * @param rhs_len how much of the rhs_parts array is valid. * @param action_str the trailing reduce action for this production. * @param indexOfIntermediateResult the index of the result of the previous intermediate action on the stack relative to top, -1 if no previous action */ public action_production( production base, non_terminal lhs_sym, production_part rhs_parts[], int rhs_len, String action_str, int indexOfIntermediateResult) throws internal_error { super(lhs_sym, rhs_parts, rhs_len, action_str); _base_production = base; this.indexOfIntermediateResult = indexOfIntermediateResult; } private int indexOfIntermediateResult; /** * @return the index of the result of the previous intermediate action on the stack relative to top, -1 if no previous action */ public int getIndexOfIntermediateResult(){ return indexOfIntermediateResult; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** The production we were taken out of. */ protected production _base_production; /** The production we were taken out of. */ public production base_production() {return _base_production;} }