From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 47061BC88 for ; Sun, 6 Feb 2005 02:26:02 +0100 (CET) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id j161Q1Es022644 for ; Sun, 6 Feb 2005 02:26:02 +0100 Received: (qmail invoked by alias); 06 Feb 2005 01:26:01 -0000 Received: from J2246.j.pppool.de (EHLO [192.168.2.10]) (85.74.34.70) by mail.gmx.net (mp022) with SMTP; 06 Feb 2005 02:26:01 +0100 X-Authenticated: #20477425 From: Micha To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocamlyacc questions Date: Sun, 6 Feb 2005 02:26:10 +0100 User-Agent: KMail/1.7 References: <20050206022456.GA5170@wcug.wwu.edu> In-Reply-To: <20050206022456.GA5170@wcug.wwu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502060226.10577.micha-1@fantasymail.de> X-Y-GMX-Trusted: 0 X-Miltered: at nez-perce with ID 42057229.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlyacc:01 ocamlyacc:01 token:01 prg:01 prg:01 conflicts:01 syntax:01 ...:98 program':98 program':98 ...:98 int:01 ident:02 ident:02 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: Am Sonntag, 6. Februar 2005 03:24 schrieb cjohnson@wcug.wwu.edu: > 1. The action {} after the first identifier causes an error. Does > ocamlyacc not support actions before the last token? no, as far as I know, not > How would I work > around this? declare extra nonterminals such as: program: PROGRAM prg_ident IDENTIFIER PERIOD {}; prg_ident: IDENTIFIER {} but you can get conflicts... > 2. When the action from #1 is removed, I get an error message, > "no type has been declared for the start symbol" > but changing '%start program' to '%start program' where type > is int, unit, etc. causes a syntax error. Any ideas? yes, it should be: %start program %type program the type is declared extra (as the docu says... :-) Micha