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 A77C7BB9A for ; Fri, 28 Oct 2005 08:26:47 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j9S6QlEd006110 for ; Fri, 28 Oct 2005 08:26:47 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA13705 for ; Fri, 28 Oct 2005 08:26:46 +0200 (MET DST) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9S6QkrR000548 for ; Fri, 28 Oct 2005 08:26:46 +0200 Received: from [192.168.0.2] (rke75-3-82-229-183-156.fbx.proxad.net [82.229.183.156]) by smtp5-g19.free.fr (Postfix) with ESMTP id 3008195E2; Fri, 28 Oct 2005 08:26:46 +0200 (CEST) Message-ID: <4361C38B.8090309@inria.fr> Date: Fri, 28 Oct 2005 08:22:03 +0200 From: Alain Frisch User-Agent: Debian Thunderbird 1.0.2 (X11/20050602) X-Accept-Language: en-us, en MIME-Version: 1.0 To: skaller Cc: Caml Mailing List Subject: Re: [Caml-list] Parser state variables References: <1130398547.7544.66.camel@rosella> In-Reply-To: <1130398547.7544.66.camel@rosella> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4361C4A7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4361C4A6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; frisch:01 frisch:01 caml-list:01 parser:01 ocamlyacc:01 ocamllex:01 workarounds:01 syntax:01 wrote:01 abstract:01 functions:01 argument:01 data:02 semantic:02 variables: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 skaller wrote: > Are there any plans to extend Ocamlyacc to allow state variables, > in a manner similar to the recent extensions to Ocamllex to > allow them? > > At present, there are two workarounds: Another one is to make semantic actions return functions which take the state as an argument. This is similar to introducing a new data type to represent pure concrete parse trees and then post-process these trees to produce abstract syntax. -- Alain