From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA21219; Thu, 1 Nov 2001 11:01:45 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA22210 for ; Thu, 1 Nov 2001 11:01:44 +0100 (MET) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fA1A1hT28433 for ; Thu, 1 Nov 2001 11:01:43 +0100 (MET) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id LAA28889 for caml-list@inria.fr; Thu, 1 Nov 2001 11:01:43 +0100 Date: Thu, 1 Nov 2001 11:01:43 +0100 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] raise extra arg ignored Message-ID: <20011101110143.A24716@verdot.inria.fr> References: <200110302129.WAA29040@pauillac.inria.fr> <200110302217.f9UMHbF07299@sarg.ryerson.ca> <20011031185708.U17285@verdot.inria.fr> <878zdr39u6.dlv@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <878zdr39u6.dlv@wanadoo.fr>; from vanicat@labri.u-bordeaux.fr on Wed, Oct 31, 2001 at 08:09:37PM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Wed, Oct 31, 2001 at 08:09:37PM +0100, Remi VANICAT wrote: > Even if we change the priority of the application of raise ? It works indeed. I was sure that it would not but I tested and there is indeed a syntax error at "raise Foo 3". It works, not because of priorities, but because the application is defined as a list of simple expressions. If the construction "raise" is defined as expression (not "simple"), it cannot be used in an application. --- I am a little bit surprised, because yacc sometimes bypass priorities to avoid syntax errors: for example "comma" as more priority than "as": x, y as z means (x, y) as z but: function x, y as z, t -> x is however accepted, althought it should be a syntax error at the comma after "z". This makes me wonder about camlp4, because to resolve this problem of "comma" and "as", I added a rule to "try again" the continuation of a grammar entry when a syntax error about priorities happens. And because of that, I cannot prevent "raise Foo 3" to be accepted in camlp4o. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr