Am .10.2018, 20:14 Uhr, schrieb Steffen Märcker <merk...@web.de>: > Dear all, > > I have two questions regarding parsing frameworks. > > 1) Do you have any insights on the performance of SmaCC VS Xtreams > Parsing VS PetitParser? > 2) Has anybody started to port PetitParser 2 from Pharo to VW? Is it > worth the effort? > > Sorry for cross-posting, I thought this might interest both communities. > > Cheers, Steffen
On Fri, 5 Oct 2018 at 04:47, Steffen Märcker <merk...@web.de> wrote: > I gave Xtreams-Parsing and PetitParser a shot and like to share my > findings.[*] > > The task was to parse the modelling language of the probabilistic model > checker PRISM. I've written a grammer of about 130 definitions in the > Xtreams DSL, which is close to Bryan Fords syntax. To avoid doing it all > again with PetitParser, I wrote a PetitParserGenerator that takes the DSL > and builds a PetitParser. > > The numbers below are just parsing times, no further actions involved. > For > reference I show the times from PRISM (which uses JavaCC), too -- > although > they involve additional verification and normalization steps on the AST. > > input Prism XP PP > 230kB 14s 9s 2s > 544kB 121s 20s 5s > 1.1MB 421s 34s 8s > 1.4MB 1091s 47s 12s > 2.2MB 63s 16s > 2.9MB 81s 20s > 3.8MB 107s 25s > 4.4MB 123s 30s > > Please note that these times are not representative at all. It's just a > single example and I put zero effort in optimization. However, I am quite > satisfied with the results. > > [*] I was already familiar with the DSL of Xtreams-Parsing, which I like > very much. I did not consider SmaCC, as I find PEGs easier to use. > > Best, Steffen > Thanks for your report Steffen. Nice to see such comparisons even when a bit apples & oranges. Will you be implementing those "additional verification and normalization steps" ? It seems they have an exponential or power impact on times. cheers -ben > > > > > >