Syntax is a compiler compiler written as a tool for my students in college for the compiler construction course.
I thought that having a yacc like syntax would help the introduction of LR parsers. Over time I have added:
- The introduction of lexical definitions as part of the grammar (non-regex)
- Error messages per %error definition
- Output for java
- Output for C
- Output for Free Pascal/Delphi Pascal
- Translated to JAVA from its 1985 apple basic, and 2006 C codebase.
- Support for lexic-driven parsers
- Ability to compile with LALR (yacc) or SLR, more compact and simple, albeit a little more restrictive
- Eject the output table in a compressed mode (yacc) or a matrix, for readability/teachability.
- Unlike yacc, the output is properly formated and readable!
I am planning to add in future releases of the 4.0 codebase:
- A regex token recognizer (perhaps with my own DFA)
- Error messages per rule, if possible.
- LR algorithm (lower priority)
- Honalee algorithm (low priority)
- Support the concept of %external for sectional inclusions, encapsulation and reuse.