0

Hi all,

I'm working on some syntax highlighting code. Well, the code is finished, I just need a list of all of the syntax to highlight.

I'm allowing the user to select the color and words per list of syntax, I just need to know what words to put in each list (category).

For instance, for HTML: Tag list with tags, Properties list with properties, etc.

I would like to get syntax for: Python, Java, HTML/XHTML, CSS, SQL/DDL Commands and Datatypes, C#, VB, C++, and any others you guys may be able to think of.

My question is this, does anyone know of a good resource that lists all of the possible syntax for any of the above mentioned languages?

Thank you all greatly,

Dave

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by LCdave
0

yup, the language specification for each language will have it all.

But I have to disappoint you: the approach you've chosen is woefully naive!
Not only does syntax highlighting need to do a lot more than just identify keywords (it for example needs to be able to colour variables at different levels, method names, etc. etc. as well to name a few) but it also needs to be able to understand the code so that it can flag incorrect use of words as errors.
For example if you use a keyword as a variable name that keyword in that position should not be coloured as a keyword, but as an error.

0

Hi jwenting, thank you for the information.

These are certainly concerns I need to consider. The project I am working on is no small task, and the Syntax Highlighting code has been consuming much of my time (night and day).

I will reconsider how much control the user has. Thanks again jwenting :)

Dave

yup, the language specification for each language will have it all.

But I have to disappoint you: the approach you've chosen is woefully naive!
Not only does syntax highlighting need to do a lot more than just identify keywords (it for example needs to be able to colour variables at different levels, method names, etc. etc. as well to name a few) but it also needs to be able to understand the code so that it can flag incorrect use of words as errors.
For example if you use a keyword as a variable name that keyword in that position should not be coloured as a keyword, but as an error.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.