Use Grammar-Kit parser standalone Follow
I am developing a language plugin for Intellij IDEA.
I want to use my parser in conjunction with other applications outside of the IDE as well.
- Am I allowed to do this?
- How do I achieve: "file.x" -> PsiFile and use it (read-only) in other Java applications?
Please sign in to leave a comment.
The main dependencies are PsiBuilderImpl and GeneratedParserUtilBase classes.
You can tear off unrelated code leaving only what's needed in your case.
You can also play with standalone Grammar-Kit light-psi-all.jar and LightPsi.java.
There're expression-console-sample artifact and light-psi run configuration in Grammar-Kit project.
Thanks I got it working by using
and with light-psi-all.jar.
When I run my simple example the instance is still blocking. How can I close it programmatically? Is there something like .close() .disconnect() I do not see? Or is System.exit(0); the way to go?