----- Original Message ----
From: jerry gay <[EMAIL PROTECTED]>
> i translated this grammar to a perl 6 grammar. i know it has some bugs
> in it (probably 'rule' vs. 'token' among others) but it's a good
> start. from translating it, there are a few things that stick out.
Wonderful!
~ i thought descriptions started with a hyphen C<->, not an octothorpe C<#>.
Descriptions may start with any character so long as it's not a not a digit or
an octothorpe. Octothorpes are not allowed in descriptions unless escaped.
That was also something else I didn't know how to represent in my grammar:
description ::= (character - (digit '#')) {character - '#'}
Hmm, but that should be:
description ::= (character - (digit | '#')) {character - '#'}
The reason you see descriptions starting with a hyphen in Test::More style
output is because people do stuff like this:
ok $foo, '3rd test passed';
And you don't want to risk that leading digit confusing the parser. Of course,
whitespace between the test number and the description would make that a moot
point, but since test numbers are optional ...
~ doesn't <directive> belong before <description> ??
No. Consider:
not ok 3 we should have foobar # TODO find some foobar
Status: 'not ok'
Test Number: 3
Description: 'we should have some foobar'
Directive: '# TODO find some foobar'
~ missing 'Bail out!'
Phooey! Thanks.
Um, that raises an interesting question: is anything allowed after Bail out?
I see that in some of the sample tests, but I'll try and figure out those after
I get off work.
> in any case, it looks pretty good, and i'll try to keep my parrot TAP
> parser grammar in line with the TAPx::Parser grammar as it develops.
That sounds great!
> btw, i love writing grammars in perl6. what kind of a geek does that
> make me? eh, who cares. grammars rock!
:)
Cheers,
Ovid