----- Original Message ---- From: Michael G Schwern <[EMAIL PROTECTED]>
On 7/4/06, Ovid <[EMAIL PROTECTED]> wrote: > > Because we're discarding anything which does not look like a plan or a test > > line > > Don't discard them, just pass them through unaltered. Don't want to > lose any information. The /^#/ lines should be marked as comments. > Anything else is marked as junk but still passed through. I'll make that change. > > 1. The lexer croaks() if the planned tests and the actual tests don't > > match. > > I assume this behavior should be handled elsewhere? > > Doesn't sound like a lexer's job. Sounds more like the parser's. ... > But again, parser's job. ... > Also sounds like the parser's job. ... > Also, parser's job. | Originally I had the behavior the lexer and parser quite separate, but due to some precedence issues in the lexing, I scrapped my original design and took something which is conceptually similar to the Parse::RecDescent approach in that I "blurred" the difference between the lexing and parsing steps. I see in http://perl-qa.yi.org/index.php/TAP::Harness that there is a clearer separation of the lexing and parsing, but I deliberately abandoned that as not being needed in this case because it was overkill. Once I took that approach, things were much simpler to write. This long-winded (as usual) explanation brings me around to my actual question: is there really any need to have the lexing and parsing stages clearly delineated? I can't see why, but from you mentioning several times that "that's a parser's job, not a lexer's", I assume you have some reason behind this. Am I missing something? Is there some desire that one might take the lexed tokens and direct them to another parser, for example? Also, since I had not seen the TAP::Harness work before, I didn't know that a separate parser was already being planned. My only motivation for writing TAP::Parser was my assumption that it was needed and was not going to otherwise be written. If you already are planning your own, mine would just be more wasted space on the CPAN :) Cheers, Ovid