Re: multi-language parsing by using yacc

bobduff@world.std.com (Robert A Duff)
Mon, 21 Aug 1995 16:33:51 GMT

          From comp.compilers

Related articles
multi-language parsing by using yacc pliang@msmail4.HAC.COM (Peter Liang) (1995-08-13)
Re: multi-language parsing by using yacc simmons@bnr.ca (steve (s.s.) simmons) (1995-08-17)
Re: multi-language parsing by using yacc erik@kroete2.freinet.de (1995-08-21)
Re: multi-language parsing by using yacc ctv@cs.vu.nl (Cees Visser) (1995-08-21)
Re: multi-language parsing by using yacc bobduff@world.std.com (1995-08-21)
multi-language parsing by using yacc 75066.3204@CompuServe.COM (Carl Barron) (1995-08-22)
| List of all articles for this month |

Newsgroups: comp.compilers
From: bobduff@world.std.com (Robert A Duff)
Keywords: yacc
Organization: The World Public Access UNIX, Brookline, MA
References: 95-08-097 95-08-136
Date: Mon, 21 Aug 1995 16:33:51 GMT

Erik Corry <ehcorry@inet.uni-c.dk> wrote:
>My experience is that it is difficult to report good error messages from
>a Yacc parser, though admittedly gcc does very well.


GNAT (the GNU Ada compiler) uses a hand-written recursive-descent
parser. It generates *excellent* syntactic error messages, IMHO.
The syntax of Ada is far from trivial, and is full of ambiguities.


>[It's true, parsing C++ with yacc is quite hard because the syntax is quite
>context dependent and in a few cases ambiguous. Some people think this says
>at least as much about the design of C++ as about yacc. -John]


"Some people" would say that all this fancy parser-generating technology
is a waste of time, since if you design the language to have a simple
syntax, a hand-written parser is trivial. Plain old Lisp, for example
-- it would be silly to use yacc for that.


- Bob
--


Post a followup to this message

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