From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 89BDCBDCE for ; Tue, 23 Aug 2005 12:16:36 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j7NAGaIR013603 for ; Tue, 23 Aug 2005 12:16:36 +0200 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 MAA11560 for ; Tue, 23 Aug 2005 12:16:35 +0200 (MET DST) Received: from [IPv6:::1] (yquem.inria.fr [128.93.8.37]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j7NAGShF020158; Tue, 23 Aug 2005 12:16:28 +0200 In-Reply-To: <4309F579.4020302@mcmaster.ca> References: <4309F579.4020302@mcmaster.ca> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3C37507F-C2C9-4E75-AC82-0CF742D87A18@inria.fr> Cc: caml-list@inria.fr Content-Transfer-Encoding: 7bit From: Damien Doligez Subject: Re: [Caml-list] Syntax vs Operators Date: Tue, 23 Aug 2005 12:16:28 +0200 To: Jacques Carette X-Mailer: Apple Mail (2.733) X-Miltered: at concorde with ID 430AF784.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 430AF77C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 syntax:01 ocaml:01 pervasives:01 lexer:01 infix:01 syntax:01 overriding:01 2005,:98 wrote:01 doligez:01 doligez:01 syntactic:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Aug 22, 2005, at 17:55, Jacques Carette wrote: > I have been going through the documentation, trying to figure out > which constructs in Ocaml are syntactic (like :: seems to be) and > cannot be oer-ridden, and others like + which are values in > Pervasives. Is there a simple way to find out which language > constructs are purely syntactic? You should look a the lexer documentation: < http://caml.inria.fr/pub/docs/manual-ocaml/manual009.html >, in the section titled "Prefix and Infix Symbols", you will get the syntax of all the user-definable symbols. Some of them are predefined, but you are guaranteed to be able to override them. You should avoid overriding the ones that are listed as keywords (in the next section), even if some of them are actually redefinable in the current implementations. -- Damien