From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id E9085BC69 for ; Thu, 10 May 2007 17:24:13 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.227]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4AFOCtK031789 for ; Thu, 10 May 2007 17:24:13 +0200 Received: by nz-out-0506.google.com with SMTP id l8so660031nzf for ; Thu, 10 May 2007 08:24:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pJaIAuTLpUYYNk3TIW0XvofBj4kYIqJS+04Z2zcXSjcrb3BcQfILMUgghDnkJ3Xkcs/VvH2ntLrFEag1nm3o2zbuNNAxfHhrgjvbk6sEuD8rUelsK84acwa1kkV7yG7+WbwHArAUh8RjWGdN3D0J+9M1UocHQqMwVcXzxYbBrrs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=upsTgFw22hgB/BjiGkU4IQogPMudwbRmaUnwQbKFTdjSuMAjd/11SAPj5EN5m3LTWHzniRfGo9MPiDh3eObkI4kqbOeZjR9/6hXX3abCSRfZqebHEkv64w0VSvLXoyWMPSwID9Szu4n4Wr2biFJQFOfC82Mqa/X+piGxtnYP6NY= Received: by 10.114.137.2 with SMTP id k2mr558857wad.1178810652248; Thu, 10 May 2007 08:24:12 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Thu, 10 May 2007 08:24:11 -0700 (PDT) Message-ID: Date: Thu, 10 May 2007 17:24:11 +0200 From: "Nicolas Pouillard" To: "Chris King" Subject: Re: [Caml-list] F# lightweight syntax for Ocaml with camlp4 - possible? Cc: "Dmitry Bely" , "Caml List" In-Reply-To: <875c7e070705071536k166e06f7x94525ae68234466a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <90823c940705071526x87f78b4i74bc73b11ee9a890@mail.gmail.com> <875c7e070705071536k166e06f7x94525ae68234466a@mail.gmail.com> X-j-chkmail-Score: MSGID : 4643391C.002 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 4643391C.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 ocaml:01 camlp:01 ocaml:01 camlp:01 parsing:01 mikelin:01 lexer:01 lexer:01 wrote:01 wrote:01 token:01 dynamically:01 caml-list:01 dmitry:01 On 5/8/07, Chris King wrote: > On 5/7/07, Dmitry Bely wrote: > > Could the same idea be implemented for Ocaml with Camlp4? Can it use > > an indentation level while parsing? > > It has been... http://people.csail.mit.edu/mikelin/ocaml+twt/ > But it doesn't use camlp4 (since camlp4 can't modify the lexer to > handle tabs specially). This is somewhat different in the new version of Camlp4 even if one cannot dynamically extend the default lexer. 1/ One can now change a Camlp4 module by another, since the implementation is functorized. 2/ The default lexer now keeps all bits of the input including layout information. 3/ One can setup a custom token filter, that can handle the indentation, and then drop the layout information (The default filter drops layout information). Best regards, -- Nicolas Pouillard