I am looking for a parser generator that accepts a Javacc grammar file (.jj) and generates a parser in Javascript (instead of Java). Is there such a thing?
Apparently not.
Alternatively, how difficult would it be to convert the .jj file to what ANTLR (which Javascript can output) can understand?
That would be nontrivial, and you would need to do it manually. But the real degree of difficulty probably depends on the grammar you are trying to convert.
It is worth noting that there are other parser generators that output parsers in Javascript. (And no, I will not list them or recommend!)
Obviously, the input language will be different from Javacc input.
source share