If you have done a PRISM PP parser, maybe you can contribute it to the PP community. Thank you. On Thu, Oct 4, 2018 at 9:47 PM Steffen Märcker <merkste@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
Am .10.2018, 20:14 Uhr, schrieb Steffen Märcker <merkste@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
-- Serge Stinckwic âhâ Int. Research Unit on Modelling/Simulation of Complex Systems (UMMISCO) âSorbonne University (SU) French National Research Institute for Sustainable Development (IRD)â U âniversity of Yaoundé Iâ, Cameroun "Programs must be written for people to read, and only incidentally for machines to execute." https://twitter.com/SergeStinckwich â