From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5DD79BC48 for ; Sun, 3 Apr 2005 18:18:13 +0200 (CEST) Received: from alex.barettalocal.com (host71-4.pool62211.interbusiness.it [62.211.4.71] (may be forged)) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j33GIC3l001884 for ; Sun, 3 Apr 2005 18:18:13 +0200 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by alex.barettalocal.com (Postfix) with ESMTP id 939792BAAD2 for ; Sun, 3 Apr 2005 18:18:08 +0200 (CEST) Message-ID: <42501740.1040802@barettadeit.com> Date: Sun, 03 Apr 2005 18:18:08 +0200 From: Alex Baretta User-Agent: Debian Thunderbird 1.0 (X11/20050116) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Parser combinators [was: some comments on ocaml{lex,yacc} from a novice's POV] References: <49464.202.164.198.46.1112355123.squirrel@www.ivorykite.com> <424DA923.7020106@tfb.com> <50130.202.164.198.46.1112418604.squirrel@www.ivorykite.com> <20050402.163851.88994843.garrigue@math.nagoya-u.ac.jp> In-Reply-To: <20050402.163851.88994843.garrigue@math.nagoya-u.ac.jp> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 42501744.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; baretta:01 parser:01 combinators:01 ocaml:01 corresponds:01 ocaml:01 parsers:01 parsers:01 parser:01 combinators:01 cmo:01 baretta:01 wrote:01 sticking:01 jacques:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: Jacques Garrigue wrote: > > Interestingly, your example corresponds exactly to the one in the > ocaml tutorial, where it is solved using stream parsers. > Stream parsers are a bit more involved than just writing yacc rules, > but they give you more control on how to combine rules (you can write > parser combinators.) And they are completely integrated in the > language using camlp4. > Er.. Excuse me for sticking my nose into this, but I think I read something interesting. Parser combinators? What do you mean? I'm quite sure I have not seen any operators acting on stream parsers, at least if by stream parsers you mean the LL1 based on pa_op.cmo camlp4 module. Alex -- ********************************************************************* http://www.barettadeit.com/ Baretta DE&IT A division of Baretta SRL tel. +39 02 370 111 55 fax. +39 02 370 111 54 Our technology: The Application System/Xcaml (AS/Xcaml) The FreerP Project