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=3.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, DNS_FROM_SECURITYSAGE,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 E0439BBAF for ; Sat, 25 Oct 2008 00:27:11 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnAAABzoAUnRVcbkkGdsb2JhbACTOj4BAQEBCQkMBxEDpS59hzoBAwEDg00 X-IronPort-AV: E=Sophos;i="4.33,481,1220220000"; d="scan'208";a="18485802" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 25 Oct 2008 00:27:11 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m9OMRAco009456 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 25 Oct 2008 00:27:11 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnAAABzoAUnRVcbkkGdsb2JhbACTOj4BAQEBCQkMBxEDpS59hzoBAwEDg00 X-IronPort-AV: E=Sophos;i="4.33,481,1220220000"; d="scan'208";a="18485801" Received: from rv-out-0506.google.com ([209.85.198.228]) by mail3-smtp-sop.national.inria.fr with ESMTP; 25 Oct 2008 00:27:09 +0200 Received: by rv-out-0506.google.com with SMTP id k40so1856870rvb.57 for ; Fri, 24 Oct 2008 15:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=w2uPHN1YI0sl3WqQWjLXHbgsWUqKYY4maBckpHQrXjc=; b=R3U0rH2iVKpRhFfNZQQqXaHd+P6xnBxCoVrkn4pxnFdzOiJvQ/MpSkEHhAyHnWogg1 XE/GS5pDXdKcYvAPm4s+qyz+c17CKIiKoXOAetzuLsX3fNp3E1h/DPLTmAVBdE745/H6 WcS//gz7OqWMD2Tlee1cKoXQZFYrAOClp6Pmg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=KZpRcb4njrqeP/wUbSjfLPYD7S5wWRESE0qmo2voUL/M+eD6cMUDe7L6Gq5zkKoufm h3BxtkxdGSxAPMii82KVXq4g90A//WX8JPyzo95wgpsCXo0CtMG1gz8mALXSBpo8qGoB h0Pm7nWzMyRRZkmeUNC/r8W8CtiLCnScblIBY= Received: by 10.141.84.17 with SMTP id m17mr1520630rvl.48.1224887228677; Fri, 24 Oct 2008 15:27:08 -0700 (PDT) Received: by 10.141.41.10 with HTTP; Fri, 24 Oct 2008 15:27:08 -0700 (PDT) Message-ID: Date: Sat, 25 Oct 2008 00:27:08 +0200 From: "=?UTF-8?Q?Mikkel_Fahn=C3=B8e_J=C3=B8rgensen?=" To: caml-list@inria.fr Subject: Re: [Caml-list] Re: Serialisation of PXP DTDs In-Reply-To: <20081024213917.GF32611@NANA.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081023210527.GB32611@NANA.localdomain> <278256.11946.qm@web54605.mail.re2.yahoo.com> <20081023233657.GE32611@NANA.localdomain> <20081024213917.GF32611@NANA.localdomain> X-Miltered: at discorde with ID 49024BBE.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; mikkel:01 rgensen:01 pxp:01 dtds:01 complang:01 parser:01 ocaml:01 ocaml:01 mikkel:01 wrote:01 stack:01 rewrite:01 caml-list:01 expressions:04 compiled:04 > serialization too. My protocol family is both substantially simpler and better > adapted for extensibility. For example, the generic pretty-printer (able to > decode any message) takes ~40 lines of code. > I see - somehow it reminds me of stackish - kind of S expressions backwards I guess - apparently with good performance, but also tag'ed I reckon. http://www.zedshaw.com/essays/stackish_xml_alternative.html More specifically regarding DTD's: Since I have been playing around with Ragel: http://www.complang.org/ragel/ I was also wondering about converting DTD's to state-machines with a stack, then feed them to a Ragel input file and have Ragel produce a table that can be run by a small interpreter. I did something similar for an XML parser as a kind of DTD replacement, although I manually wrote the state-machines and compiled to C, not a table. For OCaml you would link in the C interpreter, or rewrite it in OCaml. Mikkel