I am preparing a syntax highlighter, and have some questions, perhaps someone could help me with them:
1. Compound quotes are used to enclose text like so: `"alpha beta gamma"'. Note that the opening quote is different from the closing quote. Standard string character is same for opening and closing and it is a single character. What is the best way of defining highlighting for strings with compound quotes like above? I have declared them as a block so far, but wanted to see if other options are available.
2. Recursive features are of the kind: `"alpha `"beta gamma"' delta"'. Once I define highlighting with `" as the start of a block and "' as the end, alpha, beta and gamma become the part of the block, but delta - no, though it is supposed to be. Similarly with comments, e.g.:
Code: Select all
command1
/* this is a comment
/* and this is a comment */
--->this is still a comment !!! <---
*/
command2
3. How do I specify that a particular word is highlighted differently depending on whether it is the first word in the line? E.g.
Code: Select all
if (`alpha'>0) replace var1=`alpha' if (`beta'<0)
So far I could not make any other syntax highlighting editor correctly deal with these and a couple of other more involved situations. But I hope the local Gurus might have some suggestions.
Thank you,
Sergiy Radyakin