Closed chkmls closed 1 year ago
@chkmls Thanks for your question. The way pigeon is built does not support to generate a parser on the fly by providing a grammar. I think it would be do-able somehow (e.g. with the use of a Go interpreter like https://github.com/traefik/yaegi), but it does not feel natural with a compiled language like Go and it is certainly not a goal for pigeon.
Ok, thanks for the answer. Maybe there is a way to automat the generate? Now if there is an error on the grammar, there is a need to go to the shell and re run the command and compile again
@chkmls I have used https://github.com/mitranim/gow for this in the past. You can combine it for example with https://taskfile.dev/.
Great, thanks !
In pegjs the grammar could be used within the code with
peg.generate(grammar)
instead of command line. This could be achieve with pigeon too?