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 15:17:29 -0800

On 2009-11-18, at 15:07:01, Hans Aberg wrote:

On 18 Nov 2009, at 23:46, Philip Aker wrote:

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

That does not help - it is just LALR(1).

Ok, I just plain have to admit a badly named question.


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).

That is another property - the number of past branchings. Perhaps you can write some actions computing it. But even in a non-GLR setting, there is no implemented feature telling whether the algorithm requires 0 or 1 lookahead tokens. This must be taken into account when making mid-rule actions, for example.

IOW, there is no glr reporting available.

Thank anyways, I do appreciate the input one way or another,

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]