SUFFIX LANGUAGES IN LR PARSING
For each state in the LR(0) automaton of a context-free grammar, there exists a language consisting of the valid strings that might be parsed from that state. Existing techniques for adding lookahead to an LR(0) automaton do not explicitly consider these ''suffix'' languages. Instead, existing techniques examine prefixes of suffix languages or some other simplification or approximation of them. We define suffix languages and describe an algorithm for computing them. We then show that suffix languages can provide lookahead for inconsistent states of an LR(0) automaton, providing single-symbol lookahead, k-symbol lookahead, and regular lookahead, each only where needed. We submit that suffix languages provide a sound theoretical basis for the study of LR parsing.
INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS
(1995). SUFFIX LANGUAGES IN LR PARSING. INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS, 55(41337), 135-153.
Available at: http://aquila.usm.edu/fac_pubs/5862