Re: Wirth's Table-driven Parser

=?UTF-8?B?SsO8cmdlbiBLYWhycw==?= <>
16 May 2006 15:43:17 -0400

          From comp.compilers

Related articles
Wirth's Table-driven Parser (Daniel Zingaro) (2006-05-15)
Re: Wirth's Table-driven Parser (=?UTF-8?B?SsO8cmdlbiBLYWhycw==?=) (2006-05-16)
| List of all articles for this month |

From: =?UTF-8?B?SsO8cmdlbiBLYWhycw==?= <>
Newsgroups: comp.compilers
Date: 16 May 2006 15:43:17 -0400
Organization: Compilers Central
References: 06-05-050
Keywords: parse, history
Posted-Date: 16 May 2006 15:43:17 EDT

Daniel Zingaro wrote:

> In sec. 4.3 of Wirth's 1996 Compiler Construction book, he gives a procedure
> called Parsed for parsing a graph representing a kind of parse table.
> Without modifying Parsed, is it possible to cope with nested EBNF
> structures, for example
> x = a {[y] z} b

This ENBF grammar is not complete.
So, it is unclear if it is LR(1).

> I feel that the treatment of the empty nodes makes it impossible to parse
> sentences of this grammar correctly. I know Wirth has a solution in the
> original (non-english) manuscript: if anyone has that solution, or other
> insight, I would appreciate it.

I hold the German edition from 1996 in my hands.
Section 4.2 presents the Parsed procedure and the
section ends with four notes. The last of the notes
goes like this (translated):

    4. "Empty" is a special terminal symbol, representing
          an empty sequence. It is needed for marking the
          exit of a repitition.

Post a followup to this message

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