Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: Gene Wirchenko Newsgroups: comp.compilers Subject: Re: Articles/books that discuss separating the context-free part of a language from the context-sensitive part? Date: Mon, 20 May 2013 23:24:36 -0700 Organization: A noiseless patient Spider Lines: 37 Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <13-05-019@comp.compilers> References: <13-05-010@comp.compilers> <13-05-018@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: leila.iecc.com 1369260221 38145 64.57.183.58 (22 May 2013 22:03:41 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Wed, 22 May 2013 22:03:41 +0000 (UTC) Keywords: parse, errors Posted-Date: 22 May 2013 18:03:41 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:905 On Mon, 20 May 2013 10:53:39 GMT, anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote: [snip] >That depends on the syntax of the language. E.g., at one time >Modula-2 was the language used in our introductory programming course >25 years ago, our students used to write things like > >a<3 AND b<3 I would do that. >and the compiler reported a type error (a and b were of type INTEGER). >But it really was a syntax error. The students should have written > >(a<3) AND (b<3) Nasty. >because the implicit binding was > >a<(3 AND b)<3 > >and "3 AND b" was a type error. This error message confused the >students no end. Things like this are why I like details in the error messages about what is being complained about, say: "3" is not of a valid type for the "and" operator. "b" is not of a valid type for the "and" operator. That does not always help, but it usually does. Sincerely, Gene Wirchenko