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

Andrew Rodland <andrew@cleverdomain.org> Mon, 28 June 2010 08:07 UTC

Return-Path: <andrew@cleverdomain.org>
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 035E43A67E3 for <tap@core3.amsl.com>; Mon, 28 Jun 2010 01:07:42 -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 Duaj28NZdbRn for <tap@core3.amsl.com>; Mon, 28 Jun 2010 01:07:40 -0700 (PDT)
Received: from sasl.smtp.pobox.com (b-pb-sasl-quonix.pobox.com [208.72.237.35]) by core3.amsl.com (Postfix) with ESMTP id BBEDA3A659C for <tap@ietf.org>; Mon, 28 Jun 2010 01:07:40 -0700 (PDT)
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 1567AB2DA7 for <tap@ietf.org>; Mon, 28 Jun 2010 04:07:50 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=to:subject :from:date:mime-version:content-type:content-transfer-encoding :message-id; s=sasl; bh=z0Jq5s8Gsxx+mFefDw7D9BQsWV0=; b=VpfYk2LL 7ndGCOGPK+y7D8S7M4ieesMTV599UAUY2GY+NCeeh/I0im5U03KZYYQZlAyZbEV9 nTeeKr9rtHZj5qzh2pTkdkYvwZQiDbYm2qNGnVJaffjE6mqBbtop1G/pJ2zZg/3X x8uRNnWmxm7PuDJsKea7Kztzz1lGyWR4w8A=
Received: from b-pb-sasl-quonix. (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 11619B2DA6 for <tap@ietf.org>; Mon, 28 Jun 2010 04:07:50 -0400 (EDT)
Received: from goron.localnet (unknown [98.228.25.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by b-sasl-quonix.pobox.com (Postfix) with ESMTPSA id DEA82B2DA5 for <tap@ietf.org>; Mon, 28 Jun 2010 04:07:49 -0400 (EDT)
To: tap@ietf.org
From: Andrew Rodland <andrew@cleverdomain.org>
Date: Mon, 28 Jun 2010 03:07:48 -0500
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201006280307.48931.andrew@cleverdomain.org>
X-Pobox-Relay-ID: 3E8696F0-828C-11DF-AC67-2AC9016DD5F0-16769786!b-pb-sasl-quonix.pobox.com
Subject: [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: Mon, 28 Jun 2010 08:17:01 -0000

(Reposted here from tap-l, which was apparently the wrong list)

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.

Current TODOs for TAP::Spec::Parser:
* Implement skipping "junk" lines.
* (Optionally?) remove the '' key (which stores the entire matched text) from 
  result hashes.
* Convince Regexp::Grammars to call object constructors instead of just
  blessing hashes (to play better with Moose)
* Investigate segfaults in global destruction after parsing.

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".

Andrew