问题描述
我正在寻找一个免费的开源Javascript / ECMAScript编译器或词法分析器,以便将JavaScript代码编译为可在Linux上运行的可执行文件。
I'm looking for a free open-source Javascript/ECMAScript compiler or lexical analyzer, in order to compile javascript code to an executable that can run on Linux.
我知道我可能需要为JavaScript代码添加一些对象/ API,以便能够在O / S中执行操作。我希望这些工作中的一些已经在某个地方完成了。
I understand that I will probably need to add some objects/APIs for the javascript code to be able to perform operations within the O/S. I was hoping that some of this work has already been done somewhere.
任何指针任何人?感谢!
Any pointers anyone? Thanks!
推荐答案
您可以尝试,一个用Java编写的免费JavaScript实现。如果您需要一个实现,而不需要完整的Java安装,您可以尝试Firefox项目的
You can try Rhino, a free Javascript implementation written in Java. If you need an implementation without requiring a full Java installation, you might try the Firefox project's Spidermonkey
这篇关于Javascript编译器/ Lexer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!