Re: [PEPr] +1 for Text::Text_Highlight

From: Date: Thu, 15 Apr 2004 00:52:20 +0000
Subject: Re: [PEPr] +1 for Text::Text_Highlight
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-27666@lists.php.net to get a copy of this message
Richard York wrote:
The name I suggested came about as I thought the HTML category represents packages that are largely focused on using HTML to construct output. I didn't think that the HTML category implied what the package does, though I can see that being a problem. Perhaps a tokenizer category would be more appropriate? Like Tokenizer_SyntaxHighlight, since all it does is highlight tokens.
As I said before, I am -1 for a package that only highlights tokens, that's not useful. A package that can intelligently handle the source, allow cross-referencing or other fine-grained control, even removal of docblocks - *this* would be a useful package. In fact, if it can't do these things, I can't use it in phpDocumentor at all (and it will be able to, I know Davey is very interested in seeing this used in phpDocumentor, as am I :) For reference, please see the PhpDocumentor/phpDocumentor/HighlightParser.inc to see an example of highlight parsing used by phpDocumentor to highlight and cross-reference PHP source code - no mention of any output format is used anywhere. Instead, it calls an external driver to do all of the highlighting and also to do line numbering and line breaks. This allows serious extensibility, and is the only way to do it well. Without the design of the parser, there would be no way (for example) to link to the docs for things like $this->someobj->anothervar. phpDocumentor can do links to $someobj's documentation, and if $someobj has a @var tag that says which class $someobj is, it can also link to $anothervar's documentation. A simple tokenizer highlighter just doesn't allow that kind of functionality. Greg

« previous php.pear.dev (#27666) next »