Tamer compiler manual

Tamer home - Language & library manual

tamer

C++ preprocessor for event-driven programming

SYNOPSIS

tamer [-g] [-o file] file
tamer [-g] -c file

DESCRIPTION

The tamer C++ preprocessor reads a source file that uses the Tamer extensions and generates the corresponding conventional C++.

The Tamer programming model is described in more detail at tamer(3).

OPTIONS

-g
Generate code in debugging mode. Debugging mode tracks the filenames and line numbers corresponding to important objects at runtime, allowing Tamer to generate better error messages.
-o file
Places the output C++ source in file.
-c
Compilation mode: automatically derives the output filename from the input filename. For example, a file named ex1.tt will be compiled into a file named ex1.cc, ex2.tpp will be compiled into ex2.cpp, and so forth.

BUGS AND LIMITATIONS

There are several limitations in handling tamed class member functions. Do not define a tamed member function in the class body. Also, tamed static member function definitions must use the static keyword (this is illegal in normal C++). For example, don’t say this:



class foo { tamed void memfn() { ... }; tamed static void staticmemfn(); }; tamed void foo::staticmemfn() { ... }

Say this:


class foo { tamed void memfn(); tamed static void staticmemfn(); }; tamed void foo::memfn() { ... } tamed static void foo::staticmemfn() { ... }

There are likely remaining bugs in class member functions and template functions.

The tamed keyword must be the first thing in the function declaration.

Tamer preprocessing should happen after the normal C++ preprocessor, but it currently happens before.

AUTHOR

Maxwell Krohn <krohn@mit.edu>: original Tame version
Eddie Kohler <kohler@cs.ucla.edu>: improvements, port to Tamer

SEE ALSO

tamer(3)

Events Can Make Sense. Maxwell Krohn, Eddie Kohler, and Frans Kaashoek. In Proc. USENIX 2007 Annual Technical Conference. Also available at http://www.cs.ucla.edu/~kohler/pubs/krohn07events.pdf

Tamer home