tera icon indicating copy to clipboard operation
tera copied to clipboard

Look into rewriting the parser

Open Keats opened this issue 5 years ago • 3 comments

It seems that pest is not maintained anymore and we do have some bugs (unlikely to trigger in practice but still) because of it.

What are the best options right now? I've seen https://crates.io/crates/combine and https://crates.io/crates/nom but not in depth.

This is not urgent at all and might not even happen but looking around so if it needs ot happen, I know the options.

Keats avatar Aug 17 '20 17:08 Keats

Are you referring to https://github.com/pest-parser/pest/issues/399#issuecomment-678489985? It feels more of a temporary thing according to that comment. Not sure why some PRs aren't merged though, only publishing can't be done :)

Edit: No chance that you refer to that comment, it was created only 3 days ago :D At least it's an update on the situation and good to know.

mainrs avatar Aug 24 '20 09:08 mainrs

The new version has been talked about for almost 2 years but the creator doesn't seem active anymore. Again, not needed to change right now but we do have some bugs in Tera due to issues in pest that are not fixed.

Keats avatar Aug 24 '20 09:08 Keats

Fair enough. Maybe things change down the line in a couple of weeks/months. Who knows :D But I think that a grammar-based approach is easier to maintain for such a complex use-case.

Sadly I can't really add any value between using combine and nom. I only used nom for now but wanted to get to combine with a toy project of mine down the line. I'll report back if I find something that might hinder development or make it easier that is only available in one of the crates.

mainrs avatar Aug 24 '20 09:08 mainrs

we do have some bugs in Tera due to issues in pest that are not fixed.

@Keats do you have the list of issues? I saw this one: https://github.com/pest-parser/pest/issues/402

tomtau avatar Sep 29 '22 14:09 tomtau

That's the main one, I can't remember the others sadly. This issue should be close actually, I've already rewritten the parser like 3 times already for v2.

Keats avatar Sep 29 '22 16:09 Keats