From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA18037 for caml-red; Tue, 14 Nov 2000 15:17:45 +0100 (MET) 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 SAA31694 for ; Mon, 13 Nov 2000 18:23:36 +0100 (MET) Received: from imag.imag.fr (imag.imag.fr [129.88.30.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id eADHNZr14096 for ; Mon, 13 Nov 2000 18:23:35 +0100 (MET) Received: from imag.fr (skolem.imag.fr [129.88.38.191]) by imag.imag.fr (8.9.3/8.8.6) with ESMTP id SAA18689 for ; Mon, 13 Nov 2000 18:23:30 +0100 (MET) Message-ID: <3A10230E.F4EFBBEE@imag.fr> Date: Mon, 13 Nov 2000 18:21:18 +0100 From: Michel Levy Organization: LSR X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.16-3 i686) X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: analysis of expression Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: weis@pauillac.inria.fr Dans la définition de expr, on trouve : expr := expr expr | expr infix-op expr Aussi la phrase "let x = 1 in x-1" peut-être analysée de 2 manières 1) La manière correcte (celle de Ocaml) : - est une opération infixée entre x et 1 2) x est appliqué à -1 : d'où une erreur de types Où est-il indiqué dans le "manuel de référence Ocaml", la solution choisie ? In definition of expr I read : expr := expr expr | expr infix-op expr with that syntax its possible to have two analysis of the sentence "let x = 1 in x-1" ? 1) The correct analysis (the Ocaml anlysis) : - is an operation between x et 1 2) x is applied to -1 and we find a type error Where it's possible to find in the Ocaml reference the choosen solution ? Thank you -- Michel Levy D106 - L.S.R. B.P.72 - 38042 SAINT MARTIN D'HERES CEDEX - France e.mail : Michel.Levy@imag.fr tel :(33)476827246 http://www-lsr.imag.fr/Les.Personnes/Michel.Levy