Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
Recently I was trying to write a grammar for TAP. With a grammar, I could write a parser and people could refer to a canonical grammar to know if their TAP implementation is correct. That grammar is incomplete and has bugs (for example, I didn't account for newlines), but it's a start.
I ran into several problems, most of which can be solved by folks coming to a concensus on how some things should be handled. However, there's one bit to the grammar which I don't know how to write. Consider this snippet of TAP:
ok 6 -
... or if it is zero
ok 7 -... or not an integer
ok 8 -... but a positive integer should not cause it to die
The relevant section of grammar might resemble this:
tests ::= test {test};
test::= status (positiveNumber description) newLine
status::= 'not '? 'ok ';
description::= (character - (digit '#')) {character - '#'};
See a problem with that? How do I use a grammar to indicate that each positiveNumber must be one greater than the previous positiveNumber and that said numbers must begin with the number 1 (one)?
(The title of this post should have been "EBNF Grammar Nazis wanted")
positiveNumber (Score:2)
Put differently, pure EBNF can't handle what you are asking, but lex can.
Context-free grammar (Score:1)
Adding extra code to check the constraint makes the most sense to me.
What Ziggy said (Score:1)
So your BNF should specify a leading number, the dots, the comment, the newline. This allows a lexer to read the language and say "yes, that is a valid line of TAP" or "no, it's not valid because
Take this example:
<value>
So we've defined that a value is one or more terms, separated by '+'. We have no
Not the right tool (Score:2)