regex - What are alternatives to regexes for syntax highlighting? -


While editing it in Vim, I often find that its syntax highlighting (for some file types) There are some flaws I can not remember any instance at this time, but there will definitely be some. Generally, these are badly highlighted string in some cases, some arithmetic and boolean operators and some other little things too.

Now, Vim uses Reggae for that kind of stuff (its tastes).

However, I have started coming in front of the editors, who are keeping the syntax carefully at first glance. I have always thought that Reggae's way is to go for such content.

So I am thinking, have those editors just written better, or do they take care of it in some other way? what ? How do you take care of Syntax highlighting when you want to "stabilize" it? And what is your opinion in the editor that he has taken care of the best (in your editor of choice), and how did he do it (language-wise)?

Edit-1: For example, editors like Amax, Notepad 2, Notepad ++, Visual Studio - you know what system they use for sync High. ?

It was thought that for the syntax, instead of regexes, Highlighting Parsing has many advantages, but as we look at the highlighting of the VIM, there are limitations (if you want to use regexes for analysis of XML Looking for threads, you will find extensive content that why regexes do so Can not parse parser.)

Since we want to do syntax highlighting, it is to follow the syntax structure of language, which can only be estimated by regexes, to make you do some level of real purse The need is to go beyond whatever regexes can do. Lexcer of a typical recurring descent is probably good for most languages, I'm thinking.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -