Highlighting of syntax for custom files #4629
-
Good day, everybody! The next thing... I need add a few new keywords and syntax like MODULE .... ENDMODULE as declaration. I understand the question sounds crazy... but do we know something that help me to solve the problem |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
The problem I didn't manage to solve: implementation of search by declaration. In theory, we need to create correct regular expression, add ctags option, something like: |
Beta Was this translation helpful? Give feedback.
Ok, As for syntax highlighting for specific language that doesn't support by ctags, I solved the problem. May be this is dirty, but... In the package opg.opengrok.indexer.analisys I created folder bacis (this is the name of language I need parse, very specific language for some legacy system). In this package I created classes BacisAnalizer, BacisSymbolTokenizer, BacisXRef using classes for C as examples. Also I created *.lex? files: added some specific language construction, like comments and so on. Also I created my own class Consts that contains list of keywords. Please note that all files are in one package, unlike other languages implemented here (XRef in the jar, lex-files in the jf…