|Crenshaw's Tutorial email@example.com (Colin Doncaster) (2000-01-19)|
|Re: Crenshaw's Tutorial firstname.lastname@example.org (2000-01-21)|
|Re: Crenshaw's Tutorial email@example.com (Jack Crenshaw) (2000-02-05)|
|Re: Crenshaw's Tutorial firstname.lastname@example.org (Joachim Durchholz) (2000-02-10)|
|Re: Crenshaw's Tutorial email@example.com (2000-02-12)|
|Re: Crenshaw's Tutorial firstname.lastname@example.org (Alan Fargusson) (2000-02-15)|
|Re: Crenshaw's Tutorial email@example.com (Randall Hyde) (2000-02-15)|
|Re: Crenshaw's Tutorial firstname.lastname@example.org (Joachim Durchholz) (2000-02-17)|
|Re: Crenshaw's Tutorial email@example.com (David Thompson) (2000-02-21)|
|Re: Crenshaw's Tutorial firstname.lastname@example.org (2000-03-23)|
|From:||"Joachim Durchholz" <email@example.com>|
|Date:||17 Feb 2000 18:10:26 -0500|
|References:||00-01-073 00-02-01700-02-038 00-02-061 00-02-068|
|Keywords:||design, parse, comment|
> [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:
http://iecc.com/comparch/article/94-06-107. 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]
Return to the
Search the comp.compilers archives again.