Is it possible to parse LR(1) grammars without constructing the parse table?
<p>Usually LR(1) parsers construct the parse table offline, but this is not possible in the case of extensible syntax. Incrementally rebuilding the parse table is possible, but requires an expensive "garbage collection" step. A possibility that occurred to me is delaying the rebuild until the end of the current file, and in the mean time parsing directly from the grammar. However, I am not sure if this is possible for LR(1) grammars.</p>

<p>I think for LR(0) grammars, comparing the top of the parse stack to each production with longest-match-wins would be equivalent to the usual method, although obviously somewhat slower. However, I am unsure if this is possible for LR(1) grammars, at least without rebuilding substantial parts of the parse table at every step, or if it is, how I would go about it.</p>

<p>Is there a known way to do this? Or do I need to bite the bullet and do incremental table generation?</p>