Parse tree problem
- From: anandr86@xxxxxxxxx
- Date: 21 Oct 2006 22:04:16 -0700
Hi,
I was recently going through "Principles of Compiler design, Aho
and Ullman". In that it was specified that one particular grammar the
one below had two right most derivations for a single input. How is
that possible ? RMD is expanding using the right most nonterminal right
......
E -> E + E
E -> E * E
E -> (E)
E -> id
and the input is id + id * id
( The above is cited in the context of shift-reduce parsers in the book)
.
- Follow-Ups:
- Re: Parse tree problem
- From: Rick Decker
- Re: Parse tree problem
- Prev by Date: Re: Counter example for Mr. Diaby algorithm solving TSP problem in polynomial time
- Next by Date: Top down parsing
- Previous by thread: Counter example for Mr. Diaby algorithm solving TSP problem in polynomial time
- Next by thread: Re: Parse tree problem
- Index(es):
Relevant Pages
|