Re: Problem with a derivation tree
- From: David C. Ullrich <ullrich@xxxxxxxxxxxxxxxx>
- Date: Sun, 22 Oct 2006 08:28:25 -0500
On Sat, 21 Oct 2006 22:59:41 -0700, William Elliot
<marsh@xxxxxxxxxxxxxxxxxx> wrote:
On Sat, 21 Oct 2006 anandr86@xxxxxxxxx wrote:
In the book "Principles of compiler design, Aho Ullman" theInputs?! Don't get it.
following exercise caught my attention. The grammar given is
S -> aSa | aa
It is quoted that a "top down parse with backtracking" can establish
the inputs with 2,4 or 8 a's but not 6 a's .... How is this possible ?
Then why don't you let someone who understands the question try
replying?
S -> aSa -> aaSaa -> aaaaaa is an output.
The grammar he's fantasizing is
S -> SS | aa
Math isn't easy. To make it obscure, take computer courses. ;-)
************************
David C. Ullrich
.
- Follow-Ups:
- Re: Problem with a derivation tree
- From: William Elliot
- Re: Problem with a derivation tree
- References:
- Problem with a derivation tree
- From: anandr86
- Re: Problem with a derivation tree
- From: William Elliot
- Problem with a derivation tree
- Prev by Date: Re: Parse tree problem
- Next by Date: Re: JSH: The world is dying
- Previous by thread: Re: Problem with a derivation tree
- Next by thread: Re: Problem with a derivation tree
- Index(es):
Relevant Pages
|