Name
tnc — TDF notation compiler
Synopsis
tnc
[ -a ] [ -c ] [ -f ] [ -I dir ] [ -l ] [ -L prefix ] [ -n name ] [ -o output-file ] [ -q ] [ -t ] [ -u ] [ -V ] [ -x ]
[ input-file [ output-file ] ]
tnc
[ -a ] [ -c ] [ -f ] [ -I dir ] [ -l ] [ -L prefix ] [ -n name ] [ -o output-file ] [ -q ] [ -t ] [ -u ] [ -V ] [ -x ]
[ input-file [ output-file ] ]
tnc
Description
tnc translates TDF capsules to and from text. It has two input modes, read and decode. In the first, which is default, input-file is a file containing TDF text. In the second input-file is a TDF capsule.
There are also three output modes, decode, write and dot. In the first, which is default, a TDF capsule is written to output-file In the second, TDF text is written to output-file. If the output-file argument is absent, the standard output is used instead. dot is the same, except that the output format is Dot, suitable for processing with Graphviz tools.
Combination of these modes give four actions: text to TDF (which is default), TDF to text, text to text, and TDF to TDF. The last two actions are not precise identities, but they do give equivalent files. These actions are summarised below:
Options | Input mode | Output mode | Input files | Output files |
---|---|---|---|---|
read (default) | decode (default) | .p | .j/.t | |
-w | read (default) | write | .p | .p |
-e | read (default) | dot | .p | .dot |
-d | decode | decode (default) | .j/.t | .p |
-dw/-p | decode | write | .j/.t | .p |
-dg | decode | dot | .j/.t | .dot |
-dl | decode | decode (default) | .tl | .p |
-dwl | decode | write | .tl | .j/.t |
If input-file or output-file are not specified, input and output default to stdin
and stdout
respectively.
The TDF pretty-printer, disp, provides a more sophisticated TDF to text translator, although its output cannot be used as the input to tnc.
The form of the TDF text format and more information about tnc can be found in the document The TDF Notation Compiler.