Basic syntax coloring support for jflex grammar files#8997
Basic syntax coloring support for jflex grammar files#8997matthiasblaesing merged 1 commit intoapache:masterfrom
Conversation
a36cb37 to
95499ac
Compare
|
For the background color problem please have a look here: That commit transfers the idea from HTML to jflex. |
I've also tested with Semantic Analyzer using a custom attribute set. And the highlight refresh seems more "fluent".
Do you think it would be enough ? : a8e7b40 |
2be7f6f to
23fad2e
Compare
|
is the java cluster the right place for this module? The new module would have to be hooked into CI too (main.yaml). |
I think it can be considered suitable under java, as it compiles code to java, and antlr is in the same namespace. I will include the module into main.yaml. |
That is a good idea. Thank you! |
matthiasblaesing
left a comment
There was a problem hiding this comment.
Looks sane to me in general. I left two inline nitpicks.
I would suggest to update and squash in that process.
|
Great work, really. I would suggest to see this module in the ide cluster. Only due to java generated code doesn't mean it belongs to it. We have go, hcl, toml and yaml inside the ide cluster with language as a prefix too. I already talked to @lkishalmi and he would be also fine to more antlr to another place. It is just for a new language. |
Ok, if there is this direction, I can move it into |
4e4df37 to
58d34cd
Compare
|
I need to remove the java dependency library. Problems found with autoloads Problems found for module org.netbeans.modules.languages.jflex: [The module named org.netbeans.modules.java.lexer/1 was needed and not found.] |
|
@Chris2011 @mbien anything more you want to request? Else I think this should go in. |
mbien
left a comment
There was a problem hiding this comment.
no requests from my side. ide cluster sounds good to me.
...es.jflex/src/org/netbeans/modules/languages/jflex/grammar/antlr4/coloring/JflexBasicLexer.g4
Show resolved
Hide resolved
Chris2011
left a comment
There was a problem hiding this comment.
Just left one comment, beside of this, I don't have anything left
* Added Jflex Lexer using ANTRL implementation * Updated Fonts and Coloring configuration * Fixed license issues * Added module under github workflows test * Moved module under `ide` folder * Removed java.lexer dependency * Update position level to 197 for jflex mime
|
@haidubogdan thanks for implementation. @mbien @Chris2011 thanks for review! |
|
Thank you! |
|
With pleasure, thank you also for your suggestions. |
|
@haidubogdan no hurry, but could you take a look at this ordering warning?
Since it is about the folder, you probably will have to add it to the layer like: (not sure if it is possible to set it via annotation) I fixed most of those warnings recently via #8916 - the log line will now also show the positions behind the |
|
@mbien . |
Continuation of the jflex syntax coloring support #apache#8997 pull request Set Grammar folder position to 1800 after XML as it has lower priority usage.






Adding basic coloring support for jflex files using antlr grammar.
Today the lexer and parser for PHP module are implemented using jflex gramar.
I'm thinking this update can help maintain those modules, so I see it more as an internal tool
In the future this can be followed by cup syntax coloring.