From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 0F17DBBA7 for ; Tue, 19 Jul 2005 21:56:17 +0200 (CEST) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id j6JJuGuk032003 for ; Tue, 19 Jul 2005 21:56:16 +0200 Received: from c-24-3-154-200.hsd1.pa.comcast.net ([24.3.154.200]) by ux9.sp.cs.cmu.edu id aa15692; 19 Jul 2005 15:12 EDT Received: from ecc by stratocaster.home with local (Exim 4.52) id 1DuxVv-0002Nx-PS for caml-list@yquem.inria.fr; Tue, 19 Jul 2005 15:12:23 -0400 Date: Tue, 19 Jul 2005 15:12:23 -0400 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] parsing OCaml code Message-ID: <20050719191223.GB9123@localhost> Mail-Followup-To: caml-list@yquem.inria.fr References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i From: Eric Cooper X-Miltered: at nez-perce with ID 42DD5AE0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 parsing:01 ocaml:01 grammar:01 ocaml:01 ocamlyacc:01 ocamllex:01 parsing:01 parser:01 lexer:01 mll:01 ocamlyacc:01 reuse:01 grammar:01 ocamllex:01 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 Tue, Jul 19, 2005 at 01:05:58PM -0400, Nathaniel J. Gaylinn wrote: > Does anyone know where I could find Yacc grammar descriptions of > OCaml, or would I have to write them myself? OCaml uses ocamlyacc and ocamllex for its front-end: see .../parsing/parser.mly and lexer.mll. ocamlyacc is very similar to yacc/bison; reuse of the grammar should be straightforward. ocamllex is similar to lex/flex, but it supports mutually recursive rules instead of lex's explicit "start conditions", so you might have a bit more work if you want to translate it. -- Eric Cooper e c c @ c m u . e d u