Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] JSDT Parser


Hi Eugene,

Yes, help is definitely is definitely needed and appreciated.

There is an ongoing work around JavaScript parser and you can see the latest code at https://git.eclipse.org/r/#/c/67469/ At this time we are trying to introduce the esprima parser by running it with nashorn. We will be using the parser to generate what is known as DOM AST or external AST and retire the old/internal AST that is tightly
couple to the current parser.

We did consider several options for a replacement parser [1]. I have also looked at mending the JDT compiler based parser. Even though it is possible to fix the current parser as you have said with a few good alternates around I do not think
the effort is worth it.

I am aware of the JEP 236, and we are architecting the new parser in such a way that we can replace it relatively painless in the future. The replacement can easily be Nashorn’s parser provided that it supports the latest Ecmascript specification.

Please let me know if you have any further questions. I also recommend reading our recently revamped contributing wiki [2].

[1] http://www.gorkem-ercan.com/2015/11/benchmarking-javascript-parsers-for.html
[2] https://wiki.eclipse.org/JSDT/Development
—
Gorkem


On 10 Mar 2016, at 2:51, Eugene Melekhov wrote:

Hi all,

I'd like to help JSDT and I believe that Compiler/Parser is one of the places that needs change. Does anyone works on
it? Are there any new implementation ideas?

I see that at the moment it's based on the JDT compiler code base and thus depends on jikes parser generator. Even though using generator is OK in general it seems to me that maintaining and developing such parser is harder then maintaining just hand-written one; especially when up-to-date open-source JS parsers are available at the moment.

I looked at the Nashorn sources and they are quite clean, readable and maintainable, though I don't have any performance comparison results. There is no Nashorn's public parser API yet, but JEP 236 addresses this issue and it will be
available in Java 9.

What do you think of using Nashorn parser in JSDT?

Thanks.

--
Eugene Melekhov

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top