Adding keywords for syntax highlighting

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
Guest

Adding keywords for syntax highlighting

Post by Guest »

I'm using the eval version of Zeus, editing HTML files, and am trying to add new "Reserved words" to the HTML document type. For instance, I have tried to add "<IMG" and "</IMG>" to the type, using:

Options | Keyword Options

and with the "Reserved words" button active, under "Keyword" added "<IMG" and "</IMG", then clicked on Add, Apply, OK. The new entries are now visible and properly sorted in the List of Keywords.

However, the syntax color highlighting is not applied to the "<img" tags in my document. I have exited Zeus entirely, and reloaded the files, and the syntax color changes are stil not applied. What might be wrong?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

However, the syntax color highlighting is not applied to the "<img" tags in my document. I have exited Zeus entirely, and reloaded the files, and the syntax color changes are stil not applied. What might be wrong?
There is no need to restart Zeus since all configuration changes are immediate.

Zeus was originally written for languages like C/C++, Java etc and these langauges follow a common pattern in terms of syntax. But for languages like HTML , XML and LaTex they same patterns do not apply. The end result is the Zeus syntax highlighter does have problems with some of these languages.

In a nutshell the problem relates to to this like the fact thay these languages can have keywords that also contain delimiter characters (ie < and /). What is worse these language cause Zeus a bigger problem by the fact that the languages don't require the the use of delimiters at all :(

For example consider this C/C++. if while is seen as two keywords but ifwhile is correctly seen as nothing.

Now compare this to HTML, for example <br> <p> which is clearly two keywords but the problem is so so too is <br><p>.

So to keep the Zeus syntax highlighter happy you need to try to make sure all keywords are seperated by white space or a delimiter character.

The Zeus highliter basically needs to be full re-written to cater for these different style of language, but at this stage there are other more pressing things that need to be done.

Cheers Jussi
Post Reply