help-bison
[Top][All Lists]
Advanced

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

Re: Determining LR(k)-ness


From: John Levine
Subject: Re: Determining LR(k)-ness
Date: 18 Nov 2009 22:41:29 -0000

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

That's what it does.  Bison can tell you whether a grammar is LALR(1),
but if it's not it can't tell you what class of language it is.

It is my impression that most practical GLR grammars have parses that
collapse pretty quickly after they split, but I don't have any
statistics to back that up.

R's,
John




reply via email to

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