Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] JS Parser?

I have done some work with the JS parser from UglifyJS. It just needs a commonjs environment for module loading although stripping the require calls should be sufficient. Let me know if you want more details on what I have done with it.

Richard

Inactive hide details for "John J. Barton" ---04/14/2011 10:53:27 AM---On 4/14/2011 7:27 AM, Simon Kaegi wrote: Hi John,"John J. Barton" ---04/14/2011 10:53:27 AM---On 4/14/2011 7:27 AM, Simon Kaegi wrote: Hi John,


From:

"John J. Barton" <johnjbarton@xxxxxxxxxxxxxxx>

To:

orion-dev@xxxxxxxxxxx

Date:

04/14/2011 10:53 AM

Subject:

Re: [orion-dev] JS Parser?




On 4/14/2011 7:27 AM, Simon Kaegi wrote:
      Hi John,

      At the moment we're using JSLint but are not doing anything with it at the parser level. We're just using it more or less at the application level to help provide a basic outline view as well as identifying problems.

      At some point I suspect we're going to need to deeper integration to let us have really amazing language tools and I'm hoping there's some liberally licensed libraries we might be able to use (we'd rather avoid reinventing the wheel here). In addition to JSLint some of the libraries probably also worth a deeper look are: UglifyJS, Narcissus, and more recently I saw Reflect.js go by.

Here's my take:

JSLint is interesting because of its base function and unusual parser algorithm. The license is barely acceptable.
This would be a one-way relationship, don't expect any changes to be considered upstream. There is a new fork however. Both main and fork likely to be around. I wanted to like this one, but couldn't get in to the code easily.

UglifyJS code is easy to read and claims to be fast; generates an AST; BSD license.
Very active now and growing adoption. Node.js/NPM centric unfortunately. Based on the same parser techniques as CodeMirror.

CodeMirror2 already used for editing, auto-complete; good support. MIT. Code is harder to read.
Long time parser person behind it, good track record, used in firerainbow for Firebug syntax highlighting, not blazing fast.

Narcissus older JS style, mozilla specific, focused on parsing for compilers.
Around a long time, not active.

Reflect.js, uses new Mozilla API,
No track record.

I'll ask on the Firebug Working group also.
jjb
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/orion-dev


GIF image

GIF image


Back to the top