Go to the first, previous, next, last section, table of contents.


Overview

What

The Syntacs Translation Toolkit (STT) is a lexer/parser generator in the lex/yacc family. Given an input grammar, the STT will generate a translator, a machine that partially implements the lexing and parsing tasks in Java. The grammar author is responsible for implementing an Interpreter that is used to guide the instantiation of terminals and nonterminals throughout the translation process. The Interpreter takes the place of semantic actions which are traditionally interleaved into a grammar.

How

Lexical analysis is done using traditional finite automata. The notion of stack-managed lexer states ("lexical context") is introduced. Syntactic analysis is done using shift-reduce parsing using either SLR1, LR1, or LALR1 parse tables.

Why

No reason; just because. Well, that's not exactly true -- I was writing a new language of my own and of course the first thing one does when writing a new language is to write one's own lexer and parser generator -- yes, to pretty much reinvent the wheel. The thing is is that one needs to understand the wheel, and the best way to do that is to reinvent it. So it was/is an educational experience.


Go to the first, previous, next, last section, table of contents.