Re: syntax for php



On Mon 17 Sep 2001 21:43, Pavel Roskin wrote:

> What I wanted you to review is the contexts recognized by the original
> php.syntax.  For example, it highlights most keywords only if they arrear
> between <? and ?>, unlike your php.syntax, where they are highlighted in
> the default context, i.e. even in the html text.
Yes, i know it. It can be done only in 'context default' section (as Stephen 
made). But in this case another syntax cann't be complitely described.

> Your syntax file doesn't recognize such contexts as <! ... >
> $ grep ^context php.syntax.v0
...
> context <!-- --> green/4
> context <! > green/4
...

But this context did not allowed inside php program (inside <? ?>). PHP will 
show error (Parse error) if <! ... > context (and even any html tag) appear 
in program. In my syntax rules all text outside <? ?> have one color. And if 
it need to be highlighted, we must set colors as html text. This require 
extend syntax rules definition, and add ability to include another syntax 
rules depends of context. 

> I agree with you that the syntax highlighting engine is ugly.  But I don't
> think that it's realistic to use Colorer for two reasons - it is
> not under GPL and it is written in C++.
Ok, if Colorer (or another library) will be under GPL, can you use it?


-- 
C U L8er!
Max Schedriviy                  mailto:max tavrida net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]