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 CBBE2BCAE for ; Sun, 26 Jun 2005 14:19:10 +0200 (CEST) Received: from first.in-berlin.de (dialin-145-254-065-170.arcor-ip.net [145.254.65.170]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j5QCJ9AR016735 for ; Sun, 26 Jun 2005 14:19:10 +0200 Received: by first.in-berlin.de (Postfix, from userid 501) id 08EE110B666; Sun, 26 Jun 2005 14:18:48 +0200 (CEST) Date: Sun, 26 Jun 2005 14:18:47 +0200 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Stream parser/make_lexer Message-ID: <20050626121847.GA322@first.in-berlin.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Miltered: at concorde with ID 42BE9D3D.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 lexer:01 parser:01 deprecated:01 parsers:01 ocaml:01 ocamllex:01 ocamlyacc:01 ocamllex: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 12:12:40PM +0200, Sen Horak wrote: [...] > Also, is the make_lexer/stream parser way of building a parser > deprecated? I find it a convenient way to build small parsers quickly. > Or do most ocaml programmers just use ocamllex/ocamlyacc for > everything? 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. 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. So during the next days and weeks I think I will develop some software twice: in C and the same program also in OCaml. This will yield insights to how much easier and safer it is to develop in OCaml than in C. I just yesterday got a "Bus error" because one function was not/bad implemented in the C version. I didn't ported that stuff to OCaml now, but it is planned. And OCaml had warned me that there is a problem. (But, btw: using -Wall from gcc would have warned me, but OCaml wouldn't compile the code...) So, using ocamllex/ocymlyacc has some advantages that are not in the programming field itself... but in the working environment / where you want to use your software. It's really hard to start with OCaml and then restrictions say that you have to use C instead... but that's how it is. Ciao, Oliver