2
* STANDARD ML OF NEW JERSEY COPYRIGHT NOTICE, LICENSE AND DISCLAIMER.
4
* Copyright (c) 1989-1998 by Lucent Technologies
6
* Permission to use, copy, modify, and distribute this software and its
7
* documentation for any purpose and without fee is hereby granted, provided
8
* that the above copyright notice appear in all copies and that both the
9
* copyright notice and this permission notice and warranty disclaimer appear
10
* in supporting documentation, and that the name of Lucent Technologies, Bell
11
* Labs or any Lucent entity not be used in advertising or publicity pertaining
12
* to distribution of the software without specific, written prior permission.
14
* Lucent disclaims all warranties with regard to this software, including all
15
* implied warranties of merchantability and fitness. In no event shall Lucent
16
* be liable for any special, indirect or consequential damages or any damages
17
* whatsoever resulting from loss of use, data or profits, whether in an action
18
* of contract, negligence or other tortious action, arising out of or in
19
* connection with the use or performance of this software.
21
* Taken from this URL:
22
* http://www.smlnj.org/license.html
24
* This license is compatible with the GNU GPL (see section "Standard ML of New
25
* Jersey Copyright License"):
26
* http://www.gnu.org/licenses/license-list.html#StandardMLofNJ
30
* Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian
33
package weka.core.parser.java_cup;
35
/** This class represents one row (corresponding to one machine state) of the
36
* reduce-goto parse table.
38
public class parse_reduce_row {
39
/*-----------------------------------------------------------*/
40
/*--- Constructor(s) ----------------------------------------*/
41
/*-----------------------------------------------------------*/
43
/** Simple constructor. Note: this should not be used until the number
44
* of terminals in the grammar has been established.
46
public parse_reduce_row()
48
/* make sure the size is set */
49
if (_size <= 0 ) _size = non_terminal.number();
51
/* allocate the array */
52
under_non_term = new lalr_state[size()];
55
/*-----------------------------------------------------------*/
56
/*--- (Access to) Static (Class) Variables ------------------*/
57
/*-----------------------------------------------------------*/
59
/** Number of columns (non terminals) in every row. */
60
protected static int _size = 0;
62
/** Number of columns (non terminals) in every row. */
63
public static int size() {return _size;}
65
//Hm Added clear to clear all static fields
66
public static void clear() {
70
/*-----------------------------------------------------------*/
71
/*--- (Access to) Instance Variables ------------------------*/
72
/*-----------------------------------------------------------*/
74
/** Actual entries for the row. */
75
public lalr_state under_non_term[];