From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 36906BB83 for ; Fri, 21 Jul 2006 02:30:24 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k6L0UNa3005361 for ; Fri, 21 Jul 2006 02:30:23 +0200 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 CAA11851 for ; Fri, 21 Jul 2006 02:30:22 +0200 (MET DST) Received: from ash25e.internode.on.net (ash25e.internode.on.net [203.16.214.182]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k6L0UK9t005505; Fri, 21 Jul 2006 02:30:21 +0200 Received: from rosella (ppp44-64.lns2.syd6.internode.on.net [59.167.44.64]) by ash25e.internode.on.net (8.13.6/8.13.5) with ESMTP id k6L0TnjX073674; Fri, 21 Jul 2006 09:59:49 +0930 (CST) (envelope-from skaller@users.sourceforge.net) Subject: Re: Camlp4 mysteries (was Re: On language extensions (was Re: [Caml-list] global record)) From: skaller To: Alain Frisch Cc: Martin Jambon , Eric Breck , =?ISO-8859-1?Q?B=FCnzli?= Daniel , caml-list@inria.fr In-Reply-To: <44C013EC.2080201@inria.fr> References: <51E3580C-02A1-4344-A5AA-862B580015F1@cs.cornell.edu> <60FD7628-7F4E-4765-88AD-B3AB7DA987D0@epfl.ch> <44C013EC.2080201@inria.fr> Content-Type: text/plain Date: Fri, 21 Jul 2006 10:29:48 +1000 Message-Id: <1153441788.20265.35.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 44C0201F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44C0201C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; camlp:01 frisch:01 syntax:01 syntax:01 syntactical:01 ocaml:01 2006:98 wrote:01 wrote:01 sourceforge:01 caml-list:01 define:01 jambon:01 construct:02 alain:03 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 Fri, 2006-07-21 at 01:38 +0200, Alain Frisch wrote: > Martin Jambon wrote: > > Otherwise it's possible to define well-disciplined syntax extensions. > > For example, if each new syntax construct (new rule) is forced to start > > with a unique, registered keyword and end with "end", then different > > syntax extensions that follow this rule should play well together. > > Except that any new keyword can potentially break existing code. You'd > need some other syntactical convention. If you follow the rules I specified, this is not possible. My rule is: extensions must be enabled in every file that use them: #syntax extension_name Then the extension only affects files deliberately written using the extension, so there won't be any code breakage unless the extension itself is upgraded, or, ocaml itself is upgraded. -- John Skaller Felix, successor to C++: http://felix.sf.net