Related articles |
---|
Articles/books that discuss separating the context-free part of a lang costello@mitre.org (Costello, Roger L.) (2013-05-17) |
Re: Articles/books that discuss separating the context-free part of a gah@ugcs.caltech.edu (glen herrmannsfeldt) (2013-05-18) |
Re: Articles/books that discuss separating the context-free part of a ademakov@gmail.com (Aleksey Demakov) (2013-05-18) |
Re: Articles/books that discuss separating the context-free part of a genew@telus.net (Gene Wirchenko) (2013-05-19) |
Re: Articles/books that discuss separating the context-free part of a gah@ugcs.caltech.edu (glen herrmannsfeldt) (2013-05-20) |
Re: Articles/books that discuss separating the context-free part of a anton@mips.complang.tuwien.ac.at (2013-05-20) |
Re: Articles/books that discuss separating the context-free part of a genew@telus.net (Gene Wirchenko) (2013-05-20) |
[3 later articles] |
From: | "Costello, Roger L." <costello@mitre.org> |
Newsgroups: | comp.compilers |
Date: | Fri, 17 May 2013 20:57:38 +0000 |
Organization: | Compilers Central |
Keywords: | parse, theory |
Posted-Date: | 17 May 2013 18:47:35 EDT |
Accept-Language: | en-US |
Content-Language: | en-US |
I read this fantastic post on the comp.theory list:
http://coding.derkeiler.com/Archive/General/comp.theory/2004-03/0189.html
The poster makes the point that most programming languages define a
context-free core, and then have additional algorithms which run on the parse
tree to filter out constructs that are illegal in the language:
This separates out the context-free part of the language
from the context-sensitive part -- which is generally
regarded as good practice (a kind of modular "programming"
discipline for language design).
Are there any articles or books that discuss this technique?
[That's been the conventional wisdom at least since I took a compilers
course in the early 1970s. I believe I mentioned it in lex&yacc and
later in flex&bison. It's easier, and it also permits much better
error messages. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.