From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 8408BBB81 for ; Thu, 22 Sep 2005 18:46:34 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8MGkYmR022424 for ; Thu, 22 Sep 2005 18:46:34 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA05138 for ; Thu, 22 Sep 2005 18:46:33 +0200 (MET DST) Received: from smtp15.wanadoo.fr (smtp15.wanadoo.fr [193.252.23.84]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j8MGkXdM030934 for ; Thu, 22 Sep 2005 18:46:33 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1501.wanadoo.fr (SMTP Server) with ESMTP id 2B460700633D for ; Thu, 22 Sep 2005 18:46:33 +0200 (CEST) Received: from wwinf1503 (wwinf1503 [172.22.146.30]) by mwinf1501.wanadoo.fr (SMTP Server) with ESMTP id 206EF7004D9F; Thu, 22 Sep 2005 18:46:33 +0200 (CEST) X-ME-UUID: 20050922164633132.206EF7004D9F@mwinf1501.wanadoo.fr Message-ID: <27582143.1127407593127.JavaMail.www@wwinf1503> From: yoann padioleau Reply-To: padator@wanadoo.fr To: Alex Baretta , Ocaml Subject: Re: [Caml-list] Yacc limitations Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [193.54.76.165] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~||~| X-WUM-REPLYTO: |~| Date: Thu, 22 Sep 2005 18:46:33 +0200 (CEST) X-Miltered: at nez-perce with ID 4332DFEA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4332DFE9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 parser:01 ocamlyacc:01 parser:01 ocaml:01 ocamlyacc:01 grammar:01 c-s:01 ocaml:01 parsing:01 grammars:01 combinators:01 grammar:01 parse:02 output:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 > I am getting very much annoyed with the obtusity of the LALR-yacc parser > generators. I have unsurmountable difficulties at teaching ocamlyacc how > to parse SQL decently. > > What is the "way to go" in terms of parser generators for Ocaml? I'd > like to see if there is some level of agreement in the community on this > issue. I personnaly use ocamlyacc and even if there is some difficulties, I like it. The problems is when there is an ambiguity in the grammar, in which case I look at the output file generated by ocamlyacc -v, C-s "conflict" in the file, and hope that my brain will find an easy solution. All the ocaml project that I know that need some complex parsing use ocamlyacc. Some people also use streams but are limited to write LL(1) grammars. Some people use parser combinators to do the same kind of stuff that stream offers. What is the problem with your SQL grammar and with ocamlyacc ?