Re: Grammar needed

Karsten Nyblad <>
26 Oct 2006 00:30:13 -0400

          From comp.compilers

Related articles
Grammar needed (Leonardo Teixeira Passos) (2006-10-24)
Re: Grammar needed (Sylvain Schmitz) (2006-10-26)
Re: Grammar needed (Karsten Nyblad) (2006-10-26)
Re: Grammar needed (Pete Jinks) (2006-10-26)
Re: Grammar needed (Chris F Clark) (2006-10-26)
Re: Grammar needed (Leonardo Teixeira Passos) (2006-11-01)
| List of all articles for this month |

From: Karsten Nyblad <>
Newsgroups: comp.compilers
Date: 26 Oct 2006 00:30:13 -0400
Organization: Compilers Central
References: 06-10-101
Keywords: parse, theory
Posted-Date: 26 Oct 2006 00:30:13 EDT

Leonardo Teixeira Passos wrote:
> (i) It represents an LR(k) language
> (ii) The grammar it self isn't LR(k) for any k, for there is at least
> one conflict. One or more of these conflicts does not indicate
> ambiguity in the grammar, but can't be solved with any k.

Start symbol: S
Non terminals: S A B C
Terminals: a b c
The language as regular expression: c*(a|b)
Ambiguity: You cannot know if you should start by reducing the empty
string to A or B before you see a or b.

S -> A C a
S -> B C b
A ->
B ->
C ->
C -> C c

Karsten Nyblad
148f3wg02 at sneakemail dot com

Post a followup to this message

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