From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p04JqTL7025171 for ; Tue, 4 Jan 2011 20:52:29 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwAAH4II02AcIhIkWdsb2JhbACVXY5OFQEBAQEJCwoHEQUfthaGKYJyglgEhGiJPA X-IronPort-AV: E=Sophos;i="4.60,274,1291590000"; d="scan'208";a="85388377" Received: from redflag.cs.princeton.edu ([128.112.136.72]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Jan 2011 20:52:23 +0100 Received: from [192.168.1.101] (ool-4355b7a4.dyn.optonline.net [67.85.183.164]) (authenticated bits=0) by redflag.CS.Princeton.EDU (8.13.8/8.13.8) with ESMTP id p04JqGer027881 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 4 Jan 2011 14:52:18 -0500 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=iso-8859-1 From: Yitzhak Mandelbaum In-Reply-To: Date: Tue, 4 Jan 2011 14:52:15 -0500 Cc: Caml-list List Message-Id: <5D8B19DD-7BE3-4ECB-83E3-C20D5463CFDF@cs.princeton.edu> References: <4D23353C.8020803@gmail.com> <1259991756.440008.1294155536392.JavaMail.root@zmbs2.inria.fr> <20110104174545.GA1535@yquem.inria.fr> To: =?iso-8859-1?Q?Daniel_B=FCnzli?= X-Mailer: Apple Mail (2.1082) X-Proofpoint-Virus-Version: vendor=nai engine=5400 definitions=6215 signatures=655433 X-Proofpoint-Spam-Reason: safe Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p04JqTL7025171 Subject: Re: [Caml-list] Array.make exception and parser Daniel, I'm not sure you want to bring the ocaml compiler as proof-case for your argument. Its parser is generated by ocamlyacc, which is a relatively ancient tool (the codebase is a modified version of the Berkeley Yacc, written in C. I'm guessing that the large majority of that code is well over 20 years old at this point). There are more modern LR parser generators which do a far better job and there's no theoretical reason they can't do just as well as LL tools. Also, you might want to keep in mind that this is largely a zero-sum game. If the developers spend more time on the parser, that's less time on the rest of the compiler or new research. So, saving developer time does, in fact, mean *more* user convenience -- just in a different part of the compiler. Yitzhak On Jan 4, 2011, at 2:30 PM, Daniel Bünzli wrote: >> For what it's worth, here is my answer: an LR parser generator (like Menhir) >> accepts a larger class of grammars without refactoring (no need to eliminate >> left recursion, identify common left factors, etc.) and is also able to >> *explain* why the grammar is ambiguous (or rather, why it lies outside the LR >> class), which a combinator-based approach cannot do. > > So everybody trades developer convenience for end user convenience -- > I mean, the syntax errors produced by LR parsers are just terrible, > the ocaml compiler is here to witness that. > > That's depressing. > > Daniel > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > ----------------------------- Yitzhak Mandelbaum