This is the Syntacs Translation Toolkit (STT), yet another member of
the Yet Another family of compiler generator tools. The STT was borne
out of a general desire to understand lexical and syntactic analysis;
perhaps it may even be of utility to others... It does:
- Generation of regular-expression-based lexers in Java
- Generation of shift-reduce parsers (SLR1, LALR1, LR1) in Java
The STT has some sporty features:
- Supports 16-bit (Unicode) lexing
- Unique support of lexical states (states are managed with a stack)
-
SLR1/LALR1/LR1 DPA construction algorithms
- Deremer-Penello LALR1 construction algorithm
- Customizable parser error recovery/repair
- Grammars can be written in "syntacs format" (.stt) or XML
- Postscript/PNG visualization of finite automata using "Graphviz"
- Postscript/PNG visualization of pushdown automata using "Graphviz"
- Pretty printing of parse trees
- Relatively modular design
- Decent documentation
- GPL License
One feature is that an STT grammar file does not contain semantic
actions (no code). Rather, a separate component is implemented by the
grammar author which is responsible for responding to lexical and
syntactic events to do the actual abstract syntax tree construction.
Therefore, the STT has a minimalist philosophy of only trying to
automate that which is easily automatable.
The STT is too early to recommend for production work but it's quite
cool, has a nice modular design, and has good support visualization of
internal structures; it's immediately useful for educational use and
for algorithm experimentation.
Homepage
http://www.inxar.org/syntacs
License
GPL
Download
The highest-numbered release whose final digit is an even-number is
the current recommended distribution.
http://www.inxar.org/download
Installation
Unpack the archive; make sure the syntacs.jar
,
jenesis.jar
, and xerces.jar
are included in
the classpath. You can substitute Sun's XML-TR2, Crimson, or JAXP
parser in lieu of Xerces if you like.
Documentation
Contact
It's nice to have feedback on your work: if you have an idea,
suggestion, criticism, bug report, or bigfix, please send me an email:
pcj@inxar.org.
Enjoy,
- Paul