Re: [tap] More uncertainty about junk lines

Ovid <curtis_ovid_poe@yahoo.com> Fri, 24 June 2011 13:20 UTC

Return-Path: <curtis_ovid_poe@yahoo.com>
X-Original-To: tap@ietfa.amsl.com
Delivered-To: tap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9768511E809B for <tap@ietfa.amsl.com>; Fri, 24 Jun 2011 06:20:38 -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.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gEBYTP8NrYGG for <tap@ietfa.amsl.com>; Fri, 24 Jun 2011 06:20:37 -0700 (PDT)
Received: from nm5-vm0.bullet.mail.ac4.yahoo.com (nm5-vm0.bullet.mail.ac4.yahoo.com [98.139.52.68]) by ietfa.amsl.com (Postfix) with SMTP id 4FA4511E8089 for <tap@ietf.org>; Fri, 24 Jun 2011 06:20:37 -0700 (PDT)
Received: from [98.139.52.189] by nm5.bullet.mail.ac4.yahoo.com with NNFMP; 24 Jun 2011 13:20:31 -0000
Received: from [98.139.52.155] by tm2.bullet.mail.ac4.yahoo.com with NNFMP; 24 Jun 2011 13:20:31 -0000
Received: from [127.0.0.1] by omp1038.mail.ac4.yahoo.com with NNFMP; 24 Jun 2011 13:20:31 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 4406.50001.bm@omp1038.mail.ac4.yahoo.com
Received: (qmail 91170 invoked by uid 60001); 24 Jun 2011 13:20:30 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1308921630; bh=da3OZXeyehwFRzZl4VmUMmcYD7p+bOX16WIDKxgBNNk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=sNS5i8yYas2/wupy38s9tu853ErH2CqNGZ8P5BvHQx/mOkkf7UvYktYnNkWJzv8fPD+bqivJwYKjTSNM5o4fmHxb4tRTRGEb73nqa4nuT421zyRQWl8+3JyJobAFSz29U/eL1lFHGe7Nbefhx1OlLr2nloV+DIf77B5sYrhNoGg=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=VM1Dx20QJwuXjJ42Yhjg+Aj6+mKKdhtOWw10wF4qbjvGnSobgJ2oHBIZrCiUko97tE/Oz0XXl95OUxgPSc7g+dt7dbJQNuBRU0fD9e1IGJjCFWwIKkeSi+lm6JNNJh7tqzISL7NI89bXP1oPxhgowL9LNh/FugQrlDlpkgpWSRg=;
Message-ID: <818669.75391.qm@web65712.mail.ac4.yahoo.com>
X-YMail-OSG: 5mpkYBcVM1kLqXpndXSmC8pXYxP_TGLMZV9.eMNh8pOEfnh wGuptuuZ0dSaqAAD9va92Zeh9_x0Y__ZZVYWdA3HWOW75VP7Sw72Ere9WUn7 NFwFIXwaY0_AyabmU9qK6ijypnaKuD2rwgVhOOdyJIKiV7ctHLTvi0ScWnsV sx4_J0rs.jkNdS6Fq7h1okihfP_AhIYt.aWzwkXWR_nucktrwEp5lEK0zLHg 4nCmXbIH7IicAZYbbe._SUXcfrW5RxxP.bcQUOn0byKpFMBhy.YJr9VvrG4G Ds8E4mHhIaM_T86H9fsNmB8jgK7aaGxrgbNKXSfjzDqZogvYNzKjzBb3fHTD QmsCw_o2FQ4vJtjLRnC3m7dctISkkwNiYA3gbFGB83E4x4o3q7O79O4oQ7ZK 4TS6olL2GCKCSqkMcfTuv_.jchzXVBuMofQ2veH2K8kDaNCeL2_0ei8NdACb 4DLUMOQexfnmr_OBTlsEjU9XAtnoceKZOPpeVLP_PiWAlnfMJxDo83nu097m mz9bSZ1Q5Vc0EmPMc4VzEAE6K_tdEqUJHZ6OVidaAKqmijl4fYWeqvayvHX3 tnKIBjS2wph52Cs_y8YS9zTc0bATaWjGGKA0H513od2I4S4a9V8VgBeZr0t3 TZpPGM2vamtnxx4CdDAbb5Dp26z0JLTVtzieFCcL0fFJ2hItXG7iwxtMM
Received: from [62.190.51.12] by web65712.mail.ac4.yahoo.com via HTTP; Fri, 24 Jun 2011 06:20:30 PDT
X-Mailer: YahooMailWebService/0.8.111.304355
References: <BANLkTimKuaF3g_40Bvgs09Pvdj5_7FZ3BQ@mail.gmail.com>
Date: Fri, 24 Jun 2011 06:20:30 -0700 (PDT)
From: Ovid <curtis_ovid_poe@yahoo.com>
To: Andrew Rodland <andrew@cleverdomain.org>, "tap-l@testanything.org" <tap-l@testanything.org>, "tap@ietf.org" <tap@ietf.org>
In-Reply-To: <BANLkTimKuaF3g_40Bvgs09Pvdj5_7FZ3BQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Mailman-Approved-At: Fri, 24 Jun 2011 10:29:51 -0700
Subject: Re: [tap] More uncertainty about junk lines
X-BeenThere: tap@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: Ovid <curtis_ovid_poe@yahoo.com>
List-Id: Test Anything Protocol WG discussions <tap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Fri, 24 Jun 2011 13:20:38 -0000

>________________________________
>From: Andrew Rodland <andrew@cleverdomain.org>
>To: "tap-l@testanything.org" <tap-l@testanything.org>rg>; "tap@ietf.org" <tap@ietf.org>
>Sent: Friday, 24 June 2011, 15:08
>Subject: [tap] More uncertainty about junk lines
>
>
>Once again I'm working on my parser and trying to deal with some ambiguities, and I'm realizing that I may be mistaken about the handling of junk lines. What does "any line that does not parse must be ignored" in the draft spec really mean? Does it mean lines that couldn't possibly be TAP in any position (in which case we can still throw an error on out-of-sequence TAP) or does it mean any line that can't parse in *this* position, in which case there are no true parse errors at all? In other words, is this TAP:
>1..3
>ok 1
>ok 2
>1..1
>ok 3
>valid with an ignored fourth line, or does it have an error on the fourth line?


That's a very annoying edge case you have there, but I would argue that anything which *could* be parsed as a TAP line MUST be parsed as such, thus rendering the above invalid. Otherwise, we'd have no idea if you were spitting out bad TAP or something else was spitting out junk which happened to look like TAP.
 
Thus:

* If something *can* be parsed as a TAP line, do so, even if it renders the TAP document invalid.
* If something *can't* be parsed as a TAP line, ignore it.

Cheers,
Ovid
--
Live and work overseas - http://overseas-exile.blogspot.com/
Buy the book           - http://www.oreilly.com/catalog/perlhks/
Tech blog              - http://blogs.perl.org/users/ovid/
Twitter                - http://twitter.com/OvidPerl/