Question

What is the status of the JavaScript target in ANTLR 3.4 or 3.5? I have been looking online for an answer to this question but so far I have found nothing. I know that it was broken in v3.2 and then it was fixed in v3.3, but it's not listed in the ANTLR 3.4 release notes as a target that is consistent with ANTLR 3.4.

I have a project in which I need to convert the Java target ANTLR grammar which I had previously written to JavaScript and I want to make sure that the JavaScript target is supported by ANTLR 3.4 or 3.5 before I proceed.

Was it helpful?

Solution

ANTLR 3.1 and 3.2 had some bugs w.r.t. generating JavaScript code1, but you should be okay with version 3.3.

You can find the JavaScript runtime here: http://www.antlr3.org/download/antlr-javascript-runtime-3.1.zip

A small demo of how to use ANTLR + JS can be found in this Q&A: ANTLR PCRE Grammar to JS Target

1 http://www.antlr.org/wiki/display/ANTLR3/ANTLR3JavaScriptTarget

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top