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 ?


On Thu, Mar 12, 2015 at 12:39 AM, Norbert Hartl <norbert@hartl.name> wrote:

> Am 11.03.2015 um 23:03 schrieb Damien Cassou <damien.cassou@gmail.com>:
>
> Hi,
>
> The current pillar parser has several problems:
>
> - it is hard to understand and change
> - it discards input locations
>
> I think a refactor or rewrite is necessary. What are the pros and cons of using PetitParser to do that?
>
The cons are that petit parser is a heavier component and we should never underestimate that (just a reaction to a notion on this list). So we should avoid making things more complex, especially dependency wise.
The pros is that petit parser will make it easier to extend and maintain the pillar parser. I've read something about a new version of petit parser that has a speedup of aprox. 1.000.000x. If that is the case then it is no downgrade speed wise :) Another pro is IMHO that are some people that would like to move petit parser closer (not too close) to the core. That again would make it a more standard component that makes it easy to write parsers for everyone. A good companion if you have regex and you exceed to possibilities it provides.

I really have a bad feeling while saying: It would be good to have pillar based on petit parser.

Norbert