[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2000-11-14 (14:17) |
From: | Michel Levy <Michel.Levy@i...> |
Subject: | analysis of expression |
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