# (c) 1989, 1991 Andrew W. Appel, David R. Tarditi
# Compiled by:
#
src/app/yacc/src/mythryl-yacc.lib# SHRINK_LR_TABLE: finds unique action entry rows
# in the action table for the LR parser
api Shrink_Lr_Table {
# Takes an action table represented as a list of action rows.
# It returns the number of unique rows left in the action table,
# a list of integers which maps each original row to a unique
# row, and a list of unique rows
package lr_table: Lr_Table; # Lr_Table is from
src/app/yacc/lib/base.api shrink_action_list
:
(lr_table::Table, Bool)
->
( ( ( Int,
List( Int ),
List ( ( lr_table::Pairlist (lr_table::Terminal, lr_table::Action),
lr_table::Action
) )
)
),
Int
);
};