- Emacs Lisp 99.7%
- Makefile 0.3%
| docs | ||
| test | ||
| .gitignore | ||
| .travis.yml | ||
| LICENSE | ||
| Makefile | ||
| parser-generator-lex-analyzer.el | ||
| parser-generator-ll-export.el | ||
| parser-generator-ll.el | ||
| parser-generator-lr-export.el | ||
| parser-generator-lr.el | ||
| parser-generator.el | ||
| README.md | ||
| TODO.md | ||
Emacs Parser Generator
The idea of this plugin is to provide functions for various kinds of context-free grammar parser generations with support for syntax-directed-translations (SDT) and semantic actions (SA) and the possibility of exporting parsers and translators (as generated stand-alone elisp code) to enable Emacs plugin-agnostic usage. This project is also about implementing algorithms described in the book The Theory of Parsing, Translation and Compiling (Volume 1) by Alfred V. Aho and Jeffrey D. Ullman (1972). Additional this project is about me learning how to parse programming languages.
At the moment it is possible to generate canonical LR(k) parsers using this library for complex languages like PHP 8.1.
Lexical Analysis
We use a regular-language based lexical analyzer that can be implemented by a finite-state-machine (FSM) that supports states. Read more here.
Syntax Analysis / Parser
We use deterministic push down transducer (DPDT) based algorithms. Read more here.
Test
Run in terminal make clean && make tests && make compile
TODO / Roadmap / Issues
Look here here.