Re: errata for the Dragon Book? (Marc Spitzer)
6 Oct 2000 02:10:09 -0400

          From comp.compilers

Related articles
errata for the Dragon Book? (2000-09-08)
Re: errata for the Dragon Book? (2000-10-06)
Re: errata for the Dragon Book? (Max Hailperin) (2000-10-08)
| List of all articles for this month |

From: (Marc Spitzer)
Newsgroups: comp.compilers
Date: 6 Oct 2000 02:10:09 -0400
Organization: Optimum Online
References: 00-09-043
Keywords: books

Andrew Luke NESBIT wrote:
>Hi all, Does anybody know if there exists an errata list for "Compilers:
>Principles, Techniques and Tools" by Aho, Sethi and Ullman? I've checked
>everywhere so far on the web but cannot find one.
>I think I may have found a typo. It's not really that important (I don't
>want to be pedantic), but so many people rave about what a near-perfect
>book this is, that I'm not sure whether _I've_ missed something, or
>whether this really is a genuine mistake. I think you know what I mean :)
>Anyway, here is the suspected typo from page 87, line 8, just under the
>heading "Attributes for Tokens":
> "When more than one pattern matches a lexeme, the lexical analyzer
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> must provide additional information about the particular lexeme
> that matched to the subsequent phases of the compiler."
>should read:
> "When a pattern matches more than one lexeme..."

I don't agree, those are 2 different sentences. The first one says:
given 1 lexeme and 2 or more patterens that match the lexeme you need
to have more information to find the correct pattern to apply.
The second one says:
I have more then 1 lexeme that matches the same patteren, this cannot
happen in lex. It only deals with 1 token at a time, so you could not
have it match multple lexemes into the same patteren at the same time.
You are going left to right on this and you cannot have 2 lexemes in
the same part of your input buffer.


Post a followup to this message

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