Γö£Γö¼ΓöÇ / ΓöÇΓö¼Γö¼ΓöÇ E ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéΓööΓöÇ - ΓöÇΓöÿΓööΓöÇ e ΓöÇΓöÿ ΓööΓöÇ error-file ΓöÇΓöÿ Γöé
Γöé Γöé
Γö£Γö¼ΓöÇ / ΓöÇΓö¼Γö¼ΓöÇ T ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ tbl-file ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£Γö¼ΓöÇ / ΓöÇΓö¼Γö¼ΓöÇ W ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ warn-level ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéΓööΓöÇ - ΓöÇΓöÿΓööΓöÇ w ΓöÇΓöÿ Γöé
Γöé Γöé
ΓööΓö¼ΓöÇ / ΓöÇΓö¼Γö¼ΓöÇ D ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓööΓöÇ - ΓöÇΓöÿΓööΓöÇ d ΓöÇΓöÿ ΓööΓöÇ debug-file ΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 7.2. GDSASN1 Compiler Input ΓòÉΓòÉΓòÉ
The input of the GDSASN1 compiler is a text file containing the ASN.1
specification of the data stream structure (for a description of the ASN.1
notation click here).
If a source file is not specified, the GDSASN1 compiler reads its input from
standard input, which is normally the console.
To facilitate use of ASN.1 definitions within IBM Script and BookMaster
documents, the compiler provides the SCRIPT option. With the SCRIPT option in
effect:
o The compiler skips all source lines outside of ASN.1 sections. An ASN.1
section is introduced with a source line of the form .* asn.1 on". The .*
must begin in columns one and two, asn.1 and on are separated by one or more
spaces and may be uppercase or lowercase. An ASN.1 section is terminated with
a source line of the form .* asn.1 off. Note that these two lines appear as
comments to the Script or BookMaster processor. A source file can have
multiple ASN.1 sections with no importance placed on where the section breaks
occur with respect to the ASN.1 definitions.
o Within an ASN.1 section, the following symbols are allowed, but not required,
in place of their single character equivalents:
- &lbrc. or &lbrace. for {
- &rbrc. or &rbrace. for }
- &lbrk. or &lbracket. for [
- &rbrk. or &rbracket. for ]
- &gml. for :
- &colon. for :
- &period. or &dot. for .
- &eq. or &equals. or &eqsym. for =
- &percent. for %
- &tab. or &rbl. for a space
- &us. for _ (underscore)
o The above substitutions are made inside character string constants, but are
not made within ASN.1 comments.
o Within an ASN.1 section, the compiler will ignore any line that begins with a
period or a colon in column one. If you absolutely need to begin a line with
a period or a colon that is part of an ASN.1 symbol, use &period. or &colon.
to avoid having the compiler ignore the line.
Note that the above facilities are only in effect when the SCRIPT option is
invoked. Otherwise, the source file is assumed to contain only valid ASN.1
statements without script symbols and ASN.1 sections.
ΓòÉΓòÉΓòÉ 7.3. GDSASN1 Compiler Output ΓòÉΓòÉΓòÉ
The ouput of the GDSASN1 compiler consists of:
o GDSASN1 compiler return codes and messages
o Symbol table and Metatable file (.TBL file)
o GDSASN1 compiler debugging information
ΓòÉΓòÉΓòÉ 7.3.1. GDSASN1 Compiler Return Codes and Messages ΓòÉΓòÉΓòÉ
If the error-file option is not specified, the error output is directed to the
standard output file, which is normally the console.
The error ouput file is a file containing the errors and warning and
informational messages about the ASN.1 compilation. For each message the
following information are listed:
o The number of line in the source file where the error has been found
o The number of column inside the line where there is the item in error
o The code of the error and its level of severity
o A brief description of the error
(Click here for a list of all the messages.).
The message severity ranges from 1 to 4:
o Level 1 messages are informational in nature
o Level 2 messages are warnings that indicate run-time limitations
o Level 3 messages are warnings that indicate questionable use of the ASN.1
language
o Level 4 messages are errors in the ASN.1 source or internally detected
compiler errors
ΓòÉΓòÉΓòÉ 7.3.2. Symbol Table and Metatable File (.TBL file) ΓòÉΓòÉΓòÉ
This is a text file in a specific format, which from now will be called TBL
format (for a detailed description of the format of .TBL file click here). The
.TBL file contains a Metatable and Symbol Table definitions corresponding to
the compiled ASN.1 source file. The TBL format is character data that is
intended to be portable. In fact, machine independence is gained by only using
character forms for all data types, including those for decimal numbers and
some special types, such as for object identifier values. In this way the TBL
format represents an intermediate form: it is more compact and has more
embedded information than the original ASN.1 source, but it is still as
machine-independent as is possible. This allows the GDSASN1 Compiler to be
hosted on one type of computer to generate Metatable and Symbol Table
information for use by the user application on a different system. The
translation of .TBL file into a format readable by run-time routines is
performed by the GDSTABLE program.
The Symbol Table contains the names defined in all the modules of the ASN.1
source.
The Metatable represents the syntactic structure of the ASN.1 definitions. In
fact the structure of the Metatable is directly related to the ASN.1 statements
from which it is derived. A Metatable is produced for each ASN.1 module defined
in the source.
ΓòÉΓòÉΓòÉ 7.3.3. GDSASN1 Compiler Debugging Information ΓòÉΓòÉΓòÉ
If the -d option is specified, the GDSASN1 compiler produces debugging
information consisting of a trace of the operation performed during the parsing
process. If a debug-file is not specified, the debugging output is directed to
the standard output.
ΓòÉΓòÉΓòÉ 8. Metatable and Symbol Table Translator ΓòÉΓòÉΓòÉ
The Metatable and Symbol Table translator (GDSTABLE program) translates the
.TBL file (generated by the GDSASN1 Compiler) into two other files, containing
the same information as the .TBL file: a .DAT file, a .C file or both. This
translation is needed because the .TBL file format is not efficient for the
runtime environment. Moreover, this translation provides the bridge between the
compilation environment for the ASN.1 syntax and the execution environment of
the User Application Program, which must perform encoding and decoding
operations per ASN.1 specifications.
The .DAT file and .C file contain the same information, structured in the same
manner. The difference between .DAT file and .C file consists of their format
and of how they are used by the User Application Program. In fact, the UAP can
read at runtime the .DAT file, it can include the .C file, or it can be linked
together with the compiled .C file.
For the details of the .DAT file structure click here
ΓòÉΓòÉΓòÉ 8.1. Invoking the Translator ΓòÉΓòÉΓòÉ
This section describes how to invoke the GDSTABLE translator on different
systems.
ΓòÉΓòÉΓòÉ 8.1.1. AIX/6000 Version ΓòÉΓòÉΓòÉ
The syntax for invoking the Metatable and Symbol Table translator from an AIX