Next: Models | Up: Table of Contents | Previous: Introduction
TML is a case-sensitive language. The names of models, states, stimuli, and the capitalization of keywords are all significant.
Arbitrary whitespace can be included in files. With two exceptions (the single-line comment and label), excess newlines, spaces, and tabs are ignored.
TML files can be commented using C and C++ style comments. A single-line comment begins with // and extends to the end of line. A multi-line comment begins with /* and extends to the token */. Multiline comments may not be nested in TML. For this reason, it is recommended that the single-line form be used throughout models, and the multi-line form be used only for long comments at the top of a model and to "comment-out" states and arcs of a model.
The following is an example model in TML. Don't worry about the content just yet; just note the comment style and formatting.
/* This is a long comment. It ends with this token. --> */ // This is a single-line comment. It ends here. // Formatting is arbitrary. This model is declared // all on one line (probably not a good idea). model HugeModelByStacy [Enter] "Do Nothing" [Exit] end
Figure 1: Example model
TML source files should use the extension .tml, and should each contain a single model whose name is the same as the base file name. Thus the model HugeModelByStacy should be in a file named HugeModelByStacy.tml. Note that the .tml extension is also case-sensitive.