From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.9 required=5.0 tests=AWL,DNS_FROM_SECURITYSAGE, SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 81A68BB84 for ; Sat, 15 Nov 2008 07:41:53 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AucBAAb+HUnAXQImgWdsb2JhbACBbZFrAQEWIrsygnk X-IronPort-AV: E=Sophos;i="4.33,608,1220220000"; d="scan'208";a="31478364" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 15 Nov 2008 07:41:53 +0100 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id mAF6fqgW023001 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 15 Nov 2008 07:41:52 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar4AAEP+HUnUGyokkWdsb2JhbACBbZFrAQEBAQkLCgcRA7sugnk X-IronPort-AV: E=Sophos;i="4.33,608,1220220000"; d="scan'208";a="19209034" Received: from smtp6-g19.free.fr ([212.27.42.36]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Nov 2008 07:41:52 +0100 Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id D309619742 for ; Sat, 15 Nov 2008 07:41:51 +0100 (CET) Received: from macbookpro.local (lns-bzn-48f-81-56-220-129.adsl.proxad.net [81.56.220.129]) by smtp6-g19.free.fr (Postfix) with ESMTP id 8B88719743 for ; Sat, 15 Nov 2008 07:41:51 +0100 (CET) Message-ID: <491E700B.2040705@univ-savoie.fr> Date: Sat, 15 Nov 2008 07:45:31 +0100 From: Christophe Raffalli User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Jane St Capital Ocaml Summer Project code? References: <20081112115822.f5a81ac4.mle+ocaml@mega-nerd.com> <891bd3390811111752u6493f2d1j9c88547a9db12670@mail.gmail.com> <20081113100316.57390150.mle+ocaml@mega-nerd.com> <891bd3390811121628n15cf8a2cg27ba1854accdcf48@mail.gmail.com> <20081113113334.f114b4a1.mle+ocaml@mega-nerd.com> <491CA699.9070201@univ-savoie.fr> <20081115083050.4c2929a9.mle+ocaml@mega-nerd.com> In-Reply-To: <20081115083050.4c2929a9.mle+ocaml@mega-nerd.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at discorde with ID 491E6F30.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 ocaml:01 lexer:01 univ-savoie:01 lexer:01 parser:01 delimited:01 wrote:01 extensible:01 lama:01 exception:01 Erik de Castro Lopo a écrit : > Christophe Raffalli wrote: > > >> Have you looked at dypgen ... (http://dypgen.free.fr/), it even offers >> integrated lexer in the latest version >> > > I haven't really looked at that. What are the relative strengths and > weaknesses of the two? > > Erik > Here is what I mostly like (you have a comparison table here http://www.lama.univ-savoie.fr/~raffalli/ocaml-parsing.html: dypgen : - GLR instead of LR(1) : this gives much more elegant description of the grammar (and the possibiliy of ambigous grammar) and there is never a conflict. These are replaced by multiple parse trees (you can choose a merge function that will report that as an error, if you think your grammar should not be ambiguous). - pattern matching in rule. Example: you define a grammar for list of expressions of any-size, but you can restrict the usage to list of length at least 1, 2, ... by pattern matching) - late reject of a rule by raising an exception. - self extensible lexer and parser with delimited scope. menhir : - should be faster because it is only LR(1), but I did not test - you know for sure that your grammer is not ambiguous ...