On 2009-11-18, at 14:26:33, Hans Aberg wrote:

On 18 Nov 2009, at 20:08, Philip Aker wrote:

For an arbitrary .y file, I'd like to know if it's possible to get some report detail that would tell me (when using the %glr-parser option) what was the maximum 'k' lookahead used for that grammar.

Unless it has been changed lately, it just uses LALR(1) and splits the parse when ambiguous.

Hi Hans,

Thanks for your reply,

I just used LR kind of loosely. So to be technically correct, I guess I should have said LALR(k)-ness.

What I want to know is when the parser splits, even if it splits multiple times, is there any way that bison can report the maximum 'k' lookahead number reached by all of these split parsers.

Like if there was a grammar where the parser was split once and was able to resolve the problem at that point, it would report "2" (because LALR(1) already has 1 token of lookahead).


Philip Aker
echo ast...@lvpc.dslh@nl | tr a...@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.



_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to