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 E1B59BCAE for ; Sun, 26 Jun 2005 16:24:38 +0200 (CEST) Received: from first.in-berlin.de (dialin-145-254-064-117.arcor-ip.net [145.254.64.117]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j5QEObNN024541 for ; Sun, 26 Jun 2005 16:24:37 +0200 Received: by first.in-berlin.de (Postfix, from userid 501) id 6F88A10BC0F; Sun, 26 Jun 2005 16:24:20 +0200 (CEST) Date: Sun, 26 Jun 2005 16:24:20 +0200 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Stream parser/make_lexer Message-ID: <20050626142419.GA436@first.in-berlin.de> References: <20050626121847.GA322@first.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.6i X-Miltered: at nez-perce with ID 42BEBAA5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; oliver:01 bandel:01 oliver:01 in-berlin:01 caml-list:01 parser:01 lexer:01 stdin:01 char:01 deprecated:01 ocamllex:01 ocamlyacc:01 ocamllex:01 ocamlyacc:01 ocaml: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: On Sun, Jun 26, 2005 at 03:25:36PM +0200, Sen Horak wrote: > Ok, but that still doesn't answer my question (on how to connect the > stdin channel to a <> compatible char stream). Yes, sorry, I was a littlebid off-topic. But you asked, if the stream-parsers are deprecated. And you also asked, if most people are using ocamllex/ocamlyacc. So I thought it was for your interest too, to hear such opinions about selecting ocamllex/ocamlyacc. For later I will try the other parer-stuff too, but for now, where I look to get some projects running, it's best to do it such a "compatible" way. So rapid development can be done in OCaml very fast. And when all goes well, the software will be ported back to C, if not possible to show the people that it's better to let it as it is (and in OCaml). If this did not interest you, sorry. > > > 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. Well ocampp4? The first time I hear from ocampp4. > > > 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. Ah, ok. Fine. ;-) > > Of course, if you want to write a more complex parser, it's better to > do it in lex/yacc. Ah, ok. So then I decided the right way. :) Sometimes it seems to mee, that people who are writing about the stream-parsers on this list, would ´choose this because it's good for doing hard parser stuff. So I maybe misunderstood this. As I planned (for a long time, but now started to lift up my ass and start with it) to implement own languages (Domain Specific Languages), so I need a tool for doing the lex-/parse-stuff. I will start with simple things, but I'm shure it will be complex short time later... :) And as maybe said before, I'm happy to have OCaml on my side. :) BTW: is there something like a converter from OCaml to C, so that I can write OCaml-code but for people who wants it in C it can be converted automatically? (Well, they should install ocaml instead... but....) Ciao, Oliver