Syntacs Translation Toolkit FAQ

Paul Cody Johnston


Table of Contents


How do I compile a grammar?

!!This FAQ is far too early to be of much use!!

The simplest way is to use the `sttc' script in the `bin/' directory. Pass the filename of the grammar to the script.

[syntacs-x_x_x]$ bin/sttc ../grammar/scc/scc.stt
[syntacs-x_x_x]$ bin/sttc ../grammar/abb/abb.xml

The `sttc' script calls the main method of the com.inxar.syntacs.Compile class, so you can just call it directly:

[home]$ java -classpath lib/jenesis.jar:lib/syntacs.jar:lib/xml.jar:xerces.jar \
         com.inxar.syntacs.Compile \
         grammar/scc/scc.stt

What are properties?

Properties are key = value pairs that are used to customize and/or affect the behavior of various classes. For example, verbose=true triggers verbose output, and compile-viz-dpa-hide-loopback-edges=true prevents the drawing of loopback edges when rendering an LALR1 pushdown automaton. There is a list of properties in the Users Guide.

How do I write an STT grammar?

You can write it in either the native syntacs grammar format (a file with suffix `.stt') or XML. The best way to learn how to write a grammar is by looking at examples. The `grammar/' directory in the distribution has some sample grammars.


This document was generated on 6 July 2001 using texi2html 1.56k.