From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p04H3fRH012439 for ; Tue, 4 Jan 2011 18:03:41 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4AANnhIk2AcIgmmWdsb2JhbACVbo5OFQEBAQEBCAsKBxEktiWGXoVKBIRo X-IronPort-AV: E=Sophos;i="4.60,273,1291590000"; d="scan'208";a="71794687" Received: from bluebox.cs.princeton.edu ([128.112.136.38]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Jan 2011 18:03:35 +0100 Received: from m79706mdc352j5s.us.cingular.net ([135.207.102.94]) (authenticated bits=0) by bluebox.CS.Princeton.EDU (8.13.8/8.13.8) with ESMTP id p04H3MdT025815 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 4 Jan 2011 12:03:25 -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 12:03:22 -0500 Cc: Caml-list List Message-Id: References: <4D23353C.8020803@gmail.com> 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 p04H3fRH012439 Subject: Re: [Caml-list] Array.make exception and parser Daniel, You're right about those transformations. Yet, when your grammar has hundreds of nonterminals, most or all with semantic actions attached, the transformations you describe can be quite tedious and error-prone. Tools can certainly help here, but that would require people being familiar with them. Its usually easier just to take Yacc for a spin than to go that effort. I'm not trying to advocate for one approach over another. I was just trying to answer your question about why people do the things they do. Also, if you have any further questions, may I suggest we take it off the caml-list? I think we've wandered off-topic here. :-) -- Yitzhak On Jan 4, 2011, at 11:42 AM, Daniel Bünzli wrote: >> A short answer (among many) to your particular question: it often requires a lot off effort just to discover whether " a recursive descent parser with some >> combinators fits perfectly," > > Well I don't know what "a lot of effort" means to you. But IIRC my > compiler course it's a matter of taking your EBNF grammar, eliminating > left recursion and left factoring the grammar. If you can't do that > with your grammar then you cannot parse it with LL(k). > > Best, > > 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