Related articles |
---|
Crenshaw's Tutorial colin@bentanimation.com (Colin Doncaster) (2000-01-19) |
Re: Crenshaw's Tutorial rkrayhawk@aol.com (2000-01-21) |
Re: Crenshaw's Tutorial jcrens@earthlink.net (Jack Crenshaw) (2000-02-05) |
Re: Crenshaw's Tutorial joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-02-10) |
Re: Crenshaw's Tutorial gneuner@dyn.com (2000-02-12) |
Re: Crenshaw's Tutorial alanf@ns.net (Alan Fargusson) (2000-02-15) |
Re: Crenshaw's Tutorial rhyde@shoe-size.com (Randall Hyde) (2000-02-15) |
Re: Crenshaw's Tutorial joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-02-17) |
Re: Crenshaw's Tutorial david.thompson1@worldnet.att.net (David Thompson) (2000-02-21) |
Re: Crenshaw's Tutorial christian.bau@isltd.insignia.com (2000-03-23) |
From: | "Joachim Durchholz" <joachim.durchholz@halstenbach.com.or.de> |
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:
http://iecc.com/comparch/article/94-06-107. A bit old, but...)
Regards,
Joachim
[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
comp.compilers page.
Search the
comp.compilers archives again.