/*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /// <summary>Simple constructor. Note: all terminals, non-terminals, and productions /// must already have been entered, and the viable prefix recognizer should /// have been constructed before this is called. /// </summary> public parse_reduce_table() { /* determine how many states we are working with */ _num_states = lalr_state.number(); /* allocate the array and fill it in with empty rows */ under_state = new parse_reduce_row[_num_states]; for (int i = 0; i < _num_states; i++) under_state[i] = new parse_reduce_row(); }
/*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /// <summary>Simple constructor. Note: all terminals, non-terminals, and productions /// must already have been entered, and the viable prefix recognizer should /// have been constructed before this is called. /// </summary> public parse_reduce_table() { /* determine how many states we are working with */ _num_states = lalr_state.number(); /* allocate the array and fill it in with empty rows */ under_state = new parse_reduce_row[_num_states]; for (int i = 0; i < _num_states; i++) { under_state[i] = new parse_reduce_row(); } }