views:

36

answers:

1

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.

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!

+1  A: 

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

Dirk
@Dirk, as far as I can see, both Rhino and Spidermonkey are embeddable interpreters. I'm upvoting your answer for the good pointers, but I'm actually looking for a real compiler, that can achieve the performance of a compiled code...
Roy Sharon
@Roy Sharon: Well, there is a Just-In-Time compiler extension built on top of Spidermonkey. See https://wiki.mozilla.org/JavaScript:TraceMonkey
Dirk