syntax for php
Pavel Roskin
proski at gnu.org
Mon Sep 17 18:43:24 UTC 2001
Hi, Max!
Replying to all your messages. Too bad that the e-mail of Stephen Perez
doesn't work.
> here php.syntax with copyrights included.
Sorry that I didn't go into technical details in my first message.
I fully agree with you that the colors can be different, because they look
differently in the text mode. I looked into some php files and they look
much better with your syntax rules.
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.
Your syntax file doesn't recognize such contexts as <! ... >
$ grep ^context php.syntax.v0
context default cyan/5
context <!-- --> green/4
context <! > green/4
context < > brightcyan/17
context exclusive <? ?>
context exclusive <% %>
$ grep ^context php.syntax
context default
context exclusive ?> <? cyan/22
context exclusive /\* \*/ brown/22
context // \n brown/22
context linestart # \n brown/18
context " " green/6
There are good ideas in both files. I'll put your file on CVS, but I'll
try to merge some code from the original php.syntax first.
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++.
It may be better to improve the existing syntax highlighting engine
incrementally without breaking compatibility with Cooledit.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list