Hello Andrew !
I saw that you also tried packcc before and decided to use peg from Piumatra, I also after seem the overhead of packcc and testing lpeg and others decided to look a bit deeper on peg from Piumatra and I'm attaching here my latest working version (probably I'll create a github repo later).
Added the extra features from leg to peg (~{}, @{})
Did a kind of fix for debug dump to properly show literals like '"]"'
Added string literals to the alternatives inside actions to properly handle actions with strings containing "some }"
Some other still moving changes to improve error messages
See attached my changes with some working examples, I think that we can collaborate to improve it even more, ideally I want to have a parser like https://github.com/edubart/lpegrex/blob/main/parsers/c11.lua working in peg/leg to use as a base for other projects.
Hello Andrew ! I saw that you also tried
packcc
before and decided to usepeg
from Piumatra, I also after seem the overhead ofpackcc
and testinglpeg
and others decided to look a bit deeper onpeg
from Piumatra and I'm attaching here my latest working version (probably I'll create a github repo later).Main changes:
leg
topeg
(~{}
,@{}
)'"]"'
"some }"
See attached my changes with some working examples, I think that we can collaborate to improve it even more, ideally I want to have a parser like https://github.com/edubart/lpegrex/blob/main/parsers/c11.lua working in peg/leg to use as a base for other projects.
Cheers !
mypegleg.zip