Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2001-11-01 (10:01)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] raise extra arg ignored

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


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
        (x, y) as z
        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

Bug reports:  FAQ:
To unsubscribe, mail  Archives: