2 |
7u83 |
1 |
.\" Crown Copyright (c) 1997
|
|
|
2 |
.\"
|
|
|
3 |
.\" This TenDRA(r) Manual Page is subject to Copyright
|
|
|
4 |
.\" owned by the United Kingdom Secretary of State for Defence
|
|
|
5 |
.\" acting through the Defence Evaluation and Research Agency
|
|
|
6 |
.\" (DERA). It is made available to Recipients with a
|
|
|
7 |
.\" royalty-free licence for its use, reproduction, transfer
|
|
|
8 |
.\" to other parties and amendment for any purpose not excluding
|
|
|
9 |
.\" product development provided that any such use et cetera
|
|
|
10 |
.\" shall be deemed to be acceptance of the following conditions:-
|
|
|
11 |
.\"
|
|
|
12 |
.\" (1) Its Recipients shall ensure that this Notice is
|
|
|
13 |
.\" reproduced upon any copies or amended versions of it;
|
|
|
14 |
.\"
|
|
|
15 |
.\" (2) Any amended version of it shall be clearly marked to
|
|
|
16 |
.\" show both the nature of and the organisation responsible
|
|
|
17 |
.\" for the relevant amendment or amendments;
|
|
|
18 |
.\"
|
|
|
19 |
.\" (3) Its onward transfer from a recipient to another
|
|
|
20 |
.\" party shall be deemed to be that party's acceptance of
|
|
|
21 |
.\" these conditions;
|
|
|
22 |
.\"
|
|
|
23 |
.\" (4) DERA gives no warranty or assurance as to its
|
|
|
24 |
.\" quality or suitability for any purpose and DERA accepts
|
|
|
25 |
.\" no liability whatsoever in relation to any use to which
|
|
|
26 |
.\" it may be put.
|
|
|
27 |
.\"
|
|
|
28 |
.TH tnc 1
|
|
|
29 |
.SH NAME
|
|
|
30 |
tnc \- TDF notation compiler
|
|
|
31 |
.SH SYNOPSIS
|
|
|
32 |
\fBtnc\fR [ \fIoptions\fR ] \fIinput-file\fR [ \fIoutput-file\fR ]
|
|
|
33 |
.\" ----------------------------------------------------------------------
|
|
|
34 |
.SH DESCRIPTION
|
|
|
35 |
\fBtnc\fR translates TDF capsules to and from text. It has two
|
|
|
36 |
input modes, \fIread\fR and \fIdecode\fR. In the first, which
|
|
|
37 |
is default, \fIinput-file\fR is a file containing TDF text. In
|
|
|
38 |
the second \fIinput-file\fR is a TDF capsule. There are also
|
|
|
39 |
two output mode, \fIencode\fR and \fIwrite\fR. In the first,
|
|
|
40 |
which is default, a TDF capsule is written to \fIoutput-file\fR
|
|
|
41 |
In the second, TDF text is written to \fIoutput-file\fR. If the
|
|
|
42 |
\fIoutput-file\fR argument is absent, the standard output is used
|
|
|
43 |
instead.
|
|
|
44 |
.PP
|
|
|
45 |
Combination of these modes give four actions: text to TDF (which
|
|
|
46 |
is default), TDF to text, text to text, and TDF to TDF. The last
|
|
|
47 |
two actions are not precise identities, but they do give equivalent
|
|
|
48 |
files. The TDF pretty-printer, \fIdisp\fR(1), provides a more
|
|
|
49 |
sophisticated TDF to text translator, although its output cannot be
|
|
|
50 |
used as the input to \fBtnc\fR.
|
|
|
51 |
.PP
|
|
|
52 |
The form of the TDF text format and more information about \fBtnc\fR
|
|
|
53 |
can be found in the document \fIThe TDF Notation Compiler\fR.
|
|
|
54 |
.\" ----------------------------------------------------------------------
|
|
|
55 |
.SH OPTIONS
|
|
|
56 |
.\" ----------------------------------------------------------------------
|
|
|
57 |
.IP \fB-c\fR\ or\ \fB-cv\fR\ or\ \fB-check\fR
|
|
|
58 |
Specifies that \fBtnc\fR should apply extra checks to \fIinput-file\fR.
|
|
|
59 |
For example, simple shape checking is applied. These checks are more
|
|
|
60 |
efficient in \fIread\fR mode than in \fIdecode\fR mode. If the \fB-cv\fR
|
|
|
61 |
option is used in \fIwrite\fR mode, all the information gleaned from the
|
|
|
62 |
shape checking appears in \fIoutput-file\fR.
|
|
|
63 |
.\" ----------------------------------------------------------------------
|
|
|
64 |
.IP \fB-d\fR\ or\ \fB-decode\fR
|
|
|
65 |
Specifies that \fBtnc\fR should be in \fIdecode\fR mode. That is,
|
|
|
66 |
that \fIinput-file\fR is a TDF capsule.
|
|
|
67 |
.\" ----------------------------------------------------------------------
|
|
|
68 |
.IP \fB-e\fR\ or\ \fB-encode\fR
|
|
|
69 |
Specifies that \fBtnc\fR should be in \fIencode\fR mode. That is,
|
|
|
70 |
that \fIoutput-file\fR is a TDF capsule.
|
|
|
71 |
.\" ----------------------------------------------------------------------
|
|
|
72 |
.IP \fB-eval\fR
|
|
|
73 |
Specifies that \fBtnc\fR should simplify its input by evaluating
|
|
|
74 |
constant expressions as far as possible.
|
|
|
75 |
.\" ----------------------------------------------------------------------
|
|
|
76 |
.IP \fB-expand\fR
|
|
|
77 |
Specifies that \fBtnc\fR should expand its input by replacing all
|
|
|
78 |
applications of defined tokens by the token definition.
|
|
|
79 |
.\" ----------------------------------------------------------------------
|
|
|
80 |
.IP \fB-f\fR\ or\ \fB-func\fR
|
|
|
81 |
Causes \fBtnc\fR to use its alternative, functional, form for both input
|
|
|
82 |
and output. The options \fB-func_in\fR and \fB-func_out\fR may be used
|
|
|
83 |
to change the input and the output independently.
|
|
|
84 |
.\" ----------------------------------------------------------------------
|
|
|
85 |
.IP \fB-help\ \fIsubject\fR\ ...
|
|
|
86 |
Makes \fBtnc\fR print its help message on the given subject(s). If no
|
|
|
87 |
subject is given, or the subject is \fIall\fR, all the help messages are
|
|
|
88 |
printed.
|
|
|
89 |
.\" ----------------------------------------------------------------------
|
|
|
90 |
.IP \fB-I\fIdir\fR
|
|
|
91 |
Adds the directory \fIdir\fR to the search path used by \fBtnc\fR to
|
|
|
92 |
find included files in \fIread\fR mode.
|
|
|
93 |
.\" ----------------------------------------------------------------------
|
|
|
94 |
.IP \fB-l\fR\ or\ \fB-lib\fR
|
|
|
95 |
In \fIdecode\fR mode, specifies that \fIinput-file\fR is not a TDF
|
|
|
96 |
capsule, but a TDF library. All the capsules comprising the library
|
|
|
97 |
are decoded.
|
|
|
98 |
.\" ----------------------------------------------------------------------
|
|
|
99 |
.IP \fB-L\fIprefix\fR
|
|
|
100 |
Causes \fBtnc\fR to treat any external identifiers starting with
|
|
|
101 |
\fIprefix\fR to be treated as if they were declare \fBlocal\fR.
|
|
|
102 |
.\" ----------------------------------------------------------------------
|
|
|
103 |
.IP \fB-o\fR\ \fIoutput-file\fR
|
|
|
104 |
Gives an alternative method of specifying the output file.
|
|
|
105 |
.\" ----------------------------------------------------------------------
|
|
|
106 |
.IP \fB-p\fR\ or\ \fB-print\fR
|
|
|
107 |
Specifies that \fBtnc\fR should be in \fIdecode\fR and \fIwrite\fR modes.
|
|
|
108 |
That is, that \fIinput-file\fR is a TDF capsule and \fIoutput-file\fR
|
|
|
109 |
should consist of TDF text. This option makes \fBtnc\fR into a TDF
|
|
|
110 |
pretty-printer.
|
|
|
111 |
.\" ----------------------------------------------------------------------
|
|
|
112 |
.IP \fB-q\fR
|
|
|
113 |
Causes \fBtnc\fR not to check the consistency of multiple tag or token
|
|
|
114 |
definitions.
|
|
|
115 |
.\" ----------------------------------------------------------------------
|
|
|
116 |
.IP \fB-r\fR\ or\ \fB-read\fR
|
|
|
117 |
Specifies that \fBtnc\fR should be in \fIread\fR mode. That is,
|
|
|
118 |
that \fIinput-file\fR should consist of TDF text.
|
|
|
119 |
.\" ----------------------------------------------------------------------
|
|
|
120 |
.IP \fB-t\fR\ or\ \fB-tsimp\fR
|
|
|
121 |
Specifies that \fBtnc\fR should expand its input by replacing all
|
|
|
122 |
applications of defined tokens by the token definition and by evaluating
|
|
|
123 |
constant expressions as far as possible. This is equivalent to
|
|
|
124 |
\fB-expand -eval\fR.
|
|
|
125 |
.\" ----------------------------------------------------------------------
|
|
|
126 |
.IP \fB-V\fR
|
|
|
127 |
In \fIwrite\fR mode, specifies that the output should be in the "verbose"
|
|
|
128 |
form, with no shorthand forms.
|
|
|
129 |
.\" ----------------------------------------------------------------------
|
|
|
130 |
.IP \fB-version\fR
|
|
|
131 |
Makes \fBtnc\fR print its version number and the version of the TDF
|
|
|
132 |
specification it supports.
|
|
|
133 |
.\" ----------------------------------------------------------------------
|
|
|
134 |
.IP \fB-w\fR\ or\ \fB-write\fR
|
|
|
135 |
Specifies that \fBtnc\fR should be in \fIwrite\fR mode. That is,
|
|
|
136 |
that \fIoutput-file\fR should consist of TDF text.
|
|
|
137 |
.\" ----------------------------------------------------------------------
|
|
|
138 |
.SH SEE ALSO
|
|
|
139 |
\fIdisp\fR(1), \fItcc\fR(1).
|
|
|
140 |
.\" ----------------------------------------------------------------------
|