DEV Community

Cover image for My project for GSoC 2020: A Parser Generator with Automatic Error Recovery on LPeg(Label)
Gustavo Castellanos
Gustavo Castellanos

Posted on • Updated on

My project for GSoC 2020: A Parser Generator with Automatic Error Recovery on LPeg(Label)

This is my first post on DEV and it is the start of a series of posts about my in development proposed project that got approved for the Google Summer of Code 2020 for the LabLua organization. It consists of a Parsing Expression Grammar Parser generator, based on the Lua library LPegLabel.

Summary

The goal is to build a parser generator on top of the library LPegLabel that will automatically support error recovery and (optionally) white spaces around lexical symbols and terminal symbols. We are going to use a conservative algorithm for error labels insertion, hence avoiding insertion on wrong places and no manual intervention from the programmer is needed. If there is enough time, in the end we will improve the number of insertions using information about unique syntactical non-terminal symbols and unique paths to a lexical symbol. During the coding period, some parsers will be generated with the tool as tests and as examples.

Source Code

The source code can be found here.

Name

The parser generator is called Caribay, the daughter of Zuhé (the Sun) and Chía (the Moon) from a legend of the Mirripuyes (an indigenous group from Mérida, Venezuela). Since Lua means "Moon" in Portuguese, the tool being the daughter of Lua sounded nice to me. Also, the legend involves the origin of five famous peaks from Mérida, so the name is related to "generating" things.

Top comments (0)