3 points | by mpweiher 12 hours ago ago
2 comments
> I beg of you, just design it to work well with an LR or Packrat parser generator. For those cases where this is not an option, use Earley.
So many unpleasant to use languages which follow this advise. Authors try to fight generator and make ugly syntax compromises to avoid conflicts.
It is amazing which speed up you can achieve with some simple caching when using a back-tracking recursive descent parser working on a string stored in memory.
> I beg of you, just design it to work well with an LR or Packrat parser generator. For those cases where this is not an option, use Earley.
So many unpleasant to use languages which follow this advise. Authors try to fight generator and make ugly syntax compromises to avoid conflicts.
It is amazing which speed up you can achieve with some simple caching when using a back-tracking recursive descent parser working on a string stored in memory.