Skip to content

Conversation

@lkishalmi
Copy link
Contributor

Well working on some ANTLRv4 stuff lately, for upcoming TOML support. Noticed that I need an implementations of CharStream over LexerInput and that, ANTLR Lexer is used as just convert some token type (that is an int in ANTRL4) to a TokenId

The second commit is a kind of demonstration of the usage of this new module. A candidate could be our CSS lexer, though that seems to be on ANTLRv3 at the moment. I would use this module on TOML support. (I'm working on something for Terraform (HCL) as well.) Maybe a reduced dumb grammar for Gradle DSL instead if our Groovy...

Also it might be good to try to move the ANTLRv3 stuff to ANTLRv4...

@lkishalmi lkishalmi added the CSL [ci] enable web job label Aug 7, 2022
@lkishalmi lkishalmi added this to the NB16 milestone Aug 7, 2022
@lkishalmi lkishalmi changed the title New module makes ANTLRv4 generated Lexer integration into NetBeans easier. Make ANTLRv4 generated Lexer integration into NetBeans easier. Aug 7, 2022
@lkishalmi lkishalmi changed the title Make ANTLRv4 generated Lexer integration into NetBeans easier. Make ANTLRv4 generated Lexer integration into NetBeans easy. Aug 7, 2022
@lkishalmi lkishalmi marked this pull request as draft August 7, 2022 07:06
@matthiasblaesing
Copy link
Contributor

In general I refrain from creating a library if there is no clear advantage. The problem with libraries and NetBeans "we never break API" attitude is, that you set thinks in stone, that you might regret. If the code is copied you pay by maybe doing work twice, but on the other hand you gain bigger freedoms. Not sure where I'd make the tradeoff, but two use sites seems not enough for the introduced dependency.

Also it might be good to try to move the ANTLRv3 stuff to ANTLRv4...

Any reason to do so? The dependencies of antlr are more or less trivial and it does not tie into the JVM, so I don't expect problems in the future.

@lkishalmi
Copy link
Contributor Author

Well, I may was a bit too eager with this. Let's put this rest now.

@lkishalmi lkishalmi closed this Aug 17, 2022
@lkishalmi
Copy link
Contributor Author

@matthiasblaesing I'm going to re-create this effort. I think I've learned a few things during the last few months. My current projects could benefit from this. Though the implementation would be different, containing the things I've learned on the road.

As of the API attitude, this would be so thin that you can always opt-out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSL [ci] enable web job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants