Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3710 > unrolled thread
| Started by | Richard Rogers <rprogers@seanet.com> |
|---|---|
| First post | 2026-01-29 18:25 -0500 |
| Last post | 2026-01-31 01:30 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.compilers
LALR look-ahead sets from item right context grammar? Richard Rogers <rprogers@seanet.com> - 2026-01-29 18:25 -0500
LALR look-ahead sets from item right context grammar? Chris Clark <cclark@imachinesinc.com> - 2026-01-31 01:30 +0000
| From | Richard Rogers <rprogers@seanet.com> |
|---|---|
| Date | 2026-01-29 18:25 -0500 |
| Subject | LALR look-ahead sets from item right context grammar? |
| Message-ID | <26-01-005@comp.compilers> |
In discussing LR-Regular parsing, Grune [1] gives an algorithm for computing
the CFG of LR(0) item right contexts. I wondered if LALR(1) look-ahead sets
are just the FIRST of the item right context grammar?
1. @book{Grune:1990:PTP:130365,
author = {Grune, Dick and Jacobs, Ceriel J. H.},
title = {Parsing Techniques: A Practical Guide},
year = {1990},
isbn = {0-13-651431-6},
publisher = {Ellis Horwood},
address = {Upper Saddle River, NJ, USA},
}
[toc] | [next] | [standalone]
| From | Chris Clark <cclark@imachinesinc.com> |
|---|---|
| Date | 2026-01-31 01:30 +0000 |
| Message-ID | <26-01-007@comp.compilers> |
| In reply to | #3710 |
While I haven't read the book you reference, and thus am not familiar with the details of the "right context grammar", I would suggest you look to verify that in cases where there are nullable non-terminals in the right context grammar, that it would also include the "follow" set and not just the "first' set. We did something similar to that in our version of "Yacc++ and the Language Objects Library" but our algorithm is a non-standard implementation of the technology. Still the LR(0) machine has more information in it than is generally assumed.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.compilers
csiph-web