Re: Reasonable Non-LR Grammar

Sylvain Schmitz <>
Wed, 01 Aug 2007 14:04:57 +0200

          From comp.compilers

Related articles
Reasonable Non-LR Grammar (Daniel Zingaro) (2007-07-31)
Re: Reasonable Non-LR Grammar (Sylvain Schmitz) (2007-08-01)
| List of all articles for this month |

From: Sylvain Schmitz <>
Newsgroups: comp.compilers
Date: Wed, 01 Aug 2007 14:04:57 +0200
Organization: Compilers Central
References: 07-07-116
Keywords: parse, LR(1)
Posted-Date: 01 Aug 2007 13:17:57 EDT

Daniel Zingaro wrote:
> Does anyone have a good example of a piece of a (possible) programming
> language grammar which is not LR(k)? I'm specifically looking for an
> example of where we can easily use Accent (a compiler-compiler using
> Earley parsers) without having to mess around with a grammar to avoid LR
> conflicts. I can contrive (mostly bad) examples but wondering what
> examples others have.

You can consider the Java modifiers syntax in

There are two examples in the Standard ML language definition, although
they are mingled with ambiguities; see Kahrs' analysis in

Hope that helps,


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.