minipeg icon indicating copy to clipboard operation
minipeg copied to clipboard

I made/fixed and adapted some features found on the net

Open mingodad opened this issue 3 years ago • 2 comments

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).

Main changes:

  • Added case insensitive option to string literals from https://github.com/AboutUs/pegleg
  • 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.

Cheers !

mypegleg.zip

mingodad avatar Apr 26 '22 17:04 mingodad

Will definitely take a look, thanks for letting me know.

andrewchambers avatar Apr 27 '22 14:04 andrewchambers

I just created a repository with all my changes here https://github.com/mingodad/peg

mingodad avatar Apr 29 '22 10:04 mingodad