Write My Own Lexer (Synxtax Highlighter)

Using a plugin, is this possible? I mean, if I wanted to write a syntax highlighter for another language.

See, we use this archaic language 4GL some (I hate it, but no choice) and PHPStorm still works well, except I'd like to have syntax highlighting.

0
7 comments

Sure. Most language support modules in PhpStorm including the PHP are the plugins.
You can start from here http://confluence.jetbrains.net/display/IDEADEV/Developing+Custom+Language+Plugins+for+IntelliJ+IDEA

0
Avatar
Permanently deleted user

Hello Keith,

Also you can define the syntax highlighting by yourself using a custom file type (Settings | File Types).



Attachment(s):
custom_syntax_highlighter.png
0

Awesome. This works pretty well. Because this language is VB like (no parens, braces, and variables don't $), I may still have to write my own lexer, but this helps immensely for now and it was quick!

4gl_colors.JPG

0

Oh, I'm cheating by adding the actual variable names as keyword group 4. Pain. Still, it will help with errors.

0
Avatar
Permanently deleted user

Descriptions of custom file types can be found at  ~\.WebIDE10\system\config\filetypes on Windows and Linux and at  ~/Library/Caches/WebIDE10/system/config/filetypes on OS X, where ~ stands for user  home directory.
So you can share it.

0

You mean:


~\.WebIDE10\config\filetypes for Windows. (not system)

0
Avatar
Permanently deleted user

Yes. I'm sorry.

~\.WebIDE10\config\filetypes for Windows and Linux
~/Library/Caches/WebIDE10/config/filetypes for OS X

0

Please sign in to leave a comment.