I am looking for a parser generator that accepts a Javacc grammar file (.jj) and generates a parser in Javascript (instead of Java). Does such a thing exist? Alternately how difficult would it be to convert the .jj file to something that ANTLR (which can output Javascript) can understand?
I am looking for a parser generator that accepts a Javacc grammar file (.jj) and generates a parser in Javascript (instead of Java). Does such a thing exist?
Apparently, no.
Alternately how difficult would it be to convert the .jj file to something that ANTLR (which can output Javascript) can understand?
It would be non-trivial, and you'd need to do it by hand. But the actual 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'm not going to list them or recommend one!)
Obviously, the input language will be different to Javacc input.