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.8 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 72F74BBC4 for ; Fri, 17 Apr 2009 20:24:34 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AksDAKhl6EnRVdykimdsb2JhbACVej8BAQEKCQwHDwWoIYEJkAUBAwEDg3oG X-IronPort-AV: E=Sophos;i="4.40,205,1238968800"; d="scan'208,223";a="26419726" Received: from mail-fx0-f164.google.com ([209.85.220.164]) by mail3-smtp-sop.national.inria.fr with ESMTP; 17 Apr 2009 20:24:34 +0200 Received: by fxm8 with SMTP id 8so1174518fxm.27 for ; Fri, 17 Apr 2009 11:24:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=VC43nzQPxirwj+mF++7a5aI+TMCQmU8BSsiitqqL4U4=; b=FnXaBQhLMFBw8PWEgDWRYeaDxZUzD88cDjELG1KhyEv30AJzg6fPWgXlZnGERuER6T Q8YfrE99OtKwshaSgFsheu9smZPAW+j+uIAp2VVd1pBSamMWhGL4k6AXAVRphK0Y2HiR hJwtS259EUOgBsm4OTOOMBB3A6eLgHy3WpUfU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=Qv8Kid057+y9dAloaYUbA50hQBSOTU97FM8NlxpeT5mm8hfV7CTGg/mpGj5o9hvWct V6Tel+6TytQfeLeGuMXvueHzvuvdoDDzZQ970znDBNqdi2HLPVzHkzCf97yYoLp7Kugi ZvUwv0OJIlP6BauKuq5kjWAmGGU94JtChNzfE= Received: by 10.86.60.15 with SMTP id i15mr2231573fga.5.1239992673990; Fri, 17 Apr 2009 11:24:33 -0700 (PDT) Received: from ?10.10.30.15? (228.Red-83-33-96.dynamicIP.rima-tde.net [83.33.96.228]) by mx.google.com with ESMTPS id e20sm1303492fga.29.2009.04.17.11.24.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 17 Apr 2009 11:24:33 -0700 (PDT) Message-Id: From: Joel Reymont To: O'Caml Mailing List Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: quasiquoting: 3 parsers for camlp4 vs 1 for haskell? Date: Fri, 17 Apr 2009 19:24:31 +0100 X-Mailer: Apple Mail (2.930.3) X-Spam: no; 0.00; parsers:01 camlp:01 haskell:01 camlp:01 parser:01 syntax:01 ocaml:01 parsers:01 syntax:01 mainland:98 mainland:98 reuse:01 hacker:02 parse:02 eecs:03 From the quasiquoting paper by Geoffrey Mainland [1], page 7: "The major advantage of our approach over that of camlp4 is that we demonstrate how to use generic programming to reuse a single parser to parse quasiquoted patterns, quasiquoted expressions and plain syntax that does not include antiquotes. Because OCaml does not support generic programming out of the box, in camlp4 this would require three separate parsers, each generating different representations of the same concrete syntax." Can someone shed light on how, where and why three different parsers are required for camlp4? Is this still the case with 3.11? Thanks, Joel [1] http://www.eecs.harvard.edu/~mainland/ghc-quasiquoting/ --- Mac hacker with a performance bent http://linkedin.com/in/joelreymont