In traditional methods of computing LR(O) states and LALR(K) lookahead sets, certain relationships between nonterminals in the grammar are repeatedly re-examined, and the values dependent only on these relationships are repeatedly re-computed. Based on a new formalism of park, a new method is devised in which (by factoring out path) the relationships are examined once and the values are pre-computed. This results in time and/or space saving for the LR(O) states and LALR(K) lookahead sets computation.
Experimental results including comparison with known methods of others are presented with respect to time and storage characteristics in construction of canonical collection of LR(O) state and computation of LALR(1) lookahead sets.