If the tree-sitter runtime requirements are prohibitive and a pure JVM solution (IOW, no JNI) mandatory, then I'd recommend using antlr[0] with its representative grammar[1] as a starting point. See here[2] for more details.
1 - https://github.com/antlr/grammars-v4/blob/master/javascript/...