Re: Production missing on page 9 of Compiler Construction

torbenm@app-7.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Mon, 03 Sep 2007 09:09:23 +0200

          From comp.compilers

Related articles
Production missing on page 9 of Compiler Construction pupeno@pupeno.com (pupeno@pupeno.com) (2007-08-31)
Re: Production missing on page 9 of Compiler Construction DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-09-01)
Re: Production missing on page 9 of Compiler Construction adrian.devries@t-online.de (Adrian Devries) (2007-09-02)
Re: Production missing on page 9 of Compiler Construction torbenm@app-7.diku.dk (2007-09-03)
| List of all articles for this month |
From: torbenm@app-7.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Newsgroups: comp.compilers
Date: Mon, 03 Sep 2007 09:09:23 +0200
Organization: Department of Computer Science, University of Copenhagen
References: 07-08-095
Keywords: books, errors, parse, comment
Posted-Date: 03 Sep 2007 21:30:24 EDT

"pupeno@pupeno.com" <pupeno@pupeno.com> writes:




> E = T | A "+" T.
> T = F | T "*" F.
> F = V | "(" E ")".
> V = "a" | "b" | "c" | "d".
>
> A is being used on the right hand side without it being defined on the
> left hand side first. What am I missing?
>
> The only thing I can think of is that it is missing a production at
> first, like:
>
> A = E


Alternatively, you can simply replace the "A" by an "E". It has the
same effect as adding A = E, but it doesn't make the grammar larger.


In all likelyhood, Wirth originally used A for the German/Swiss word
"Ausdruck" (meaning "Expression") and changed it to E for "Expression"
but missed a spot.


Torben
[Thanks also to several other people who sent in similar messages. -John]


Post a followup to this message

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