Chapter 4. Rule Editing and Output Display

Table of Contents
Rule Editing
Output Display

Rule Editing

The rule files for fsgmatch are XML files with a format defined in the DTD $TTT/RES/RuleSpec.dtd. Since they are XML files, they can be edited with XML-aware tools. The simplest possibility is to use emacs with a special SGML or XML mode. Alternatively, one can use a specialised XML editor. We do not provide an XML editor with the TTT release but we there is a free LTG XML editor, XED, available from http://www.ltg.ed.ac.uk/~ht/xed.html. The XED editor guarantees that ill-formed XML documents cannot be written and provides easy access to a validator.

It is also possible to edit the fsgmatch rules using a version of THISTLE (see http://www.ltg.ed.ac.uk/software/thistle/index.html). THISTLE is a parameterizable display engine and editor for diagrams, and details on how to download and use the program are available from the web pages. Note that it is necessary to use the version of THISTLE which is specifically designed to handle the TTT rules; again, the home page mentioned above contains all the necessary information. Briefly, using THISTLE to edit rules ensures that it is not possible to produce ill-formed grammars, thanks to the pre-defined diagram class specification. The program also aids the grammar writer by automatically taking care of some of the low-level aspects of the process.

There are a number of other SGML or XML editors available. For an excellent overview of SGML/XML software see http://www.oasis-open.org/cover/sgml-xml.html.