2015-03-12 9:46 GMT+01:00 kilon alios <kilon.alios@gmail.com>:
It would be nice to have a parser to rule them all. I am currently using SmaCC and gets the job done. I really like its condense syntax and its syntax tool but also love the smalltalky feel of pettit parser.

Maybe one must bite the bullet and write perfomance critical parts in C or even use a C parsing engine as a back end of pettit parser ?

This would be overkill. Smalltalk is fast enough.

From what Doru was talking about, we should have at least some knowledge on what is slow in PetitParser by ESUG. I saw some things by just profiling it once.

My position on that is that PetitParser reliance on PEG is a weakness, especially compared to the current state of competing tools (GLR in SmaCC, LL(*) in ANTLR, Parsing with Derivatives, GLL). And if you combine it with performance problems, then that doesn't look so good. On the other hand, PetitParser has a lot going for it: parser combinators (but PwD and GLL also have that), parser reuse, parsing debug.

Now, if you tell me a Pillar based parser in SmaCC, I'd say: easy and fast. With a nice, formal grammar defining/documenting the Pillar as a side benefit, which would make maintaining Pillar parsing very easy for the long term.

(and that formal grammar would make writing a PetitParser pillar parser a breeze :)).

Thierry