On 7/7/06, Ovid <[EMAIL PROTECTED]> wrote:
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?
I started writing a single parser/lexer and found it to be a bit too convoluted. Separting the parsing and lexing is turning out simpler. Sounds like you're having the opposite experience. Possibly because you're using a real grammar and I'm using ad hoc code. Maybe I'm just gunshy after working with Test::Harness for so long. That's ok, the strength of different implementations is they take different approaches. Interface-wise, I'm looking at TAP::Harness' bits in terms of what behaviors a user might want to override. I'm trying to draw clear lines of responsibility so a user can play with the bits they care about without having to touch stuff they don't. Its very unlikely they'll want to override the lexer, unless they're writing a TAP extension, so I'm walling that off.