From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 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 3BA93BC6E for ; Wed, 28 Mar 2007 12:25:05 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2SAP4hV031813 for ; Wed, 28 Mar 2007 12:25:05 +0200 Received: by ug-out-1314.google.com with SMTP id k3so187844ugf for ; Wed, 28 Mar 2007 03:25:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=o8cDfNks+ZyUXeH8ausEl9a4xFi33wQ8/at1DRDHrYifGzuv2DZzqO6V74LbrUMUVqPw2kGOaoZlZobdC+EAfuJL/LnVQMCG/shEctJwzP2J77x1JSOjGNFbu8DBMp27mx4HmvnBlbj9ZU2OoDfsikK7CRJIsV6OWqCWsWf7frM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=XdYOybzbPHxlo3qKsVnkwSk/mMaMxii1dQ6YIIS9wLGUne0krFCYGCNYu66gNFg/HTHSV67KsoGgxFE73opDYhWA9yyymNUQZxtiYJupX9HbnIGmqHS3fIs8IPbhoL8goQth1f6CBcYvditEXsElaPoUefl7DC0c+MBxHqbeUoQ= Received: by 10.67.15.15 with SMTP id s15mr313651ugi.1175077504688; Wed, 28 Mar 2007 03:25:04 -0700 (PDT) Received: from ?192.168.1.34? ( [88.7.141.133]) by mx.google.com with ESMTP id e23sm744950ugd.2007.03.28.03.25.03; Wed, 28 Mar 2007 03:25:03 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <7DC28F6C-1A47-4F3C-86C7-1B1BA76BE487@gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Caml List From: Joel Reymont Subject: Passing arguments to a parser generated by ocamlyacc Date: Wed, 28 Mar 2007 11:25:00 +0100 X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 460A4280.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 460A4280.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; parser:01 ocamlyacc:01 parser:01 ocamlyacc:01 ocamllex:01 symtab:01 symtab:01 workarounds:01 mutable:01 overwritten:01 passing:04 generated:05 generated:05 table:93 table:93 Folks, I need to pass a symbol table to the parser generated by ocamlyacc. I can do this fine with ocamllex and thought I could do the following for ocamlyacc: %start program %type Easy.program> program It doesn't work, unfortunately. Are there any workarounds? My parser is supposed to be used as a C library. I have a hunch that when there are several calls to the parser the single mutable symbol table I'm using now will be overwritten, thus the need to pass one in. Thanks, Joel -- http://wagerlabs.com/