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 KAA28093; Fri, 19 Jul 2002 10:33:14 +0200 (MET DST) 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 KAA28089 for ; Fri, 19 Jul 2002 10:33:13 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6J8XC101531 for ; Fri, 19 Jul 2002 10:33:12 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id KAA30367 for caml-list@inria.fr; Fri, 19 Jul 2002 10:33:12 +0200 Date: Fri, 19 Jul 2002 10:33:12 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] syntax question -- end of pattern-matching Message-ID: <20020719103312.D29845@verdot.inria.fr> References: <200207181927.PAA18741@psi-phi.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200207181927.PAA18741@psi-phi.mit.edu>; from jfc@MIT.EDU on Thu, Jul 18, 2002 at 03:27:16PM -0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Thu, Jul 18, 2002 at 03:27:16PM -0400, John Carr wrote: > let f x = try x + 1 with Invalid_argument _ -> 42 ; ; "hello" > is parsed as > let f x = (try x + 1 with Invalid_argument _ -> 42;) ; "hello" IMHO, this behaviour has not been planed: the yacc version (OCamlyacc) seems to work like that, but the Camlp4 version (camlp4o) interprets it the other way (as if there were only one semicolon). I think that you should not use this feature and rather use parentheses or the begin..end construction. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners