Re: Articles/books that discuss separating the context-free part of a language from the context-sensitive part?

Gene Wirchenko <genew@telus.net>
Mon, 20 May 2013 23:24:36 -0700

          From comp.compilers

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)
| List of all articles for this month |

From: Gene Wirchenko <genew@telus.net>
Newsgroups: comp.compilers
Date: Mon, 20 May 2013 23:24:36 -0700
Organization: A noiseless patient Spider
References: 13-05-010 13-05-018
Keywords: parse, errors
Posted-Date: 22 May 2013 18:03:41 EDT

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



Post a followup to this message

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