Prasanth Janardhanan

Building a simple query parser using PEG in Go

In another post, Simple Query Parser we had built a simple query parser using Participle - a parser builder for go lang. Parsing expression grammar (PEG) is a type of grammar. The advantage of PEG is that it doesn’t tolerate ambiguous grammar definitions and so is better in error reporting. The go language port of PEG is pigeon The popular Javascript port of PEG is pegjs. A good introduction to PEG grammar can be found in the pegjs documentation and also here.

Continue Reading →