Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Michel Levy <Michel.Levy@imag.fr>
To: caml-list@inria.fr
Subject: analysis of expression
Date: Mon, 13 Nov 2000 18:21:18 +0100	[thread overview]
Message-ID: <3A10230E.F4EFBBEE@imag.fr> (raw)

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



             reply	other threads:[~2000-11-14 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-13 17:21 Michel Levy [this message]
2000-11-17 17:11 ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A10230E.F4EFBBEE@imag.fr \
    --to=michel.levy@imag.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox