Data Definition Language (DDL) Reference Manual

SPI Tokens
Data Definition Language (DDL) Reference Manual529431-004
7-5
TOKEN-TYPE Statement Output
TOKEN-TYPE Statement Output
If you request C, COBOL, Pascal (on D-series systems), pTAL, TACL, or TAL source
code, the DDL compiler generates compatible data structures for the requested
language. The SPI routines can use these token-type data structures to identify a
token and its type.
The data structures the DDL compiler generates for token types in each language are:
The DDL compiler replaces any hyphen in a DDL name with a circumflex (^) in a TAL
LITERAL name or in a TACL STRUCT name, and with an underscore (_) in a C
#define name or in a Pascal defined constant name.
Standard SPI TOKEN-TYPE Definitions
SPI defines a set of standard token types. The names of standard SPI token types
have the format:
Zsss-TYP-name
In this format, the letter Z indicates that the token type is defined by HP, sss is a
subsystem name or is SPI for a standard SPI name, and name identifies the token
type.
The file ZSPIDEF.ZSPIDDL on the disk volume chosen for your system contains the
DDL definitions of the standard SPI token types. To use the standard SPI definitions,
compile this file into your dictionary, using the DDL SOURCE command. For a
complete description of the standard SPI token types, see the SPI Programming
Manual and the SPI Common Extensions Manual.
You can use the standard token types where applicable, or you can define your own
token types. When you define a token type specifically for your own subsystem, do not
begin its name with the letter Z; this ensures that your token-type name will not be the
same as a current or future name supplied by HP.
Language Data Structure
C
#define TYPE_NAME value
COBOL
01 type-name NATIVE-2 VALUE IS value
Pascal (on D-series systems)
CONST type-name = value
TACL
? Section type^name Struct
BEGIN
INT value
END;
pTAL or TAL
Literal type^name = value