tnc1
Tdf notation compiler
Usage
tnc [options]
input-file
[output-file]
Overview
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 two output mode, encode and write. 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.
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. The TDF pretty-printer, disp(1), 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.
Options
-
-c or -cv or -check -
Specifies that
tncshould apply extra checks to input-file. For example, simple shape checking is applied. These checks are more efficient in read mode than in decode mode. If the-cvoption is used in write mode, all the information gleaned from the shape checking appears in output-file.
-
-d or -decode -
Specifies that
tncshould be in decode mode. That is, that input-file is a TDF capsule.
-
-e or -encode -
Specifies that
tncshould be in encode mode. That is, that output-file is a TDF capsule.
-
-eval -
Specifies that
tncshould simplify its input by evaluating constant expressions as far as possible.
-
-expand -
Specifies that
tncshould expand its input by replacing all applications of defined tokens by the token definition.
-
-f or -func -
Causes
tncto use its alternative, functional, form for both input and output. The options-func_inand-func_outmay be used to change the input and the output independently.
- -help subject ...
-
Makes
tncprint its help message on the given subject(s). If no subject is given, or the subject is all, all the help messages are printed.
-
-Idir -
Adds the directory dir to the search path used by
tncto find included files in read mode.
-
-l or -lib -
In decode mode, specifies that input-file is not a TDF capsule, but a TDF library. All the capsules comprising the library are decoded.
-
-Lprefix -
Causes
tncto treat any external identifiers starting with prefix to be treated as if they were declarelocal.
-
-o output-file -
Gives an alternative method of specifying the output file.
-
-p or -print -
Specifies that
tncshould be in decode and write modes. That is, that input-file is a TDF capsule and output-file should consist of TDF text. This option makestncinto a TDF pretty-printer.
-
-q -
Causes
tncnot to check the consistency of multiple tag or token definitions.
-
-r or -read -
Specifies that
tncshould be in read mode. That is, that input-file should consist of TDF text.
-
-t or -tsimp -
Specifies that
tncshould expand its input by replacing all applications of defined tokens by the token definition and by evaluating constant expressions as far as possible. This is equivalent to -expand -eval.
-
-V -
In write mode, specifies that the output should be in the "verbose" form, with no shorthand forms.
-
-version -
Makes
tncprint its version number and the version of the TDF specification it supports.
-
-w or -write -
Specifies that
tncshould be in write mode. That is, that output-file should consist of TDF text.
Releases
Unchanged in 6 releases since Debian 2.2 (Potato).