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

Michael G Schwern <schwern@pobox.com> Wed, 30 June 2010 09:07 UTC

Return-Path: <schwern@gmail.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 CBD403A6971 for <tap@core3.amsl.com>; Wed, 30 Jun 2010 02:07:39 -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 j-KPPlS35V79 for <tap@core3.amsl.com>; Wed, 30 Jun 2010 02:07:38 -0700 (PDT)
Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by core3.amsl.com (Postfix) with ESMTP id 691333A68B2 for <tap@ietf.org>; Wed, 30 Jun 2010 02:07:38 -0700 (PDT)
Received: by pwj2 with SMTP id 2so237097pwj.31 for <tap@ietf.org>; Wed, 30 Jun 2010 02:07:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=4cc8YJJ4DFYhUxOIXa0f5zTDA/YMx1KZW6ygiopLrEM=; b=stWOwJqVEICr5AiWeweYxAaIPDw7ymjBsSVkdrNB1v67PC5sAOxhLyx8UhCDs7HN9u w4dSxeNrTZFVCl6pJx/DkFdzvY5Xpn+f9WCmfjK+mvhg3KG0ugNI5N73m5MwkmG3HPHx maReXnP5SVAfwc3bxHrsZjkmRMenNuAeqpMfQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=EK/80cbRpV0BfoxC2230bIs2RGI+7IN3Mj1rnDYSpLLUhASTUmKXwiRysjuC4fypRP UrixLnODz05rhj6Q3jGAPrkRimVUZCm52YbnaGDl2vI6Q4o23ThsuWwdhVkQJ13y5wuu pAgrxgY2MBujnZhrnNN19x/wQppi6f9TDpo7c=
Received: by 10.143.21.19 with SMTP id y19mr9698572wfi.259.1277888865504; Wed, 30 Jun 2010 02:07:45 -0700 (PDT)
Received: from windhund.local (stewarts.dreamhost.com [208.113.160.25]) by mx.google.com with ESMTPS id w8sm3782296wfd.7.2010.06.30.02.07.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 30 Jun 2010 02:07:44 -0700 (PDT)
Sender: Michael G Schwern <schwern@gmail.com>
Message-ID: <4C2B095C.6090708@pobox.com>
Date: Wed, 30 Jun 2010 02:07:40 -0700
From: Michael G Schwern <schwern@pobox.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5
MIME-Version: 1.0
To: tap@ietf.org
References: <201006280307.48931.andrew@cleverdomain.org>
In-Reply-To: <201006280307.48931.andrew@cleverdomain.org>
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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
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: Wed, 30 Jun 2010 09:46:02 -0000

On 2010.6.28 1:07 AM, Andrew Rodland wrote:
> 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.

Awesome!  I've done some work on it by adding minimal specification tests so
you can write tests as TAP and how its to be interpreted.

There were a pile of these written in Oslo and I always forget where they
wound up.  Anyone remember?


> Current TODOs for TAP::Spec::Parser:
> * Implement skipping "junk" lines.
> * (Optionally?) remove the '' key (which stores the entire matched text) from 
>   result hashes.

I'd keep it in.  Its handy for debugging.  Make it a less cryptic name.
"raw_text" maybe.


> Draft grammar issues identified so far:
> * The Description rule doesn't make any mention of the optional "-" SP at the
>   beginning of the description (discussed with Schwern).
> * Plan-Todo looks like it should have SP before "todo".

Please edit the draft as you find issues with the grammar.


-- 
94. Crucifixes do not ward off officers, and I should not test that.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/