Re: [tap] ANNOUNCE: TAP::Spec::Parser - a TAP parser based on the draft grammar

Ovid <publiustemp-tapx@yahoo.com> Mon, 28 June 2010 11:49 UTC

Return-Path: <publiustemp-tapx@yahoo.com>
X-Original-To: tap@core3.amsl.com
Delivered-To: tap@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id EF44B3A6782 for <tap@core3.amsl.com>; Mon, 28 Jun 2010 04:49:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Level:
X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[BAYES_50=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y63C17W9CUOa for <tap@core3.amsl.com>; Mon, 28 Jun 2010 04:49:28 -0700 (PDT)
Received: from n11.bullet.mail.ac4.yahoo.com (n11.bullet.mail.ac4.yahoo.com [74.6.228.83]) by core3.amsl.com (Postfix) with SMTP id 9592E3A67FC for <tap@ietf.org>; Mon, 28 Jun 2010 04:49:28 -0700 (PDT)
Received: from [76.13.12.65] by n11.bullet.mail.ac4.yahoo.com with NNFMP; 28 Jun 2010 11:49:35 -0000
Received: from [76.13.10.170] by t6.bullet.mail.ac4.yahoo.com with NNFMP; 28 Jun 2010 11:49:35 -0000
Received: from [127.0.0.1] by omp111.mail.ac4.yahoo.com with NNFMP; 28 Jun 2010 11:49:35 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 906093.41481.bm@omp111.mail.ac4.yahoo.com
Received: (qmail 84966 invoked by uid 60001); 28 Jun 2010 11:49:35 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1277725775; bh=h9FfKTkppzMHx6if6qSikMdpN9DKnR32LByUpi1TfUQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=C0lofrB2Mmj7/f4yuDydYTyrnhBRtlwMHoD+ekLLsBoTvgzGVyGQpFPNlyv0PiPTC6KXGXAr+LQHF2f2VOR08fCN+92/qokYag9RJIdPUb1Wa/PNU0elTJbbHR/au0onUYBsoaVpui5jXgr10Yr2hdA+ctbM83IDFO8KV82gp88=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=I09ol4WvR6OJg5lAJsDvWfp1eZkZBooZ1rU7Wwoqe1MfFvp3yCdAm/lQAwSWRURT1E9nMT0Oh/jt4p2wrr/ecCgzYq00qSgDD2Gjh+7o0XgehiExaAFOt/OpvExup39SwJH9HJwbt/kJPILXfxcC+XUqucRJ/d8VMY64fPQacAs=;
Message-ID: <710976.83200.qm@web65716.mail.ac4.yahoo.com>
X-YMail-OSG: xfxfgKYVM1kggQnQ7WXEMQQLlyuAtMQEDVdiDv_CYlgcRI7 F59ZImoNLsHOTyJ9G9WmQPo03P1SdnbWIhcg8z54ljPWDU2NhSAC3leGB2bD lp_LvZMAfEpwvwoZh5OAmOJ9fro8ZAxWCMyrZ.Mr2vu6pbyj.JRSYudaBLJn 4p3QcOwuInnLPAyKCV2D.gcx8coTNzvDERGfgOR6LfLYuBh8sUCjdS7__FeX OHg1YtDN2zaBf9s5YLkbY3tm0F7ElbCsIFHYzdl0nLI5ErHQVe8pVUi6K37N 0kc6lM1CcZZ6pxqbV5yiz_7xUcOw0rW1oOLBFql8l9VFa6Cq6OkDU4aE0_Ys s
Received: from [10.161.48.249] by web65716.mail.ac4.yahoo.com via HTTP; Mon, 28 Jun 2010 04:49:35 PDT
X-Mailer: YahooMailClassic/11.1.4 YahooMailWebService/0.8.104.274457
Date: Mon, 28 Jun 2010 04:49:35 -0700
From: Ovid <publiustemp-tapx@yahoo.com>
To: tap@ietf.org, Andrew Rodland <andrew@cleverdomain.org>
In-Reply-To: <201006280307.48931.andrew@cleverdomain.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Subject: Re: [tap] ANNOUNCE: TAP::Spec::Parser - a TAP parser based on the draft grammar
X-BeenThere: tap@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: publiustemp-tapx@yahoo.com
List-Id: Test Anything Protocol WG discussions <tap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tap>, <mailto:tap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tap>
List-Post: <mailto:tap@ietf.org>
List-Help: <mailto:tap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tap>, <mailto:tap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 28 Jun 2010 11:49:30 -0000

--- On Mon, 28/6/10, Andrew Rodland <andrew@cleverdomain.org> wrote:

> From: Andrew Rodland <andrew@cleverdomain.org>

> Per Schwern's request at YAPC, I've written a parser based
> on the grammar in 
> the IETF draft standard 
> <http://testanything.org/wiki/index.php/TAP_at_IETF:_Draft_Standard>
> to help 
> make sure that it's correct and well-exercised. The code is
> at 
> http://github.com/arodland/TAP-Spec-Parser and it's
> currently in a working 
> alpha state. It uses a Regexp::Grammars grammar, with the
> relevant portions of 
> the spec grammar interleaved in comments.

I haven't looked at this too closely, but one thing you might want to consider it that TAP is stream-oriented, not document-oriented.  When I wrote the parser for new the Test::Harness, I was going to use a full lexer/grammar solution, only to realize that the nature of a stream means I wouldn't have the full document up front.  This is a deliberate design feature of TAP to allow results to be output as they occur, rather than waiting for the end of the test run (such as requiring a full XML document requires).

Does Regexp::Grammars allow you to handle that case? I didn't think so, but I could be mistaken.

Cheers,
Ovid
--
Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://blogs.perl.org/users/ovid/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6