This chapter details the keywords, lexical conventions, and grammar used in NetZ DDL files.
Code 15.1 DDL Keywords
action
adapter
class
classproperty: (concrete)
dataset
doclass
doclassproperty: (code, globaldo)
dsproperty: (code, dsdecl, updatefilter)
dupspace
in
out
publisher
subscriber
title
type: (array, bool, byte, char, cstr, datetime, dohandle, double, float, int8, int16, int32, int64, list, qbuffer, qchar8, qchar16, qqueue, qmap, qresult, qbuffer, qlist, memberlist, memberqueue, membervector, real, stationurl, string, unit16, uint32, uint64, qvector, vector3d)
void
wellknown
Code 15.2 DDL Lexical Conventions
identifier [a-zA-Z_][0-9a-zA-Z_]*
stringtitle \"[^\n\"]*[\"\n]
decimal_constant [1-9][0-9]*
comments "//"[^\n]*
Code 15.3 DDL Grammar
ddl_file: sentence_list
sentence_list:
sentence
| sentence_list sentence
sentence:
wellknown_sentence
| title_sentence
| dataset_decl
| doclass_decl
| adapter_decl
| dupspace_decl
| type_decl
| property_decl
| class_decl
|
title_sentence:
titletitle ';'
title:
string
wellknown_sentence:
wellknown identifier identifier';'
dataset_decl:
dataset identifier'{' dataset_member_list '}' property_list_opt ';'
dataset_member_list:
dataset_member
| dataset_member_list dataset_member
dataset_member:
attribute_decl ';'
attribute_decl:
type identifierarray_size_opt
template_attribute_list:
template_attribute_list ',' template_attribute
| template_attribute
template_attribute:
type
property:
identifier
property_list:
property_list ',' property
| property
property_list_opt:
property_list
|
dupspace_decl:
DUPSPACE IDENTIFIER ';'
type_decl:
type_simple_decl | type_template_decl
type_simple_decl:
TYPE IDENTIFIER ';'
type_template_decl:
TYPE IDENTIFIER '<' template_type_list '>' ';'
type_template_list:
template_type_list ',' template_type
| template_type
template_type:
IDENTIFIER { };
property_decl:
property_decl_keyword IDENTIFIER ':' property_description ';'
property_decl_keyword:
DSPROPERTY
| CLASSPROPERTY
| DOCLASSPROPERTY
| PROPERTY
base_class_opt:
':' IDENTIFIER
|
class_decl:
CLASS IDENTIFIER base_class_opt '{' class_member_list '}'
property_list_opt ';'
class_member_list:
class_member_list class_member
|
class_member:
attribute_decl ';'
property_description:
CODE
| DSDECL
| UPDATEFILTER
adapter_decl:
adapter identifier parent_adapter_opt '';''
parent_adapter_opt:
';' identifier '
doclass_decl:
doclass identifierbase_doclass_opt '{' doclass_member_list '}'
property_list_opt ';'
base_doclass_opt:
':' identifier
|
doclass_member_list:
doclass_member
| doclass_member_list doclass_member
doclass_member:
dataset_attribute_decl
| action_decl_opt
| rmc_decl_opt
| dupspace_reg_decl
|
dataset_attribute_decl:
identifier identifier';'
action_decl:
actionaction_method_name'(' action_parameter_list_opt')'';'
action_method_name:
identifier
action_parameter_list_opt:
action_parameter_list
|
action_parameter_list:
parameter_decl
| action_parameter_list ',' parameter_decl
parameter_decl:
type identifier array_size_opt
rmc_decl:
VOID rmc_method_name'(' rmc_parameter_list_opt')'';'
| IDENTIFIER rmc_method_name '(' rmc_parameter_list_opt ')' ';'
rmc_method_name:
identifier
rmc_parameter_list_opt:
rmc_parameter_list
|
rmc_parameter_list:
rmc_parameter_decl
| rmc_parameter_list ',' rmc_parameter_decl
rmc_parameter_decl:
rmc_inoutspecifier_list type identifier array_size_opt
rmc_inoutspecifier_list:
rmc_inoutspecifier
| rmc_inoutspecifier_list rmc_inoutspecifier
rmc_inoutspecifier:
IN
| OUT
|
array_size:
'[' int_value ']'
array_size_opt:
array_size
|
type:
IDENTIFIER
| IDENTIFIER '<' template_attribute_list '>'
simple_type:
identifier
The following table lists the possible DDL compiler errors and warnings, and their causes.
Code | Error Message | Reason |
---|---|---|
Error C1 | Undeclared base class identifier. | The class named identifier is not declared in the DDL. |
Error C2 | Well-known DOClass identifier already used. |
Two well-known classes cannot have the same name. |
Error C3 | identifier ID already taken. | An ID cannot be used more than once. |
Error C4 | Array size should be greater than 1. | The declared size of any array must be greater than 1. |
Error C7 | identifier is incompatible with identifier. | The update qualifiers chosen are incompatible with each other. |
Error C8 | Property identifier cannot be used in an identifier declaration. | The declared property is not valid for this type of declaration. |
Error C11 | Title is invalid. | The application title must be included within parentheses. |
Error C12 | Title must be specified in DDL file. | The application title was not specified in the DDL. It is essential to do so. |
Error C13 | Title defined twice. | The application title has been defined twice. |
Error C14 | Invalid keyword identifier. | Keyword identifier is invalid. |
Error C15 | Dataset identifier already declared. | Two datasets cannot have the same name. |
Error C16 | DOClass identifier already declared. |
Two doclasses cannot have the same name. |
Error C17 | A dataset cannot contain a container and have an update flag of the type extrapolation_filter or unreliable . |
A dataset with a container cannot be extrapolated or sent over an unreliable channel. |
Error C18 | Dataset identifier cannot be unreliable and larger than max_size bytes (-v for details). |
A dataset sent over an unreliable channel cannot contain more than 3584 bytes of data. Recompile using the -v switch to get more details about data usage for every dataset class. |
Error C19 | Reserved. (Not normally used.) | |
Error C20 | identifier already specified. | One of the RMC modifiers (in, out, or in out) was specified twice. |
Error C21 | Dataset identifier contains a type that cannot be extrapolated. (Only int32 , int16 , int8 , float , and double can be extrapolated.) |
An extrapolated dataset may contain only the data types int8 , int16 , uint16 , int32 , uint32 , float , or double . |
Error C22 | A doclass can inherit only from another doclass . |
The only class a doclass can inherit from is another doclass . |
Error C23 | A class can inherit only from another class. | The declared class inheritance is invalid. Ensure that the class inherits from another class. |
Error C24 | Use of an obsolete type. It has been replaced with identifier. | The valid DDL Data Types are: int , uint , int8 , int16 , uint16 , int32 , uint32 , int64 , uint64 , char , char8 , char16 , float , double , bool , byte , dohandle , real , and an array of these types. The special data types string and the containers membervector , memberlist , and memberqueue are also supported. |
Error C26 | An adapter can only inherit from another adapter. | The only class an adapter can inherit from is another adapter . |
Error C28 | identifier already declared. | The variable has already been declared. A DOClass , Dataset , type , and so on cannot have the same name as a DDL file. |
Error C29 | Type identifier is unknown. | The declared type is unknown or invalid. |
Error C30 | identifier is not a type. | identifier is not a valid type. |
Error C32 | Datasets with a loopback must use an extrapolation filter. | Loopback can only be specified for extrapolated datasets. |
Error C33 | Property identifier is unknown. | The declared update policy is unknown or invalid. |
Error C34 | Invalid syntax using cstr type. Array required. |
The cstr type requires an array data type. |
Error C35 | cstr cannot be used as a return type. |
cstr is invalid as a return type. Use another type. |
Error C36 | cstr cannot be used as a container type. |
cstr is not a valid container type. Use another type. |
Error C37 | identifier is not a template type. | This type is not a template type. |
Error C38 | Incorrect number of template arguments using type identifier. | An incorrect number of arguments was specified. |
Error C50 | identifier near identifier. | Syntax error. |
CONFIDENTIAL