Re: Production missing on page 9 of Compiler Construction

Adrian Devries <adrian.devries@t-online.de>
Sun, 02 Sep 2007 17:37:12 +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: Adrian Devries <adrian.devries@t-online.de>
Newsgroups: comp.compilers
Date: Sun, 02 Sep 2007 17:37:12 +0200
Organization: T-Online
References: 07-08-095
Keywords: books, parse

pupeno@pupeno.com schrieb:
> I'm reading Compiler Construction, by Niklaus Wirth, available on
> http://www.oberon.ethz.ch/WirthPubl/CBEAll.pdf and on page 9 he shows
> this little piece of BNF:
>
> 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?


Hello,


I think, it is an erratum. Solution: Within the production 'E = T | A
"+" T.' replace 'A' by 'E'.


The sentence above the cited section reads as follows:


"The symbols E, T, F, and V stand for expression, term, factor, and
variable."


Please confer the german edition of the referenced paper:


Wirth, Niklaus:
Grundlagen und Techniken des Compilerbaus / Niklaus Wirth. -
Bonn; Paris [u. a.]: Addison-Wesley, 1996
ISBN 3-89319-931-4


On page 6 you will find the following productions:


"(...) Die Symbole A, T, F und V stehen f|r Ausdruck, Term, Faktor und
Variable.


A = T | A "+" T.
T = F | T "*" F.
F = V | "(" A ")".
V = "a" | "b" | "c" | "d".


(...)"


Regards,
Adrian Devries


Post a followup to this message

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