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 D8238BC48 for ; Mon, 4 Apr 2005 07:44:17 +0200 (CEST) Received: from smtp.syd.swiftdsl.com.au (smtp.syd.swiftdsl.com.au [218.214.224.138]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id j345iESc008930 for ; Mon, 4 Apr 2005 07:44:16 +0200 Received: (qmail 4109 invoked from network); 4 Apr 2005 05:44:22 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.swiftdsl.com.au with SMTP; 4 Apr 2005 05:44:22 -0000 Received: from coltrane (localhost [127.0.0.1]) by coltrane.mega-nerd.net (Postfix) with SMTP id 1FCA27ADA; Mon, 4 Apr 2005 15:44:09 +1000 (EST) Date: Mon, 4 Apr 2005 15:44:08 +1000 From: Erik de Castro Lopo To: effbiae@ivorykite.com Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: some comments on ocaml{lex,yacc} from a novice's POV Message-Id: <20050404154408.16534457.ocaml-erikd@mega-nerd.com> In-Reply-To: <51945.202.164.198.46.1112586123.squirrel@www.ivorykite.com> References: <49464.202.164.198.46.1112355123.squirrel@www.ivorykite.com> <424DA923.7020106@tfb.com> <50130.202.164.198.46.1112418605.squirrel@www.ivorykite.com> <51945.202.164.198.46.1112586123.squirrel@www.ivorykite.com> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4250D42E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 parser:01 parsers:01 haskell:01 parser:01 compilers:01 compilers:01 compiler:01 statically:01 ocaml:01 nospam:98 ...:98 wrote:01 dynamically:01 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=none autolearn=disabled version=3.0.2 X-Spam-Level: On Mon, 4 Apr 2005 13:42:03 +1000 (EST) "Jack Andrews" wrote: > here's the usual calc example that generates a parser: > > (define expr-parser > (lalr-parser > ; Terminal symbols > (ID + - * /) > ; Productions > (e (e + t) : (+ $1 $3) > (e - t) : (- $1 $3) > (t) : $1) > (t (t * f) : (* $1 $3) > (t / f) : (/ $1 $3) > (f) : $1) > (f (ID) : $1))) > > isn't that nice?!? Yes. > compare with caml solutions? compare with any other solution? There are parsers for Haskell which would compare very favourably with your lisp parser. I haven't used them myself but I've seen example code somewhere. > i'm told there are good scheme compilers. Since scheme is a dynamically typed language, scheme compilers are unlikely to ever produce code as fast as a compiler for a statically typed langugae like ocaml. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid) +-----------------------------------------------------------+ " ... new TV ad for Microsoft's Internet Explorer e-mail program which uses the musical theme of the "Confutatis Maledictis" from Mozart's Requiem. "Where do you want to go today?" is the cheery line on the screen, while the chorus sings "Confutatis maledictis, flammis acribus addictis,". This translates to "The damned and accursed are convicted to the flames of hell."