help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining LR(k)-ness


From: Philip Aker
Subject: Re: Determining LR(k)-ness
Date: Wed, 18 Nov 2009 14:46:13 -0800

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 address@hidden@nl | tr address@hidden p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]