Related articles |
---|
eliminate left recursion gurukiller@gmx.de (2002-01-28) |
Re: eliminate left recursion dr_feriozi@prodigy.net (SLK Parsing) (2002-01-30) |
Re: eliminate left recursion jrwyatt@nortelnetworks.com (Robert Wyatt) (2002-02-06) |
From: | SLK Parsing <dr_feriozi@prodigy.net> |
Newsgroups: | comp.compilers |
Date: | 30 Jan 2002 20:41:44 -0500 |
Organization: | Prodigy Internet http://www.prodigy.com |
References: | 02-01-155 |
Keywords: | LL(1) |
Posted-Date: | 30 Jan 2002 20:41:44 EST |
Herbert Fröhlich wrote:
>
> The following grammar G1 is left recursive:
>
> A -> A S.
> A -> S.
> S -> S "*".
> S -> "(" R ")".
> S -> "x".
>
I assume the quotes and periods are metacharacters. SLK produces the
following grammar.
A :
S more_A
more_A :
S more_A
_epsilon_
S :
( R ) more_S
x more_S
more_S :
* more_S
_epsilon_
Return to the
comp.compilers page.
Search the
comp.compilers archives again.