Re: Crenshaw's Tutorial

"Joachim Durchholz" <>
17 Feb 2000 18:10:26 -0500

          From comp.compilers

Related articles
Crenshaw's Tutorial (Colin Doncaster) (2000-01-19)
Re: Crenshaw's Tutorial (2000-01-21)
Re: Crenshaw's Tutorial (Jack Crenshaw) (2000-02-05)
Re: Crenshaw's Tutorial (Joachim Durchholz) (2000-02-10)
Re: Crenshaw's Tutorial (2000-02-12)
Re: Crenshaw's Tutorial (Alan Fargusson) (2000-02-15)
Re: Crenshaw's Tutorial (Randall Hyde) (2000-02-15)
Re: Crenshaw's Tutorial (Joachim Durchholz) (2000-02-17)
Re: Crenshaw's Tutorial (David Thompson) (2000-02-21)
Re: Crenshaw's Tutorial (2000-03-23)
| List of all articles for this month |

From: "Joachim Durchholz" <>
Newsgroups: comp.compilers
Date: 17 Feb 2000 18:10:26 -0500
Organization: Compilers Central
References: 00-01-073 00-02-01700-02-038 00-02-061 00-02-068
Keywords: design, parse, comment

John wrote:
> [Please, let's not get into hair-splitting arguments about what's the
> syntax and what's the semantics.

Indeed. Old terminology separates "syntax" (CFG), "static semantics"
(declaration rules) and "semantics" (effect of statements).

> I don't know of any parser that attempts
> to enforce redeclaration rules syntactically.

I don't know whether this was ever built into a compiler, but van
Wijngarden "two-level grammars" can indeed handle variable declaration
rules (including type rules).
Two-level grammars are not context-free but context-sensitive (one step
further down in the Chomsky hierarchy), but they are so regular that I
suspect that they should be tractable using automated tools (in fact I
just found a mention of "Extended Affix Grammars" which seem to be an
automatizable relative of vWGs).
(Here's a reference to two-level grammars in general: A bit old, but...)

[I was under the impression that practical Algol68 compilers flattened the
grammar and used more conventional parsers, but I haven't looked into it
enough to be sure. -John]

Post a followup to this message

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