0

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!

Roy Sharon
  • 3,488
  • 4
  • 24
  • 34

1 Answers1

1

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
  • 30,623
  • 8
  • 82
  • 102
  • 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 Sep 01 '10 at 12:09
  • @Roy Sharon: Well, there is a Just-In-Time compiler extension built on top of Spidermonkey. See https://wiki.mozilla.org/JavaScript:TraceMonkey – Dirk Sep 01 '10 at 12:23