groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <blackd...@gmx.org>
Subject Re: [CONTRIBUTION]groovy-parser
Date Mon, 12 Sep 2016 00:04:54 GMT
something maybe of interest from the javaparser gitter channel today:

ptitjes
	Some numbers that are not on the bar graphs: Parsing JavaParser 2.5.1 
with ANTLR4's Java 1.7 grammar takes **~115ms** and with ANTLR4's Java 
1.8 grammar takes **15s** !! I had a discussion with Terence Parr, and 
he told me the 1.7 grammar is highly optimized but nobody has optimized 
the 1.8 one yet. Nevertheless, I find that 115ms is a lot, especially 
considering it just spits out a parse tree and not the AST directly...


So if you base your grammar on the 1.8 one and the above is right, then 
I am not sure you will accomplish better performance.



On 03.09.2016 10:27, 孙 岚 wrote:
> Hi List,
>
>
>        The groovy-antlr4-grammar project is very hard to maintain and
> the performance is terrible, so I am rewriting the
> parser(https://github.com/danielsun1106/groovy-parser), which is based
> on the Java grammar provided by the antlr offical and introduced some
> good idea from the old grammar. The Java parser generated by antlr4 is
> proved efficient in the most of senarios, so Groovy parser will be
> efficient too if monitoring the performance from the beginning.
>
>
>        The groovy-parser project is now stand-alone in order to develop
> rapidly. When the project is mature enough, I will make a PR to replace
> groovy-antlr4-grammar. BTW, groovy-parser requires Java 8.
>
>
>       Currently groovy-parser supports all statements, most of
> expressions(except method call expression, command expression, etc.). I
> wish the groovy-parser could be done before the end of this year(2016).
>
>
>         Any suggestion and help is appreciated.
>
>
> Cheers,
>
> Daniel.Sun
>


Mime
View raw message