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

Gene Wirchenko <genew@telus.net>
Sun, 19 May 2013 18:02:40 -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: Sun, 19 May 2013 18:02:40 -0700
Organization: A noiseless patient Spider
References: 13-05-010 13-05-011
Keywords: parse, errors
Posted-Date: 19 May 2013 21:50:01 EDT

On Sat, 18 May 2013 00:18:54 +0000 (UTC), glen herrmannsfeldt
<gah@ugcs.caltech.edu> wrote:


[snip]


>As I remember it, it is not so easy to do for recursive descent
>parsers. As a result, as noted, you get poor error messages, such as:
>
> SYNTAX ERROR
>
>somewhere near where the problem is. For languages with reserved works,
>it is nice to say exactly what the problem is. It gets more


          It is nice for any language. When parsing string, I tend to
avoid complex regexes for the same reason. If I build an FSA, I can
often get specific on what the error is.


>interesting without reserved words. Yesterday, following a post
>in comp.lang.fortran I tried:
>
>TYPE :: DEEP
> TYPE(DEEP) :: POINTER
>END TYPE
>
>When compiling it, the error message, pointing right to the
>word POINTER, say "must have POINTER attribute".
>
>Fortunately it only took me a few seconds to figure out, and then
>laugh at it. But yes, you can get funny messages without reserved
>words.


          Could you explain what the error was? I do not know modern
Fortran.


Sincerely,


Gene Wirchenko


Post a followup to this message

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