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).
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.
Hans
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison