This program generates parser's sources from file with the LL(1) grammar for some language. Project's goal is to gain more understanding of how parser generators (like ANLTR, Bison, Happy) work.
It accepts file with LL(1) written in the format that is quite close to the one used in ANLTR (.g4
files).
Run Main
providing location of the grammar file as an argument via console or you may simply place it into this source file.
Input grammar format is specified here.
Example | Grammar File | Generated Sources |
---|---|---|
Calculator | calculator grammar | calculator sources |
Regular Expressions | regex grammar | regex sources |
Pascal | pascal grammar | pascal sources |
Tested using JUnit 4.
Pavel Ponomarev, 2020 (pavponn@gmail.com)
MIT License