A Yacc extension for LRR grammar parsing (Q1092677)
From MaRDI portal
scientific article
Language | Label | Description | Also known as |
---|---|---|---|
English | A Yacc extension for LRR grammar parsing |
scientific article |
Statements
A Yacc extension for LRR grammar parsing (English)
0 references
1987
0 references
The algorithm we present here generates finite-state automata for potentially unbounded examination of lookahead and stack in order to try to discriminate the conflicting actions of an LR0 collection. Furthermore, this algorithm can be considered as an overall model to extend the current LR parser generators preserving (i): the valid prefix property and the traditional error recovery routines of the LR parser; (ii): the LALR(1) context on the LR0 collection. The power of acceptance is a subset of Cohen-Culik's LRR, with acceptation of non-LR(k) grammars, allowing a deterministic bottom-up parsing in linear time when this succeeds. The special feature of this method, compared to foregoing endeavours, consists in the use of the stack language so that a good deal of LR(k) grammars not accessible by foregoing methods now becomes acceptable. In terms of practicability, the minimization techniques allow one to get very compact automata as illustrated on the output lists. The generation of complementary tables can be done independently of the parser generator, which makes the connection of this complementary module to any LR parser generator quite easy. We also show some orginal results regarding LR automata.
0 references
finite-state automata
0 references
lookahead
0 references
stack
0 references
conflicting actions
0 references
LR0 collection
0 references
LR parser
0 references
deterministic bottom-up parsing
0 references
parser generator
0 references
0 references
0 references