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 UAA23112; Tue, 28 May 2002 20:16:27 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA22971 for ; Tue, 28 May 2002 20:16:24 +0200 (MET DST) Received: from cs.bu.edu (cs.bu.edu [128.197.12.2]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g4SIGNT08773 for ; Tue, 28 May 2002 20:16:23 +0200 (MET DST) Received: from csa.bu.edu (zhudp@csa [128.197.12.3]) by cs.bu.edu (8.12.2/8.12.2) with ESMTP id g4SIGGF2029084; Tue, 28 May 2002 14:16:16 -0400 (EDT) Received: from localhost (zhudp@localhost) by csa.bu.edu (8.10.1/8.10.1) with ESMTP id g4SIGCD09641; Tue, 28 May 2002 14:16:12 -0400 (EDT) X-Authentication-Warning: csa.bu.edu: zhudp owned process doing -bs Date: Tue, 28 May 2002 14:16:12 -0400 (EDT) From: dengping zhu X-Sender: zhudp@csa.bu.edu To: John Prevost cc: Ocaml Subject: Re: [Caml-list] infix precedence In-Reply-To: <86g00cf8ok.fsf@laurelin.dementia.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, John, thanks for your help. Hope I could solve it today. Anyway, I think that Ocaml should support infix as SML. Dengping On 28 May 2002, John Prevost wrote: >>>>>> "zd" == dengping zhu writes: > > zd> I want to convert these code into ocaml. How can find so many > zd> different 'first characters'? Because the available characters > zd> in ocaml are: > > zd> **... right *... /... %... left +... -... left @... ^... > zd> right > > zd> Do you have any sugestion? > >Take a look at section 6.7 of the manual for precedence rules, and >section 6.1 (under the heading "Prefix and infix symbols") for the >list of symbols. In short, this is the list of all the available >infix symbols, in order of precedence: > >!... ?... ~... prefix >**... right >*... /... %... left >+... -... left >@... ^... right >=... <... >... |... &... $... %... left > >This means that you might have some trouble with your infix levels, >but there are normally ways to organize things for what you'd like. I >find, also, that having just a few levels and using parenthesis for >the rest of the time can work quite well. As you note, using this >style for everything can be painful, but having infixes for only a few >specific things can help immensely. > >John. > >------------------- >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 > ------------------- 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