From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 3DD65BCAE for ; Sun, 26 Jun 2005 15:25:38 +0200 (CEST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j5QDPbCK019758 for ; Sun, 26 Jun 2005 15:25:37 +0200 Received: by zproxy.gmail.com with SMTP id i11so92639nzh for ; Sun, 26 Jun 2005 06:25:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VlIrzSOxnQfDqWfgP6gYaCnjCkEc6mVXcmpjAY0CJhh70MrzdzkJ2Scz2IcAswT+n/9hcFo+h7FtfqxlaUKRCbrVXTB7rqmk9SBOtQEkGLJZiWZ4chd/TDisAHpBEs9fSMe+pmDdC6zYn9jzziuGI2w3n3mX4EGPX2CM7tt2Lqk= Received: by 10.36.222.46 with SMTP id u46mr3746100nzg; Sun, 26 Jun 2005 06:25:36 -0700 (PDT) Received: by 10.36.79.1 with HTTP; Sun, 26 Jun 2005 06:25:36 -0700 (PDT) Message-ID: Date: Sun, 26 Jun 2005 15:25:36 +0200 From: Sen Horak Reply-To: Sen Horak To: Oliver Bandel Subject: Re: [Caml-list] Stream parser/make_lexer Cc: caml-list@yquem.inria.fr In-Reply-To: <20050626121847.GA322@first.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050626121847.GA322@first.in-berlin.de> X-Miltered: at nez-perce with ID 42BEACD1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 parser:01 lexer:01 stdin:01 char:01 ocamllex:01 ocamlyacc:01 parsers:01 parser:01 ocaml:01 preprocess:01 ocamllex:01 ocamlyacc:01 ocaml:01 thema:98 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.2 X-Spam-Level: Ok, but that still doesn't answer my question (on how to connect the stdin channel to a <> compatible char stream). > I sometimes used the Stream-Module. > But in the last time I switched more to ocamllex/ocamlyacc. > The reason is, that I find them a good tool for many things. > But I didn't tried the camlp4-stuff. It may be more easy to > write complicated parsers with thema and maybe more elegant. The documentation says that the parser interface is no longer supported by proper ocaml, so we need to preprocess with ocampp4. =20 > But one reason to use ocamllex/ocamlyacc is that they are > similar to lex/yacc, and therfore, if programming in a > commercial field, porting the Ocaml-software back to C > (even if not really happy about this), is easier. The parser interface seems to be a nice thing if you want to "script" in ocaml - that is, if you want to write quick and dirty solutions to problems that you would ordinarily do in Perl/PYthon etc. Of course, if you want to write a more complex parser, it's better to do it in lex/yacc. SH