Re: Doubt with parse tree

Hans-Peter Diettrich <DrDiettrich1@aol.com>
26 Oct 2006 00:29:08 -0400

          From comp.compilers

Related articles
Doubt with parse tree anandr86@gmail.com (2006-10-24)
Re: Doubt with parse tree int2k@gmx.net (Wolfram Fenske) (2006-10-24)
Re: Doubt with parse tree DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-10-26)
| List of all articles for this month |
From: Hans-Peter Diettrich <DrDiettrich1@aol.com>
Newsgroups: comp.compilers
Date: 26 Oct 2006 00:29:08 -0400
Organization: Compilers Central
References: 06-10-093
Keywords: parse
Posted-Date: 26 Oct 2006 00:29:08 EDT

anandr86@gmail.com wrote:


> E -> E + E
> E -> E * E
> E -> (E)
> E -> id
>
> and the input is id + id * id


We just had such a discussion, the grammar is ambiguous. The + and *
operators have no specific priority and grouping.


Perhaps this example was given to demonstrate the need for more detailed
grammars?


DoDi



Post a followup to this message

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