1;; iso-10303-11:1994
2
3  0 ABS = 'abs' .
4  1 ABSTRACT = 'abstract' .
5  2 ACOS = 'acos' .
6  3 AGGREGATE = 'aggregate' .
7  4 ALIAS = 'alias' .
8  5 AND = 'and' .
9  6 ANDOR = 'andor' .
10  7 ARRAY = 'array' .
11  8 AS = 'as' .
12  9 ASIN = 'asin' .
13 10 ATAN = 'atan' .
14 11 BAG = 'bag' .
15 12 BEGIN = 'begin' .
16 13 BINARY = 'binary' .
17 14 BLENGTH = 'blength' .
18 15 BOOLEAN = 'boolean' .
19 16 BY = 'by' .
20 17 CASE = 'case' .
21 18 CONSTANT = 'constant' .
22 19 CONST_E = 'const_e' .
23 20 CONTEXT = 'context' .
24 21 COS = 'cos' .
25 22 DERIVE = 'derive' .
26 23 DIV = 'div' .
27 24 ELSE = 'else' .
28 25 END = 'end' .
29 26 END_ALIAS = 'end_alias' .
30 27 END_CASE = 'end_case' .
31 28 END_CONSTANT = 'end_constant' .
32 29 END_CONTEXT = 'end_context' .
33 30 END_ENTITY = 'end_entity' .
34 31 END_FUNCTION = 'end_function' .
35 32 END_IF = 'end_if' .
36 33 END_LOCAL = 'end_local' .
37 34 END_MODEL = 'end_model' .
38 35 END_PROCEDURE = 'end_procedure' .
39 36 END_REPEAT = 'end_repeat' .
40 37 END_RULE = 'end_rule' .
41 38 END_SCHEMA = 'end_schema' .
42 39 END_TYPE = 'end_type' .
43 40 ENTITY = 'entity' .
44 41 ENUMERATION = 'enumeration' .
45 42 ESCAPE = 'escape' .
46 43 EXISTS = 'exists' .
47 44 EXP = 'exp' .
48 45 FALSE = 'false' .
49 46 FIXED = 'fixed' .
50 47 FOR = 'for' .
51 48 FORMAT = 'format' .
52 49 FROM = 'from' .
53 50 FUNCTION = 'function' .
54 51 GENERIC = 'generic' .
55 52 HIBOUND = 'hibound' .
56 53 HIINDEX = 'hiindex' .
57 54 IF = 'if' .
58 55 IN = 'in' .
59 56 INSERT = 'insert' .
60 57 INTEGER = 'integer' .
61 58 INVERSE = 'inverse' .
62 59 LENGTH = 'length' .
63 60 LIKE = 'like' .
64 61 LIST = 'list' .
65 62 LOBOUND = 'lobound' .
66 63 LOCAL = 'local' .
67 64 LOG = 'log' .
68 65 LOG10 = 'log10' .
69 66 LOG2 = 'log2' .
70 67 LOGICAL = 'logical' .
71 68 LOINDEX = 'loindex' .
72 69 MOD = 'mod' .
73 70 MODEL = 'model' .
74 71 NOT = 'not' .
75 72 NUMBER = 'number' .
76 73 NVL = 'nvl' .
77 74 ODD = 'odd' .
78 75 OF = 'of' .
79 76 ONEOF = 'oneof' .
80 77 OPTIONAL = 'optional' .
81 78 OR = 'or' .
82 79 OTHERWISE = 'otherwise' .
83 80 PI = 'pi' .
84 81 PROCEDURE = 'procedure' .
85 82 QUERY = 'query' .
86 83 REAL = 'real' .
87 84 REFERENCE = 'reference' .
88 85 REMOVE = 'remove' .
89 86 REPEAT = 'repeat' .
90 87 RETURN = 'return' .
91 88 ROLESOF = 'rolesof' .
92 89 RULE = 'rule' .
93 90 SCHEMA = 'schema' .
94 91 SELECT = 'select' .
95 92 SELF = 'self' .
96 93 SET = 'set' .
97 94 SIN = 'sin' .
98 95 SIZEOF = 'sizeof' .
99 96 SKIP = 'skip' .
100 97 SQRT = 'sqrt' .
101 98 STRING = 'string' .
102 99 SUBTYPE = 'subtype' .
103100 SUPERTYPE = 'supertype' .
104101 TAN = 'tan' .
105102 THEN = 'then' .
106103 TO = 'to' .
107104 TRUE = 'true' .
108105 TYPE = 'type' .
109106 TYPEOF = 'typeof' .
110107 UNIQUE = 'unique' .
111108 UNKNOWN = 'unknown' .
112109 UNTIL = 'until' .
113110 USE = 'use' .
114111 USEDIN = 'usedin' .
115112 VALUE = 'value' .
116113 VALUE_IN = 'value_in' .
117114 VALUE_UNIQUE = 'value_unique' .
118115 VAR = 'var' .
119116 WHERE = 'where' .
120117 WHILE = 'while' .
121118 XOR = 'xor' .
122119 bit = '0' | '1' .
123120 digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' .
124121 digits = digit { digit } .
125122 encoded_character = octet octet octet octet .
126123 hex_digit = digit | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' .
127124 letter = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' .
128125 lparen_not_star = '(' not_star .
129126 not_lparen_star = not_paren_star | ')' .
130127 not_paren_star = letter | digit | not_paren_star_special .
131128 not_paren_star_quote_special = '!' | '"' | '#' | '$' | '%' | '&' | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | '[' | '\' | ']' | '^' | '_' | '`' | '{' | '|' | '}' | '~' .
132129 not_paren_star_special = not_paren_star_quote_special | '''' .
133130 not_quote = not_paren_star_quote_special | letter | digit | '(' | ')' | '*' .
134131 not_rparen = not_paren_star | '*' | '(' .
135132 not_star = not_paren_star | '(' | ')' .
136133 octet = hex_digit hex_digit .
137134 special = not_paren_star_quote_special | '(' | ')' | '*' | '''' .
138135 star_not_rparen = '*' not_rparen .
139136 binary_literal = '%' bit { bit } .
140137 encoded_string_literal = '"' encoded_character { encoded_character } '"' .
141138 integer_literal = digits .
142139 real_literal = digits '.' [ digits ] [ 'e' [ sign ] digits ] .
143140 simple_id = letter { letter | digit | '_' } .
144141 simple_string_literal = \q { ( \q \q ) | not_quote | \s | \o } \q .
145142 embedded_remark = '(*' { not_lparen_star | lparen_not_star | star_not_rparen | embedded_remark } '*)' .
146143 remark = embedded_remark | tail_remark .
147144 tail_remark = '--' { \a | \s | \o } \n .
148145 attribute_ref = attribute_id .
149146 constant_ref = constant_id .
150147 entity_ref = entity_id .
151148 enumeration_ref = enumeration_id .
152149 function_ref = function_id .
153150 parameter_ref = parameter_id .
154151 procedure_ref = procedure_id .
155152 schema_ref = schema_id .
156153 type_label_ref = type_label_id .
157154 type_ref = type_id .
158155 variable_ref = variable_id .
159156 abstract_supertype_declaration = ABSTRACT SUPERTYPE [ subtype_constraint ] .
160157 actual_parameter_list = '(' parameter { ',' parameter } ')' .
161158 add_like_op = '+' | '-' | OR | XOR .
162159 aggregate_initializer = '[' [ element { ',' element } ] ']' .
163160 aggregate_source = simple_expression .
164161 aggregate_type = AGGREGATE [ ':' type_label ] OF parameter_type .
165162 aggregation_types = array_type | bag_type | list_type | set_type .
166163 algorithm_head = { declaration } [ constant_decl ] [ local_decl ] .
167164 alias_stmt = ALIAS variable_id FOR general_ref { qualifier } ';' stmt { stmt } END_ALIAS ';' .
168165 array_type = ARRAY bound_spec OF [ OPTIONAL ] [ UNIQUE ] base_type .
169166 assignment_stmt = general_ref { qualifier } ':=' expression ';' .
170167 attribute_decl = attribute_id | qualified_attribute .
171168 attribute_id = simple_id .
172169 attribute_qualifier = '.' attribute_ref .
173170 bag_type = BAG [ bound_spec ] OF base_type .
174171 base_type = aggregation_types | simple_types | named_types .
175172 binary_type = BINARY [ width_spec ] .
176173 boolean_type = BOOLEAN .
177174 bound_1 = numeric_expression .
178175 bound_2 = numeric_expression .
179176 bound_spec = '[' bound_1 ':' bound_2 ']' .
180177 built_in_constant = CONST_E | PI | SELF | '?' .
181178 built_in_function = ABS | ACOS | ASIN | ATAN | BLENGTH | COS | EXISTS | EXP | FORMAT | HIBOUND | HIINDEX | LENGTH | LOBOUND | LOINDEX | LOG | LOG2 | LOG10 | NVL | ODD | ROLESOF | SIN | SIZEOF | SQRT | TAN | TYPEOF | USEDIN | VALUE | VALUE_IN | VALUE_UNIQUE .
182179 built_in_procedure = INSERT | REMOVE .
183180 case_action = case_label { ',' case_label } ':' stmt .
184181 case_label = expression .
185182 case_stmt = CASE selector OF { case_action } [ OTHERWISE ':' stmt ] END_CASE ';' .
186183 compound_stmt = BEGIN stmt { stmt } END ';' .
187184 constant_body = constant_id ':' base_type ':=' expression ';' .
188185 constant_decl = CONSTANT constant_body { constant_body } END_CONSTANT ';' .
189186 constant_factor = built_in_constant | constant_ref .
190187 constant_id = simple_id .
191188 constructed_types = enumeration_type | select_type .
192189 declaration = entity_decl | function_decl | procedure_decl | type_decl .
193190 derived_attr = attribute_decl ':' base_type ':=' expression ';' .
194191 derive_clause = DERIVE derived_attr { derived_attr } .
195192 domain_rule = [ label ':' ] logical_expression .
196193 element = expression [ ':' repetition ] .
197194 entity_body = { explicit_attr } [ derive_clause ] [ inverse_clause ] [ unique_clause ] [ where_clause ] .
198195 entity_constructor = entity_ref '(' [ expression { ',' expression } ] ')' .
199196 entity_decl = entity_head entity_body END_ENTITY ';' .
200197 entity_head = ENTITY entity_id [ subsuper ] ';' .
201198 entity_id = simple_id .
202199 enumeration_id = simple_id .
203200 enumeration_reference = [ type_ref '.' ] enumeration_ref .
204201 enumeration_type = ENUMERATION OF '(' enumeration_id { ',' enumeration_id } ')' .
205202 escape_stmt = ESCAPE ';' .
206203 explicit_attr = attribute_decl { ',' attribute_decl } ':' [ OPTIONAL ] base_type ';' .
207204 expression = simple_expression [ rel_op_extended simple_expression ] .
208205 factor = simple_factor [ '**' simple_factor ] .
209206 formal_parameter = parameter_id { ',' parameter_id } ':' parameter_type .
210207 function_call = ( built_in_function | function_ref ) [ actual_parameter_list ] .
211208 function_decl = function_head [ algorithm_head ] stmt { stmt } END_FUNCTION ';' .
212209 function_head = FUNCTION function_id [ '(' formal_parameter { ';' formal_parameter } ')' ] ':' parameter_type ';' .
213210 function_id = simple_id .
214211 generalized_types = aggregate_type | general_aggregation_types | generic_type .
215212 general_aggregation_types = general_array_type | general_bag_type | general_list_type | general_set_type .
216213 general_array_type = ARRAY [ bound_spec ] OF [ OPTIONAL ] [ UNIQUE ] parameter_type .
217214 general_bag_type = BAG [ bound_spec ] OF parameter_type .
218215 general_list_type = LIST [ bound_spec ] OF [ UNIQUE ] parameter_type .
219216 general_ref = parameter_ref | variable_ref .
220217 general_set_type = SET [ bound_spec ] OF parameter_type .
221218 generic_type = GENERIC [ ':' type_label ] .
222219 group_qualifier = '\' entity_ref .
223220 if_stmt = IF logical_expression THEN stmt { stmt } [ ELSE stmt { stmt } ] END_IF ';' .
224221 increment = numeric_expression .
225222 increment_control = variable_id ':=' bound_1 TO bound_2 [ BY increment ] .
226223 index = numeric_expression .
227224 index_1 = index .
228225 index_2 = index .
229226 index_qualifier = '[' index_1 [ ':' index_2 ] ']' .
230227 integer_type = INTEGER .
231228 interface_specification = reference_clause | use_clause .
232229 interval = '{' interval_low interval_op interval_item interval_op interval_high '}' .
233230 interval_high = simple_expression .
234231 interval_item = simple_expression .
235232 interval_low = simple_expression .
236233 interval_op = '<' | '<=' .
237234 inverse_attr = attribute_decl ':' [ ( SET | BAG ) [ bound_spec ] OF ] entity_ref FOR attribute_ref ';' .
238235 inverse_clause = INVERSE inverse_attr { inverse_attr } .
239236 label = simple_id .
240237 list_type = LIST [ bound_spec ] OF [ UNIQUE ] base_type .
241238 literal = binary_literal | integer_literal | logical_literal | real_literal | string_literal .
242239 local_decl = LOCAL local_variable { local_variable } END_LOCAL ';' .
243240 local_variable = variable_id { ',' variable_id } ':' parameter_type [ ':=' expression ] ';' .
244241 logical_expression = expression .
245242 logical_literal = FALSE | TRUE | UNKNOWN .
246243 logical_type = LOGICAL .
247244 multiplication_like_op = '*' | '/' | DIV | MOD | AND | '||' .
248245 named_types = entity_ref | type_ref .
249246 named_type_or_rename = named_types [ AS ( entity_id | type_id ) ] .
250247 null_stmt = ';' .
251248 number_type = NUMBER .
252249 numeric_expression = simple_expression .
253250 one_of = ONEOF '(' supertype_expression { ',' supertype_expression } ')' .
254251 parameter = expression .
255252 parameter_id = simple_id .
256253 parameter_type = generalized_types | named_types | simple_types .
257254 population = entity_ref .
258255 precision_spec = numeric_expression .
259256 primary = literal | ( qualifiable_factor { qualifier } ) .
260257 procedure_call_stmt = ( built_in_procedure | procedure_ref ) [ actual_parameter_list ] ';' .
261258 procedure_decl = procedure_head [ algorithm_head ] { stmt } END_PROCEDURE ';' .
262259 procedure_head = PROCEDURE procedure_id [ '(' [ VAR ] formal_parameter { ';' [ VAR ] formal_parameter } ')' ] ';' .
263260 procedure_id = simple_id .
264261 qualifiable_factor = attribute_ref | constant_factor | function_call | general_ref | population .
265262 qualified_attribute = SELF group_qualifier attribute_qualifier .
266263 qualifier = attribute_qualifier | group_qualifier | index_qualifier .
267264 query_expression = QUERY '(' variable_id '<*' aggregate_source '|' logical_expression ')' .
268265 real_type = REAL [ '(' precision_spec ')' ] .
269266 referenced_attribute = attribute_ref | qualified_attribute .
270267 reference_clause = REFERENCE FROM schema_ref [ '(' resource_or_rename { ',' resource_or_rename } ')' ] ';' .
271268 rel_op = '<' | '>' | '<=' | '>=' | '<>' | '=' | ':<>:' | ':=:' .
272269 rel_op_extended = rel_op | IN | LIKE .
273270 rename_id = constant_id | entity_id | function_id | procedure_id | type_id .
274271 repeat_control = [ increment_control ] [ while_control ] [ until_control ] .
275272 repeat_stmt = REPEAT repeat_control ';' stmt { stmt } END_REPEAT ';' .
276273 repetition = numeric_expression .
277274 resource_or_rename = resource_ref [ AS rename_id ] .
278275 resource_ref = constant_ref | entity_ref | function_ref | procedure_ref | type_ref .
279276 return_stmt = RETURN [ '(' expression ')' ] ';' .
280277 rule_decl = rule_head [ algorithm_head ] { stmt } where_clause END_RULE ';' .
281278 rule_head = RULE rule_id FOR '(' entity_ref { ',' entity_ref } ')' ';' .
282279 rule_id = simple_id .
283280 schema_body = { interface_specification } [ constant_decl ] { declaration | rule_decl } .
284281 schema_decl = SCHEMA schema_id ';' schema_body END_SCHEMA ';' .
285282 schema_id = simple_id .
286283 selector = expression .
287284 select_type = SELECT '(' named_types { ',' named_types } ')' .
288285 set_type = SET [ bound_spec ] OF base_type .
289286 sign = '+' | '-' .
290287 simple_expression = term { add_like_op term } .
291288 simple_factor = aggregate_initializer | entity_constructor | enumeration_reference | interval | query_expression | ( [ unary_op ] ( '(' expression ')' | primary ) ) .
292289 simple_types = binary_type | boolean_type | integer_type | logical_type | number_type | real_type | string_type .
293290 skip_stmt = SKIP ';' .
294291 stmt = alias_stmt | assignment_stmt | case_stmt | compound_stmt | escape_stmt | if_stmt | null_stmt | procedure_call_stmt | repeat_stmt | return_stmt | skip_stmt .
295292 string_literal = simple_string_literal | encoded_string_literal .
296293 string_type = STRING [ width_spec ] .
297294 subsuper = [ supertype_constraint ] [ subtype_declaration ] .
298295 subtype_constraint = OF '(' supertype_expression ')' .
299296 subtype_declaration = SUBTYPE OF '(' entity_ref { ',' entity_ref } ')' .
300297 supertype_constraint = abstract_supertype_declaration | supertype_rule .
301298 supertype_expression = supertype_factor { ANDOR supertype_factor } .
302299 supertype_factor = supertype_term { AND supertype_term } .
303300 supertype_rule = SUPERTYPE subtype_constraint .
304301 supertype_term = entity_ref | one_of | '(' supertype_expression ')' .
305302 syntax = schema_decl { schema_decl } .
306303 term = factor { multiplication_like_op factor } .
307304 type_decl = TYPE type_id '=' underlying_type ';' [ where_clause ] END_TYPE ';' .
308305 type_id = simple_id .
309306 type_label = type_label_id | type_label_ref .
310307 type_label_id = simple_id .
311308 unary_op = '+' | '-' | NOT .
312309 underlying_type = constructed_types | aggregation_types | simple_types | type_ref .
313310 unique_clause = UNIQUE unique_rule ';' { unique_rule ';' } .
314311 unique_rule = [ label ':' ] referenced_attribute { ',' referenced_attribute } .
315312 until_control = UNTIL logical_expression .
316313 use_clause = USE FROM schema_ref [ '(' named_type_or_rename { ',' named_type_or_rename } ')' ] ';' .
317314 variable_id = simple_id .
318315 where_clause = WHERE domain_rule ';' { domain_rule ';' } .
319316 while_control = WHILE logical_expression .
320317 width = numeric_expression .
321318 width_spec = '(' width ')' [ FIXED ] .
322