Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] raise extra arg ignored
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] raise extra arg ignored
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