Status of Javascript in antlr 3.4 or 3.5 [closed]

佐手、 提交于 2019-12-22 11:14:29

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/19841084/status-of-javascript-in-antlr-3-4-or-3-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!