|
From: | Hans Aberg |
Subject: | Re: Reusing a sub-grammar (by setting %start at runtime?) |
Date: | Sun, 26 Mar 2006 16:27:48 +0200 |
On 25 Mar 2006, at 18:14, Marcus Holland-Moritz wrote:
While being at it, I wondered if it's possible to reuse a certain part of a bison generated parser, e.g. by setting a different %start token at runtime.
No, all grammar data is static, and thrown away at parser runtime. The parser only knows some push-down automaton states, derived from the LALR(1) computations. You might try to implement a double merged grammar, and a runtime token switching between them.
Hans Aberg
[Prev in Thread] | Current Thread | [Next in Thread] |