项目作者: pavponn

项目描述 :
⚙️ LL(1) Parser Generator written in Java.
高级语言: Java
项目地址: git://github.com/pavponn/parser-generator.git
创建时间: 2020-03-28T08:08:27Z
项目社区:https://github.com/pavponn/parser-generator

开源协议:MIT License

下载


⚙️ Parser Generator

MIT license
Java CI with Maven

Summary

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

Usage

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.

Examples

Example Grammar File Generated Sources
Calculator calculator grammar calculator sources
Regular Expressions regex grammar regex sources
Pascal pascal grammar pascal sources

Test

Tested using JUnit 4.

Pavel Ponomarev, 2020 (pavponn@gmail.com)

MIT License