A parser generator library for Emacs
  • Emacs Lisp 99.7%
  • Makefile 0.3%
Find a file
2026-01-05 11:13:45 +01:00
docs Added macro for setting the lexer reset function as well 2025-12-25 17:47:29 +01:00
test Bumped copyright years 2026-01-05 11:13:45 +01:00
.gitignore Fixed state-based lexer with move operations with new state 2024-02-19 10:10:52 +01:00
.travis.yml Updated Travis and Makefil rule name 2020-11-04 16:40:42 +01:00
LICENSE Added TRAVIS and LICENSE 2020-11-04 10:58:02 +01:00
Makefile Implemented exported LL(k) and LL(1) parser 2022-05-10 11:51:57 +02:00
parser-generator-lex-analyzer.el Bumped copyright years 2026-01-05 11:13:45 +01:00
parser-generator-ll-export.el Bumped copyright years 2026-01-05 11:13:45 +01:00
parser-generator-ll.el Bumped copyright years 2026-01-05 11:13:45 +01:00
parser-generator-lr-export.el Bumped copyright years 2026-01-05 11:13:45 +01:00
parser-generator-lr.el Bumped copyright years 2026-01-05 11:13:45 +01:00
parser-generator.el Bumped copyright years 2026-01-05 11:13:45 +01:00
README.md Improved readme 2024-01-10 21:31:13 +01:00
TODO.md Passing final tests for state-based lex-analyzer 2024-01-09 10:01:05 +01:00

Emacs Parser Generator

License GPL 3 Build Status

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.