Hi Paul, Thanks for your efforts on this.
As a side note - it was a pretty scary thing to see how TT actually parses everything - a one line change to the Parser.yp resulted in a 100k diff for Grammar.pm. I guess that is the nature of yapp, but still - all I can say is "wow!"
Yep, that's a problem with table-driven parsers in general. If memory serves, the size of the parser table can, in the worst possible case, grow exponentially as the number of distinct input tokens increases. That, and the fact that modifying the parser is as scary for me as it is for you, is why I've always been wary of adding new directives. It's also why I decided long ago that that the TT2 parser had to die() and be replaced by a recursive descent parser for TT3. With it we'll have the ability to define new directives and/or disable inbuilt directives without having to mess around with complex and fragile grammars or worry about the size of the parse table. (I realise you know that already, but I'm repeating it for the benefit of the list).
The DUMP directive implemented here is pretty close to what the thread discussed.
Looks good. I'm all for adding it to TT3 but not convinced about TT2. Anything that increases the size of the parse table also increases the load time and memory requirements for TT, and that has an impact on everyone whether they use the new directive or not. And apart from anything else, I'd rather be spending my time getting TT3 finished than adding new features to TT2. Although I don't have an official "feature freeze" in place on TT2, I am leaning heavily in that direction as TT3 moves closer. So unless there's an overwhelming public demand for it in TT2, I'm going to pass on it for now. But there's nothing to stop you from releasing it as an extended grammar module if you want to get it out there for people to use. Cheers A _______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
