Re: Removal of left recursion

whopkins@csd.uwm.edu (Alfred Einstead)
26 Mar 2004 22:37:50 -0500

          From comp.compilers

Related articles
Removal of left recursion manningcolin@hotmail.com (2004-03-11)
Re: Removal of left recursion whopkins@csd.uwm.edu (2004-03-26)
| List of all articles for this month |
From: whopkins@csd.uwm.edu (Alfred Einstead)
Newsgroups: comp.compilers
Date: 26 Mar 2004 22:37:50 -0500
Organization: http://groups.google.com
References: 04-03-047
Keywords: parse
Posted-Date: 26 Mar 2004 22:37:50 EST

manningcolin@hotmail.com (Colin Manning) wrote:
> Remove all the left recursions from this grammar:
> S -> aA | b | cS
> A -> Sd | e
>
> My question is this. Why bother? It seems to me that this particuar
> grammar isn't in need of any help since at each stage of the parse
> some input is consumed.


It's harmless here, since it's not cyclic. Try it with:


S -> aA } b | cS
A -> Ad | e


or


S -> Aa | b | Sc
A -> Ad | e



Post a followup to this message

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