From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr 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 1D341BC3D for ; Mon, 8 Aug 2005 08:41:33 +0200 (CEST) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j786fWVW031706 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 8 Aug 2005 08:41:32 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay01.plus.net with esmtp (Exim) id 1E21KF-0004qG-As for caml-list@yquem.inria.fr; Mon, 08 Aug 2005 07:41:31 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocamllex+ocamlyacc and not parsing properly Date: Mon, 8 Aug 2005 07:39:03 +0100 User-Agent: KMail/1.7.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508080739.04662.jon@ffconsultancy.com> X-Miltered: at concorde with ID 42F6FE9C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamllex:01 ocamlyacc:01 parsing:01 grammar:01 lexer:01 ocaml:01 lexing:01 lexing:01 parsing:01 ocaml:01 frog:98 wrote:01 wrote:01 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Monday 08 August 2005 06:03, Jonathan Roewen wrote: > BTW: A tutorial on these sorts of things (i.e. something a bit more > complicated than the calculator example) would be great to have as a > resource. Given that the grammar is tiny and the lexer has almost as much OCaml code as lexing rules, I think this is a good candidate for not using lexing and parsing at all. If you wrote this as an OCaml function, how long would it be? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists