Syntax Highlighting for EBNF
I want to make custom syntax highlighting but I am not sure how to achieve some things.
For example comment blocks in EBNF are written with (* and *) but braces “(” “)” are also used as special operators to express a set. I managed to set grey color for a comment block in EBNF, but once I set braces “(” “)” as operators the commented text becomes black again. Can you give me some ideas how to achieve this? Or is it at all plausible?
I used (* and *) for open/close in comment style
and () in operators without a problem.
If the operator ( is encased by a double quote then define this double quote as open close delimiter
and assigne the same color as used in operator.
How did you solve it?
I used double quotes just to separate the braces from other text here on the post. But I don’t have double quotes set as escape character.
Ok tried to add some symbols as keywords and now its better. But still I need to work with EBNF to see if all is covered. Will post back here if i have a problem. Some research on EBNF