Re: Re: [PEPr] Changes in proposal for Text::Text_Highlighter

From: Date: Fri, 28 May 2004 02:39:12 +0000
Subject: Re: Re: [PEPr] Changes in proposal for Text::Text_Highlighter
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29763@lists.php.net to get a copy of this message
Antonio Carlos Venancio Junior wrote:
Andrey, Andrey Demenev wrote:
Antonio Carlos Venancio Junior wrote:
Bertrand, Bertrand Mansion wrote:
Jon Wood wrote:
On Tuesday 25 May 2004 15:22, Andrey Demenev wrote:
Jon Wood wrote:
Would it be possible for the MySQL specific highlighter to extend a general SQL highlighter, making it possible for people to simply extend the core SQL standard highlighter for things like Postgre and Oracle as well?
If take a more close look at the package, you'll find out that creating a new highlighter is just a process of describing the highlighting rules in XML format. One could take the XML for general SQL and edit it to conform standards of a certain SQL dialect. That is really simple. At the moment I don't see any reason to implement any kind of inheritance. If you know such a reason, please let me know,
I guess it sounds tidy enough then, I'm just sucker for code reuse, which this seems like a good place to use it - if 90%+ of the highlighting rules will be the same, then it makes sense to me to keep that 90% in one file, which can be fixed in the future for everything. How about being able to include other highlighter definitions within the XML?
Lets keep it simple please. Subclassing is bad.
    Sure thing. But Andrey needs help to map what is "generic" and what's specific. For this first release I think its ok.
    I could help with MySQL, HTML, Python and some others.
Please, explain in few words, what do you mean by generic and specific in this context.
    Something like this:
---------- SQL `-- MySQL `-- Oracle `-- Sybase ----------
    There is the ANSI/ISO SQL (generic) and each database has extensions (specific) to the standard SQL (MySQL, Oracle, Sybase, etc). Got it?! ;)
As it was already mentioned, it should be kept simple. I dont like the idea of making the generator more complex than it is now. -- Andrey Demenev aka Blindman demenev@on-line.jar.ru

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