# &emacs; modes for protocol testing languages

TTCN-3 mode

          debacle@debian.org

W.
Borgert
2000
W. Borgert
2000-07-28
ttcn-el
7
Development

# ttcn-el

&emacs; modes for protocol testing languages.

          ttcn-3-mode

          ttcn-mode

          tm-functions

## Description

The programming modes `ttcn-3-mode`, `ttcn-mode`, and `tm-functions` for &emacs; are for programming in the &ttcn3;, core language (Testing and Test Control Notation - 3), &ttcnmp; format (Tree and Tabulart Combined Notation), or the Test Manager scripts, an enhancement to the Forth programming language, used in the Tektronix K1297 protocol tester.

The &ttcn3; programming mode (`ttcn-3-mode`, file `ttcn3.el`) does indentation, code colourisation (so-called font-locking) and gives you an index of test cases and other important definitions via the Module-Index. With the command `ttcn3-parse` you can run an external TTCN3Parser or ttthreeparser, if available. The keywords are according to the TTCN-3 BNF of 2001-10. To switch off the logo splash screen, set the variable `ttcn3-show-logo` to `nil` in your `~/.emacs` file. The logo is by Patrick Andrieu, the ASCII art version by W. Borgert. This mode is based on CC Mode, please look in the CC Mode documentation for further information.

The &ttcnmp; programming mode (`ttcn-mode`, file `ttcn.el`) is not for writing test suites from scratch, but for fixing small errors or doing little changes or just looking at the MP format. No indentation is done, but some code colourisation, an index, and a menu with some navigation functions are given. Note: For large test suites startup might become very slow.

If one want that &emacs; treats files with the `.mp` extension automatically as &ttcnmp; files instead of MetaPost files, add the following lines to your `~/.emacs` file:

    (setq auto-mode-alist
    	  (cons '("\\.mp\\'" . ttcn-mode) auto-mode-alist))

The Test Manager programming functions (`tm-functions`, file `tm.el`)is an addition to the Forth programming mode (`forth-mode`, file `forth.el`). It includes only minor additions to the regular Forth mode, i.e. font-locking, index menu, and support of the Test Manager specific words.

To enable the `tm-functions` by default, add the following line to your `~/.emacs`:

    (add-hook 'forth-mode-hook 'tm-functions)

## Files

All lisp source files are in `/usr/share/emacs/site-lisp/ttcn-el/`.

## Author

These programmes are made by W. Borgert <debacle@debian.org>, as well as this documentation.

## Thanks

All important ideas and some code are taken from other &emacs; modes, and adapted to work with TTCN-3, &ttcnmp; and Test Manager files. Thanks to Csaba Koppany and Theofanis Vassiliou-Gioles for valuable hints on current TTCN-3 keywords and regular expressions.

## Copyright

Copyright 2000 W. Borgert and released under the GNU General Public License (GPL). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.

## Bugs

The indentation is not correct in many cases.

## History

Version 0.6 released on 2001-10-10. Updated keywords.

Version 0.5 released on 2001-05-05. Updated keywords.

Version 0.4 released on 2001-02-02. Calls external parser.

Version 0.3 released on 2001-01-31. `ttcn3.el` should now work with GNU Emacs 21.0 and XEmacs 21.1, too.

Version 0.2 released on 2000-07-28. Includes updates for &ttcn3; keywords in `ttcn3.el` and makes `tm.el` a function library instead of a major mode.

Version 0.1 released on 2000-03-31. Initial release.