Revision/Update Information: This revised manual supersedes VAX SDL (Structure Definition Language) Version 3.2.
Operating System and Version: OpenVMS Version 7.2 and higher
Software Version: HP SDL Version 2.3
Contents | Index |
This manual describes the HP Structure Definition Language (HP SDL) and the HP SDL translator for use on OpenVMS operating systems. HP SDL source code can be translated to output files in one or more target OpenVMS languages. HP SDL is suitable for systems and application programming environments that use executable programs consisting of modules written in one or multiple OpenVMS programming languages.
This manual is intended for users who are familiar with one or more programming languages and who are currently involved in the design and development of multilanguage programming applications; however, users are not required to have previous experience with HP SDL in order to use this manual.
This manual contains the following chapters and appendixes.
Chapter 1 provides a brief overview of HP SDL and the translation process.
Chapter 2 describes how to create, edit, and process a HP SDL source file using the HP Language-Sensitive Editor (LSE) templates and the SDL command options.
Chapter 3 describes the HP SDL language elements that compose HP SDL declarations.
Chapter 4 describes the function and format of HP SDL declarations.
Appendix A provides a list and descriptions of HP SDL diagnostic messages.
Appendix B shows translation summaries for all output languages supported by HP SDL.
Appendix C is a table showing the ASCII character set.
If HP SDL is installed on your system, an online copy of this manual is contained in SYS$HELP. You can print a copy of the SDL032.LN03 file on a PostScript or .LN03 printer. This file is also contained in the HP SDL kit area, which you can access by contacting your system manager.
If HP SDL is installed on your system, an online example of a HP SDL source file is contained in EXAMPLE.SDL in the public directory SDL$EXAMPLES.
The following conventions are used in this document.
Convention | Meaning |
---|---|
{ STRUCTURE }
{ UNION } |
Stacked items within braces indicate that you must select one of the items. |
[ ] | Simple square brackets indicate that the enclosed item(s) are optional. |
[ COMMON ]
[ GLOBAL ] |
Stacked items within brackets indicate that only one item may be selected. |
MODULE name; | Names shown in uppercase letters in examples and format descriptions are HP SDL keywords that must be entered as shown. Names and syntactic elements shown in lowercase letters represent user-specified names and identifiers. |
arg,... | A comma followed by an ellipsis means that the preceding item may be repeated one or more times, with commas separating two or more items. |
.
. . |
A vertical ellipsis in an example or figure indicates that not all the statements or elements are shown. |
common storage | Boldface words in text are used to introduce or define a new term, or to refer to a term used in a code example. |
$ LSEDIT USER.SDL | In interactive examples, user input is underlined. |
If HP SDL is installed on your system, an online copy of this manual is contained in SYS$HELP.
The technical changes for this version of HP SDL are described in the online release notes file SDL023.RELEASE_NOTES in SYS$HELP (if HP SDL is installed on your system) and in the HP SDL kit area. You can also access the release notes through the HELP file by typing the following command:
$ TYPE SYS$HELP:SDL023.RELEASE_NOTES [RET] |
The following is a summary of technical changes in HP SDL Version 2.3. (For detailed descriptions and a summary of bug fixes, see the online release notes file.)
The following is a summary of new features in HP SDL Version 3.2. (For detailed descriptions, see the online release notes file SDL032.RELEASE_NOTES in SYS$HELP (if HP SDL is installed on your system) and in the HP SDL kit area.)
The HP Structure Definition Language (HP SDL) is used to write source statements that describe data structures and that can be translated to source statements in other languages. You can include the resulting output files in a corresponding target language program for subsequent compilation.
Because HP SDL is compiler- and language-independent, it is particularly useful for maintaining multilanguage implementations. For example, you can create and later modify a single HP SDL source file that can be translated to multilanguage output files; any number of these output files can then be included in one or several multilanguage programming applications.
HP SDL supports the following OpenVMS languages:
The translation of a HP SDL source file occurs when you issue the SDL command (see Section 2.2). The SDL command activates the HP SDL "front-end" translator (SDL$MAIN.EXE), which is stored in the directory SYS$SYSTEM. The front end parses the HP SDL source code and, if you specify the /LANGUAGE qualifier, passes the parse tree to one or more of the HP SDL "back-end" translators. The following table is a list of the back ends that are stored in the directory SYS$SHARE.
Language | Back End |
---|---|
HP Ada | SDL$ADA.EXE |
HP BASIC | SDL$BASIC.EXE |
HP BLISS | SDL$BLISS.EXE |
SDL$BLISSF.EXE 1 | |
HP C/C++ | SDL$CC.EXE |
HP DATATRIEVE | SDL$DTR.EXE |
HP OpenVMS DCL | SDL$DCL.EXE |
HP FORTRAN | SDL$FORTRAN.EXE |
HP MACRO | SDL$MACRO.EXE |
HP Pascal | SDL$PASCAL.EXE |
Kednos PL/I | SDL$PLI.EXE |
SDML | SDL$SDML.EXE |
DECTPU | SDL$TPU.EXE |
UIL | SDL$UIL.EXE |
Each back end translates only those HP SDL declarations that can (or need) be expressed in that language. HP SDL declarations, described in detail in Chapter 4, translate to the following types of data items:
Figure 1-1 shows each step in the HP SDL translation process, and the key following the example describes each step. Section 2.2 describes the SDL command in detail.
Figure 1-1 HP SDL Translation Process
Key to Figure 1-1:
In cases where HP SDL translation must be performed at a customer site, the intermediate .SDI file is included in the software HP sends to customers. |
You can specify any or all of the language options on the /LANGUAGE
qualifier, and HP SDL produces separate output files for each language
specified.
1.2 Description of a Sample HP SDL Source File
Example 1-1 is a typical HP SDL source file, and the key following the example describes each of the numbered language elements. (Chapter 3 describes all the language elements in detail.) You may want to familiarize yourself with this example because it shows the source file you will be creating in the LSE tutorial in Section 2.1.2.
Example 1-1 Sample HP SDL Source File |
---|
MODULE opr_descriptor IDENT "Version 2.0";(1) /* define constants and node structure for operators;(2) #max_args = 10;(3) CONSTANT (fixed_binary,floating,char,untyped) EQUALS 1 INCREMENT 1;(4) AGGREGATE operator STRUCTURE(5) PREFIX "opr_";(6) flink ADDRESS;(7) blink ADDRESS; opcount WORD; optype CHARACTER LENGTH 1; id WORD; operands LONGWORD DIMENSION 0:#max_args-1;(8) END operator; #opsize = .;(9) CONSTANT opr_node_size EQUALS #opsize / 2; ITEM current_node_ptr(10) ADDRESS(11) GLOBAL;(12) END_MODULE opr_descriptor;(13) |
Key to Example 1-1:
Example 1-2 shows the Kednos PL/I output file that results from translation of the HP SDL source file shown in Example 1-1.
Example 1-2 Kednos PL/I Output File for the Sample HP SDL Source File |
---|
/************************************************************************** /* Created 17-AUG-2007 11:23:49 by OpenVMS SDL EV2-3 Source: 13-AUG-2007 08:37:41 FOO$:[DIR]TEST.SDL /************************************************************************** /*** MODULE opr_descriptor IDENT Version 2.0 ***/ /* define constants and node structure for operators; */ %replace fixed_binary by 1; %replace floating by 2; %replace char by 3; %replace untyped by 4; %replace opr_s_operator by 53; dcl 1 operator based, 2 opr_a_flink pointer, 2 opr_a_blink pointer, 2 opr_w_opcount fixed binary(15), 2 opr_t_optype character(1), 2 opr_w_id fixed binary(15), 2 opr_l_operands (0:9) fixed binary(31); %replace opr_node_size by 26; dcl current_node_ptr pointer globalref; |
Chapter 3 describes all the HP SDL language elements, and Chapter 4 describes the function and format of each of the HP SDL declarations.
Next | Contents | Index |