Re: eliminating left-recursion

Hans-Peter Diettrich <DrDiettrich@compuserve.de>
9 Jan 2006 23:49:39 -0500

          From comp.compilers

Related articles
eliminating left-recursion aegis@mad.scientist.com (aegis) (2006-01-07)
Re: eliminating left-recursion rjshaw@netspace.net.au (Russell Shaw) (2006-01-08)
Re: eliminating left-recursion cdodd@acm.org (Chris Dodd) (2006-01-08)
Re: eliminating left-recursion DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-01-09)
Re: eliminating left-recursion lojiancn@hotmail.com (jackycn) (2006-01-09)
| List of all articles for this month |

From: Hans-Peter Diettrich <DrDiettrich@compuserve.de>
Newsgroups: comp.compilers
Date: 9 Jan 2006 23:49:39 -0500
Organization: Compilers Central
References: 06-01-013
Keywords: parse
Posted-Date: 09 Jan 2006 23:49:39 EST

aegis wrote:
>
> Given the following production:
>
> d-declarator: ID | d-declarator '[' constant ']' | '(' d-declarator ')'
> ;
...
> Is it even possible to express the second rule of the above production
> without relying on left-recursion?


Suggestion:


d-declarator: ( ID | '(' d-declarator ')' ) { '[' constant ']' } .


;-)


DoDi


Post a followup to this message

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