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.0 required=5.0 tests=AWL,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 discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 7A449BC0A for ; Fri, 18 May 2007 09:41:30 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4I7fUci000440 for ; Fri, 18 May 2007 09:41:30 +0200 Received: by ug-out-1314.google.com with SMTP id k3so400342ugf for ; Fri, 18 May 2007 00:41:30 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=fp4lBkUrXNrAbYMp5myjo3+/v1Ejp9f09Gi9CQ2CJoFfbMipjdFmhdHXQTbZJurs8Idtbw7QHk7hgOFLLw9WvvCMBKTPpeqx0V7prUTn3bHdMxwxjMBpbbTJlxA/rGhwPWFjIU8jWnBRHC56Q+pN3i8TdfMmwjbz/5SgDp1LUJA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=C986g6rkgTEoO1T8uMgDjpuaheZYVln/K8+El1+8Fb1gbWoIpmPdwo0kPYC6/RDvtzg/v+xo2mye7ns3pYkgQ6egOOdAZGbaMzyXYsIic1EKOGkmnJy4MJxQ7jLAfuxeUH3VqJrouQDzLNukOBO2ldL/v72JWgrNHOZiLmbBxpY= Received: by 10.67.90.19 with SMTP id s19mr850712ugl.1179474089214; Fri, 18 May 2007 00:41:29 -0700 (PDT) Received: from ?192.168.1.100? ( [84.58.216.55]) by mx.google.com with ESMTP id m1sm1812115uge.2007.05.18.00.41.27; Fri, 18 May 2007 00:41:28 -0700 (PDT) In-Reply-To: <20070517212157.GA20085@furbychan.cocan.org> References: <20070517212157.GA20085@furbychan.cocan.org> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Caml List Content-Transfer-Encoding: 7bit From: Christian Lindig Subject: Re: [Caml-list] DSL for handling parsing binary memory structures? Date: Fri, 18 May 2007 09:41:07 +0200 To: Richard Jones X-Mailer: Apple Mail (2.752.3) Sender: Christian Lindig X-j-chkmail-Score: MSGID : 464D58AA.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 464D58AA.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lindig:01 lindig:01 parsing:01 parsing:01 ad-hoc:01 ocaml:01 icfp:01 popl:01 algebra:01 c--:01 compiler:01 ocaml:01 caml-list:01 binary:01 conventions:02 If you are interested in the research aspect of this, Kathleen Fisher did interesting work on parsing ad-hoc data (mostly ascii): http://www.research.att.com/~kfisher/hancock/release.php http://www.research.att.com/~kfisher/hancock/release.php I remember to have seen something like this for OCaml in the recent proceedings of ICFP or POPL but can't remember right now. My own work in the context of calling conventions proposes an algebra to describe structures in memory. This could be a starting point for a DSL; it is also implemented in the Quick C-- compiler (in OCaml) in module block.nw. http://www.st.cs.uni-sb.de/~lindig/papers/blocks/next.pdf http://www.cminusminus.org/rsync/qc--/src/block.nw -- Christian