blob: 629929cf756a2f56f06358ab0544e18ae91f2ad2 [file] [log] [blame]
Vidyashree Ramada621502016-02-05 22:32:34 +05301/*
2 * Copyright 2016 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * This is a YANG grammar for parser based on which ANTLR will generate YANG parser.
19 */
20
21grammar GeneratedYang;
22import YangLexer;
23
24@header {
25package org.onosproject.yangutils.parser.antlrgencode;
26}
27
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +053028 yangfile : moduleStatement
29 | subModuleStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +053030
31 /**
32 * module-stmt = optsep module-keyword sep identifier-arg-str
33 * optsep
34 * "{" stmtsep
35 * module-header-stmts
36 * linkage-stmts
37 * meta-stmts
38 * revision-stmts
39 * body-stmts
40 * "}" optsep
41 */
42
Vidyashree Ramabcd7fba2016-03-09 20:41:44 +053043 moduleStatement : MODULE_KEYWORD identifier LEFT_CURLY_BRACE moduleBody RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +053044
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +053045 moduleBody : moduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements;
Vidyashree Ramada621502016-02-05 22:32:34 +053046
47 /**
48 * module-header-stmts = ;; these stmts can appear in any order
49 * [yang-version-stmt stmtsep]
50 * namespace-stmt stmtsep
51 * prefix-stmt stmtsep
52 */
53
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +053054 moduleHeaderStatement : yangVersionStatement? namespaceStatement prefixStatement
55 | yangVersionStatement? prefixStatement namespaceStatement
56 | namespaceStatement yangVersionStatement? prefixStatement
57 | namespaceStatement prefixStatement yangVersionStatement?
58 | prefixStatement namespaceStatement yangVersionStatement?
59 | prefixStatement yangVersionStatement? namespaceStatement
Vidyashree Ramada621502016-02-05 22:32:34 +053060 ;
61
62 /**
63 * linkage-stmts = ;; these stmts can appear in any order
64 * *(import-stmt stmtsep)
65 * *(include-stmt stmtsep)
66 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +053067 linkageStatements : (importStatement
68 | includeStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +053069
70 /**
71 * meta-stmts = ;; these stmts can appear in any order
72 * [organization-stmt stmtsep]
73 * [contact-stmt stmtsep]
74 * [description-stmt stmtsep]
75 * [reference-stmt stmtsep]
76 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +053077 metaStatements : organizationStatement? contactStatement? descriptionStatement? referenceStatement?
78 | organizationStatement? contactStatement? referenceStatement? descriptionStatement?
79 | organizationStatement? descriptionStatement? contactStatement? referenceStatement?
80 | organizationStatement? descriptionStatement? referenceStatement? contactStatement?
81 | organizationStatement? referenceStatement? contactStatement? descriptionStatement?
82 | organizationStatement? referenceStatement? descriptionStatement? contactStatement?
83 | contactStatement? organizationStatement? descriptionStatement? referenceStatement?
84 | contactStatement? organizationStatement? referenceStatement? descriptionStatement?
85 | contactStatement? referenceStatement? organizationStatement? descriptionStatement?
86 | contactStatement? referenceStatement? descriptionStatement? organizationStatement?
87 | contactStatement? descriptionStatement? referenceStatement? organizationStatement?
88 | contactStatement? descriptionStatement? organizationStatement? referenceStatement?
89 | referenceStatement? contactStatement? organizationStatement? descriptionStatement?
90 | referenceStatement? contactStatement? descriptionStatement? organizationStatement?
91 | referenceStatement? organizationStatement? contactStatement? descriptionStatement?
92 | referenceStatement? organizationStatement? descriptionStatement? contactStatement?
93 | referenceStatement? descriptionStatement? organizationStatement? contactStatement?
94 | referenceStatement? descriptionStatement? contactStatement? organizationStatement?
95 | descriptionStatement? referenceStatement? contactStatement? organizationStatement?
96 | descriptionStatement? referenceStatement? organizationStatement? contactStatement?
97 | descriptionStatement? contactStatement? referenceStatement? organizationStatement?
98 | descriptionStatement? contactStatement? organizationStatement? referenceStatement?
99 | descriptionStatement? organizationStatement? contactStatement? referenceStatement?
100 | descriptionStatement? organizationStatement? referenceStatement? contactStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530101 ;
102
103 // revision-stmts = *(revision-stmt stmtsep)
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530104 revisionStatements : revisionStatement*;
Vidyashree Ramada621502016-02-05 22:32:34 +0530105
106 /**
107 * body-stmts = *((extension-stmt /
108 * feature-stmt /
109 * identity-stmt /
110 * typedef-stmt /
111 * grouping-stmt /
112 * data-def-stmt /
113 * augment-stmt /
114 * rpc-stmt /
115 * notification-stmt /
116 * deviation-stmt) stmtsep)
117 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530118 bodyStatements : (extensionStatement
119 | featureStatement
120 | identityStatement
121 | typedefStatement
122 | groupingStatement
123 | dataDefStatement
124 | augmentStatement
125 | rpcStatement
126 | notificationStatement
127 | deviationStatement)*
Vidyashree Ramada621502016-02-05 22:32:34 +0530128 ;
129
130 /**
131 * yang-version-stmt = yang-version-keyword sep yang-version-arg-str
132 * optsep stmtend
133 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530134 yangVersionStatement : YANG_VERSION_KEYWORD version STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530135
136
137 /**
138 * namespace-stmt = namespace-keyword sep uri-str optsep stmtend
139 * For namespace validation TODO in Listener
140 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530141 namespaceStatement : NAMESPACE_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530142
143 /**
144 * prefix-stmt = prefix-keyword sep prefix-arg-str
145 * optsep stmtend
146 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530147 prefixStatement : PREFIX_KEYWORD identifier STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530148
149 /**
150 * import-stmt = import-keyword sep identifier-arg-str optsep
151 * "{" stmtsep
152 * prefix-stmt stmtsep
153 * [revision-date-stmt stmtsep]
154 * "}"
155 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530156 importStatement : IMPORT_KEYWORD identifier LEFT_CURLY_BRACE importStatementBody RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +0530157
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530158 importStatementBody : prefixStatement revisionDateStatement?;
Vidyashree Ramada621502016-02-05 22:32:34 +0530159
160 // revision-date-stmt = revision-date-keyword sep revision-date stmtend
Vidyashree Rama468f8282016-03-04 19:08:35 +0530161 revisionDateStatement : REVISION_DATE_KEYWORD dateArgumentString STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530162
163 /**
164 * include-stmt = include-keyword sep identifier-arg-str optsep
165 * (";" /
166 * "{" stmtsep
167 * [revision-date-stmt stmtsep]
168 * "}")
169 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530170 includeStatement : INCLUDE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE revisionDateStatement? RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530171
172 /**
173 * organization-stmt = organization-keyword sep string
174 * optsep stmtend
175 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530176 organizationStatement : ORGANIZATION_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530177
178 // contact-stmt = contact-keyword sep string optsep stmtend
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530179 contactStatement : CONTACT_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530180
181 // description-stmt = description-keyword sep string optsep stmtend
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530182 descriptionStatement : DESCRIPTION_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530183
184 // reference-stmt = reference-keyword sep string optsep stmtend
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530185 referenceStatement : REFERENCE_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530186
187 /**
188 * revision-stmt = revision-keyword sep revision-date optsep
189 * (";" /
190 * "{" stmtsep
191 * [description-stmt stmtsep]
192 * [reference-stmt stmtsep]
193 * "}")
194 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530195 revisionStatement : REVISION_KEYWORD dateArgumentString (STMTEND | LEFT_CURLY_BRACE revisionStatementBody RIGHT_CURLY_BRACE);
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530196 revisionStatementBody : descriptionStatement? referenceStatement?;
Vidyashree Ramada621502016-02-05 22:32:34 +0530197
198 /**
199 * submodule-stmt = optsep submodule-keyword sep identifier-arg-str
200 * optsep
201 * "{" stmtsep
202 * submodule-header-stmts
203 * linkage-stmts
204 * meta-stmts
205 * revision-stmts
206 * body-stmts
207 * "}" optsep
208 */
Vidyashree Ramabcd7fba2016-03-09 20:41:44 +0530209 subModuleStatement : SUBMODULE_KEYWORD identifier LEFT_CURLY_BRACE submoduleBody RIGHT_CURLY_BRACE;
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530210 submoduleBody : submoduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements;
Vidyashree Ramada621502016-02-05 22:32:34 +0530211
212 /** submodule-header-stmts =
213 * ;; these stmts can appear in any order
214 * [yang-version-stmt stmtsep]
215 * belongs-to-stmt stmtsep
216 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530217 submoduleHeaderStatement : yangVersionStatement? belongstoStatement
218 | belongstoStatement yangVersionStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530219 ;
220
221 /**
222 * belongs-to-stmt = belongs-to-keyword sep identifier-arg-str
223 * optsep
224 * "{" stmtsep
225 * prefix-stmt stmtsep
226 * "}"
227 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530228 belongstoStatement : BELONGS_TO_KEYWORD identifier LEFT_CURLY_BRACE belongstoStatementBody RIGHT_CURLY_BRACE;
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530229 belongstoStatementBody : prefixStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +0530230
231 /**
232 * extension-stmt = extension-keyword sep identifier-arg-str optsep
233 * (";" /
234 * "{" stmtsep
235 * ;; these stmts can appear in any order
236 * [argument-stmt stmtsep]
237 * [status-stmt stmtsep]
238 * [description-stmt stmtsep]
239 * [reference-stmt stmtsep]
240 * "}")
241 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530242 extensionStatement : EXTENSION_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE extensionBody RIGHT_CURLY_BRACE);
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530243 extensionBody : argumentStatement? statusStatement? descriptionStatement? referenceStatement?
244 | argumentStatement? statusStatement? referenceStatement? descriptionStatement?
245 | argumentStatement? descriptionStatement? statusStatement? referenceStatement?
246 | argumentStatement? descriptionStatement? referenceStatement? statusStatement?
247 | argumentStatement? referenceStatement? descriptionStatement? statusStatement?
248 | argumentStatement? referenceStatement? statusStatement? descriptionStatement?
249 | statusStatement? referenceStatement? argumentStatement? descriptionStatement?
250 | statusStatement? referenceStatement? descriptionStatement? argumentStatement?
251 | statusStatement? descriptionStatement? referenceStatement? argumentStatement?
252 | statusStatement? descriptionStatement? argumentStatement? referenceStatement?
253 | statusStatement? argumentStatement? referenceStatement? descriptionStatement?
254 | statusStatement? argumentStatement? descriptionStatement? referenceStatement?
255 | descriptionStatement? argumentStatement? statusStatement? referenceStatement?
256 | descriptionStatement? argumentStatement? referenceStatement? statusStatement?
257 | descriptionStatement? statusStatement? argumentStatement? referenceStatement?
258 | descriptionStatement? statusStatement? referenceStatement? argumentStatement?
259 | descriptionStatement? referenceStatement? statusStatement? argumentStatement?
260 | descriptionStatement? referenceStatement? argumentStatement? statusStatement?
261 | referenceStatement? descriptionStatement? argumentStatement? statusStatement?
262 | referenceStatement? descriptionStatement? statusStatement? argumentStatement?
263 | referenceStatement? statusStatement? argumentStatement? descriptionStatement?
264 | referenceStatement? statusStatement? descriptionStatement? argumentStatement?
265 | referenceStatement? argumentStatement? descriptionStatement? statusStatement?
266 | referenceStatement? argumentStatement? statusStatement? descriptionStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530267 ;
268
269 /**
270 * argument-stmt = argument-keyword sep identifier-arg-str optsep
271 * (";" /
272 * "{" stmtsep
273 * [yin-element-stmt stmtsep]
274 * "}")
275 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530276 argumentStatement : ARGUMENT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE argumentBody RIGHT_CURLY_BRACE);
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530277 argumentBody : yinElementStatement?;
Vidyashree Ramada621502016-02-05 22:32:34 +0530278
279 /**
280 * yin-element-stmt = yin-element-keyword sep yin-element-arg-str
281 * stmtend
282 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530283 yinElementStatement : YIN_ELEMENT_KEYWORD (TRUE_KEYWORD | FALSE_KEYWORD) STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530284
285 /**
286 * identity-stmt = identity-keyword sep identifier-arg-str optsep
287 * (";" /
288 * "{" stmtsep
289 * ;; these stmts can appear in any order
290 * [base-stmt stmtsep]
291 * [status-stmt stmtsep]
292 * [description-stmt stmtsep]
293 * [reference-stmt stmtsep]
294 * "}")
295 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530296 identityStatement : IDENTITY_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE identityBody RIGHT_CURLY_BRACE);
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530297 identityBody : baseStatement? statusStatement? descriptionStatement? referenceStatement?
298 | baseStatement? statusStatement? referenceStatement? descriptionStatement?
299 | baseStatement? descriptionStatement? statusStatement? referenceStatement?
300 | baseStatement? descriptionStatement? referenceStatement? statusStatement?
301 | baseStatement? referenceStatement? descriptionStatement? statusStatement?
302 | baseStatement? referenceStatement? statusStatement? descriptionStatement?
303 | referenceStatement? baseStatement? statusStatement? descriptionStatement?
304 | referenceStatement? baseStatement? descriptionStatement? statusStatement?
305 | referenceStatement? statusStatement? baseStatement? descriptionStatement?
306 | referenceStatement? statusStatement? descriptionStatement? baseStatement?
307 | referenceStatement? descriptionStatement? statusStatement? baseStatement?
308 | referenceStatement? descriptionStatement? baseStatement? statusStatement?
309 | descriptionStatement? referenceStatement? statusStatement? baseStatement?
310 | descriptionStatement? referenceStatement? statusStatement? baseStatement?
311 | descriptionStatement? referenceStatement? baseStatement? statusStatement?
312 | descriptionStatement? statusStatement? baseStatement? referenceStatement?
313 | descriptionStatement? statusStatement? referenceStatement? baseStatement?
314 | descriptionStatement? baseStatement? referenceStatement? statusStatement?
315 | descriptionStatement? baseStatement? statusStatement? referenceStatement?
316 | statusStatement? baseStatement? descriptionStatement? referenceStatement?
317 | statusStatement? baseStatement? referenceStatement? descriptionStatement?
318 | statusStatement? descriptionStatement? baseStatement? referenceStatement?
319 | statusStatement? descriptionStatement? referenceStatement? baseStatement?
320 | statusStatement? referenceStatement? descriptionStatement? baseStatement?
321 | statusStatement? referenceStatement? baseStatement? descriptionStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530322 ;
323
324 /**
325 * base-stmt = base-keyword sep identifier-ref-arg-str
326 * optsep stmtend*
327 * identifier-ref-arg = [prefix ":"] identifier
328 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530329 baseStatement : BASE_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530330
331 /**
332 * feature-stmt = feature-keyword sep identifier-arg-str optsep
333 * (";" /
334 * "{" stmtsep
335 * ;; these stmts can appear in any order
336 * *(if-feature-stmt stmtsep)
337 * [status-stmt stmtsep]
338 * [description-stmt stmtsep]
339 * [reference-stmt stmtsep]
340 * "}")
341 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530342 featureStatement : FEATURE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE featureBody RIGHT_CURLY_BRACE);
343 featureBody : ifFeatureStatement* statusStatement? descriptionStatement? referenceStatement?
344 | ifFeatureStatement* statusStatement? referenceStatement? descriptionStatement?
345 | ifFeatureStatement* descriptionStatement? statusStatement? referenceStatement?
346 | ifFeatureStatement* descriptionStatement? referenceStatement? statusStatement?
347 | ifFeatureStatement* referenceStatement? statusStatement? descriptionStatement?
348 | ifFeatureStatement* referenceStatement? descriptionStatement? statusStatement?
349 | statusStatement? ifFeatureStatement* descriptionStatement? referenceStatement?
350 | statusStatement? ifFeatureStatement* referenceStatement? descriptionStatement?
351 | statusStatement? descriptionStatement? ifFeatureStatement* referenceStatement?
352 | statusStatement? descriptionStatement? referenceStatement? ifFeatureStatement*
353 | statusStatement? referenceStatement? ifFeatureStatement* descriptionStatement?
354 | statusStatement? referenceStatement? descriptionStatement? ifFeatureStatement*
355 | descriptionStatement? ifFeatureStatement* statusStatement? referenceStatement?
356 | descriptionStatement? ifFeatureStatement* referenceStatement? statusStatement?
357 | descriptionStatement? statusStatement? ifFeatureStatement* referenceStatement?
358 | descriptionStatement? statusStatement? referenceStatement? ifFeatureStatement*
359 | descriptionStatement? referenceStatement* statusStatement? ifFeatureStatement*
360 | descriptionStatement? referenceStatement* ifFeatureStatement? statusStatement?
361 | referenceStatement? ifFeatureStatement* statusStatement? descriptionStatement?
362 | referenceStatement? ifFeatureStatement* descriptionStatement? statusStatement?
363 | referenceStatement? descriptionStatement? statusStatement? ifFeatureStatement*
364 | referenceStatement? descriptionStatement? ifFeatureStatement* statusStatement?
365 | referenceStatement? statusStatement? descriptionStatement? ifFeatureStatement*
366 | referenceStatement? statusStatement? ifFeatureStatement* descriptionStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530367 ;
368
369 /**
370 * data-def-stmt = container-stmt /
371 * leaf-stmt /
372 * leaf-list-stmt /
373 * list-stmt /
374 * choice-stmt /
375 * anyxml-stmt /
376 * uses-stmt
377 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530378 dataDefStatement : containerStatement
379 | leafStatement
380 | leafListStatement
381 | listStatement
382 | choiceStatement
383 | usesStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +0530384
385 /**
386 * if-feature-stmt = if-feature-keyword sep identifier-ref-arg-str
387 * optsep stmtend
388 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530389 ifFeatureStatement : IF_FEATURE_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530390
391 /**
392 * units-stmt = units-keyword sep string optsep stmtend
393 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530394 unitsStatement : UNITS_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530395
396 /**
397 * typedef-stmt = typedef-keyword sep identifier-arg-str optsep
398 * "{" stmtsep
399 * ;; these stmts can appear in any order
400 * type-stmt stmtsep
401 * [units-stmt stmtsep]
402 * [default-stmt stmtsep]
403 * [status-stmt stmtsep]
404 * [description-stmt stmtsep]
405 * [reference-stmt stmtsep]
406 * "}"
407 * TODO : 0..1 occurance to be validated in listener
408 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530409 typedefStatement : TYPEDEF_KEYWORD identifier LEFT_CURLY_BRACE
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530410 (typeStatement | unitsStatement | defaultStatement | statusStatement | descriptionStatement | referenceStatement)*
Vidyashree Ramada621502016-02-05 22:32:34 +0530411 RIGHT_CURLY_BRACE;
412
413 /**
414 * type-stmt = type-keyword sep identifier-ref-arg-str optsep
415 * (";" /
416 * "{" stmtsep
417 * type-body-stmts
418 * "}")
419 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530420 typeStatement : TYPE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE typeBodyStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530421
422 /**
423 * type-body-stmts = numerical-restrictions /
424 * decimal64-specification /
425 * string-restrictions /
426 * enum-specification /
427 * leafref-specification /
428 * identityref-specification /
429 * instance-identifier-specification /
430 * bits-specification /
431 * union-specification
432 * TODO : decimal64-specification to be added
433 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530434 typeBodyStatements : numericalRestrictions | stringRestrictions | enumSpecification
435 | leafrefSpecification | identityrefSpecification | instanceIdentifierSpecification
436 | bitsSpecification | unionSpecification;
Vidyashree Ramada621502016-02-05 22:32:34 +0530437
438 /**
439 * numerical-restrictions = range-stmt stmtsep
440 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530441 numericalRestrictions : rangeStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +0530442
443 /**
444 * range-stmt = range-keyword sep range-arg-str optsep
445 * (";" /
446 * "{" stmtsep
447 * ;; these stmts can appear in any order
448 * [error-message-stmt stmtsep]
449 * [error-app-tag-stmt stmtsep]
450 * [description-stmt stmtsep]
451 * [reference-stmt stmtsep]
452 * "}")
453 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530454 rangeStatement : RANGE_KEYWORD range (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530455
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530456 commonStatements : errorMessageStatement? errorAppTagStatement? descriptionStatement? referenceStatement?
457 | errorMessageStatement? errorAppTagStatement? referenceStatement? descriptionStatement?
458 | errorMessageStatement? descriptionStatement? errorAppTagStatement? referenceStatement?
459 | errorMessageStatement? descriptionStatement? referenceStatement? errorAppTagStatement?
460 | errorMessageStatement? referenceStatement? errorAppTagStatement? descriptionStatement?
461 | errorMessageStatement? referenceStatement? descriptionStatement? errorAppTagStatement?
462 | errorAppTagStatement? errorMessageStatement? descriptionStatement? referenceStatement?
463 | errorAppTagStatement? errorMessageStatement? referenceStatement? descriptionStatement?
464 | errorAppTagStatement? descriptionStatement? descriptionStatement? errorMessageStatement?
465 | errorAppTagStatement? descriptionStatement? errorMessageStatement? descriptionStatement?
466 | errorAppTagStatement? referenceStatement? errorMessageStatement? descriptionStatement?
467 | errorAppTagStatement? referenceStatement? descriptionStatement? errorMessageStatement?
468 | descriptionStatement? errorMessageStatement? errorAppTagStatement? referenceStatement?
469 | descriptionStatement? errorMessageStatement? referenceStatement? errorAppTagStatement?
470 | descriptionStatement? errorAppTagStatement? errorMessageStatement? referenceStatement?
471 | descriptionStatement? errorAppTagStatement? referenceStatement? errorMessageStatement?
472 | descriptionStatement? referenceStatement? errorMessageStatement? errorAppTagStatement?
473 | descriptionStatement? referenceStatement? errorAppTagStatement? errorMessageStatement?
474 | referenceStatement? errorMessageStatement? descriptionStatement? errorAppTagStatement?
475 | referenceStatement? errorMessageStatement? errorAppTagStatement? descriptionStatement?
476 | referenceStatement? errorAppTagStatement? descriptionStatement? errorMessageStatement?
477 | referenceStatement? errorAppTagStatement? errorMessageStatement? descriptionStatement?
478 | referenceStatement? descriptionStatement? errorMessageStatement? errorAppTagStatement?
479 | referenceStatement? descriptionStatement? errorAppTagStatement? errorMessageStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530480 ;
481
482 /**
483 * string-restrictions = ;; these stmts can appear in any order
484 * [length-stmt stmtsep]
485 * *(pattern-stmt stmtsep)
486 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530487 stringRestrictions : ((lengthStatement)? (patternStatement)*) | ((patternStatement)* (lengthStatement)?);
Vidyashree Ramada621502016-02-05 22:32:34 +0530488
489 /**
490 * length-stmt = length-keyword sep length-arg-str optsep
491 * (";" /
492 * "{" stmtsep
493 * ;; these stmts can appear in any order
494 * [error-message-stmt stmtsep]
495 * [error-app-tag-stmt stmtsep]
496 * [description-stmt stmtsep]
497 * [reference-stmt stmtsep]
498 * "}")
499 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530500 lengthStatement : LENGTH_KEYWORD length
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530501 (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530502
503 /**
504 * pattern-stmt = pattern-keyword sep string optsep
505 * (";" /
506 * "{" stmtsep
507 * ;; these stmts can appear in any order
508 * [error-message-stmt stmtsep]
509 * [error-app-tag-stmt stmtsep]
510 * [description-stmt stmtsep]
511 * [reference-stmt stmtsep]
512 * "}")
513 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530514 patternStatement : PATTERN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530515
516 /**
517 * default-stmt = default-keyword sep string stmtend
518 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530519 defaultStatement : DEFAULT_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530520
521 /**
522 * enum-specification = 1*(enum-stmt stmtsep)
523 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530524 enumSpecification : enumStatement+;
Vidyashree Ramada621502016-02-05 22:32:34 +0530525
526 /**
527 * enum-stmt = enum-keyword sep string optsep
528 * (";" /
529 * "{" stmtsep
530 * ;; these stmts can appear in any order
531 * [value-stmt stmtsep]
532 * [status-stmt stmtsep]
533 * [description-stmt stmtsep]
534 * [reference-stmt stmtsep]
535 * "}")
536 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530537 enumStatement : ENUM_KEYWORD string (STMTEND | LEFT_CURLY_BRACE enumStatementBody RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530538
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530539 enumStatementBody : valueStatement? statusStatement? descriptionStatement? referenceStatement?
540 | valueStatement? statusStatement? referenceStatement? descriptionStatement?
541 | valueStatement? descriptionStatement? statusStatement? referenceStatement?
542 | valueStatement? descriptionStatement? referenceStatement? statusStatement?
543 | valueStatement? referenceStatement? statusStatement? descriptionStatement?
544 | valueStatement? referenceStatement? descriptionStatement? statusStatement?
545 | statusStatement? valueStatement? descriptionStatement? referenceStatement?
546 | statusStatement? valueStatement? referenceStatement? descriptionStatement?
547 | statusStatement? descriptionStatement? descriptionStatement? valueStatement?
548 | statusStatement? descriptionStatement? valueStatement? descriptionStatement?
549 | statusStatement? referenceStatement? valueStatement? descriptionStatement?
550 | statusStatement? referenceStatement? descriptionStatement? valueStatement?
551 | descriptionStatement? valueStatement? statusStatement? referenceStatement?
552 | descriptionStatement? valueStatement? referenceStatement? statusStatement?
553 | descriptionStatement? statusStatement? valueStatement? referenceStatement?
554 | descriptionStatement? statusStatement? referenceStatement? valueStatement?
555 | descriptionStatement? referenceStatement? valueStatement? statusStatement?
556 | descriptionStatement? referenceStatement? statusStatement? valueStatement?
557 | referenceStatement? valueStatement? descriptionStatement? statusStatement?
558 | referenceStatement? valueStatement? statusStatement? descriptionStatement?
559 | referenceStatement? statusStatement? descriptionStatement? valueStatement?
560 | referenceStatement? statusStatement? valueStatement? descriptionStatement?
561 | referenceStatement? descriptionStatement? valueStatement? statusStatement?
562 | referenceStatement? descriptionStatement? statusStatement? valueStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530563 ;
564
565 /**
566 * leafref-specification =
567 * ;; these stmts can appear in any order
568 * path-stmt stmtsep
569 * [require-instance-stmt stmtsep]
570 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530571 leafrefSpecification : (pathStatement (requireInstanceStatement)?) | ((requireInstanceStatement)? pathStatement);
Vidyashree Ramada621502016-02-05 22:32:34 +0530572
573 /**
574 * path-stmt = path-keyword sep path-arg-str stmtend
575 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530576 pathStatement : PATH_KEYWORD path STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530577
578 /**
579 * require-instance-stmt = require-instance-keyword sep
580 * require-instance-arg-str stmtend
581 * require-instance-arg-str = < a string that matches the rule
582 * require-instance-arg >
583 * require-instance-arg = true-keyword / false-keyword
584 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530585 requireInstanceStatement : REQUIRE_INSTANCE_KEYWORD (TRUE_KEYWORD | FALSE_KEYWORD) STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530586
587 /**
588 * instance-identifier-specification =
589 * [require-instance-stmt stmtsep]
590 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530591 instanceIdentifierSpecification : requireInstanceStatement?;
Vidyashree Ramada621502016-02-05 22:32:34 +0530592
593 /**
594 * identityref-specification =
595 * base-stmt stmtsep
596 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530597 identityrefSpecification : baseStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +0530598
599 /**
600 * union-specification = 1*(type-stmt stmtsep)
601 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530602 unionSpecification : typeStatement+;
Vidyashree Ramada621502016-02-05 22:32:34 +0530603
604 /**
605 * bits-specification = 1*(bit-stmt stmtsep)
606 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530607 bitsSpecification : bitStatement+;
Vidyashree Ramada621502016-02-05 22:32:34 +0530608
609 /**
610 * bit-stmt = bit-keyword sep identifier-arg-str optsep
611 * (";" /
612 * "{" stmtsep
613 * ;; these stmts can appear in any order
614 * [position-stmt stmtsep]
615 * [status-stmt stmtsep]
616 * [description-stmt stmtsep]
617 * [reference-stmt stmtsep]
618 * "}"
619 * "}")
620 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530621 bitStatement : BIT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE bitBodyStatement RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530622
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530623 bitBodyStatement : positionStatement? statusStatement? descriptionStatement? referenceStatement?
624 | positionStatement? statusStatement? referenceStatement? descriptionStatement?
625 | positionStatement? descriptionStatement? statusStatement? referenceStatement?
626 | positionStatement? descriptionStatement? referenceStatement? statusStatement?
627 | positionStatement? referenceStatement? statusStatement? descriptionStatement?
628 | positionStatement? referenceStatement? descriptionStatement? statusStatement?
629 | statusStatement? positionStatement? descriptionStatement? referenceStatement?
630 | statusStatement? positionStatement? referenceStatement? descriptionStatement?
631 | statusStatement? descriptionStatement? descriptionStatement? positionStatement?
632 | statusStatement? descriptionStatement? positionStatement? descriptionStatement?
633 | statusStatement? referenceStatement? positionStatement? descriptionStatement?
634 | statusStatement? referenceStatement? descriptionStatement? positionStatement?
635 | descriptionStatement? positionStatement? statusStatement? referenceStatement?
636 | descriptionStatement? positionStatement? referenceStatement? statusStatement?
637 | descriptionStatement? statusStatement? positionStatement? referenceStatement?
638 | descriptionStatement? statusStatement? referenceStatement? positionStatement?
639 | descriptionStatement? referenceStatement? positionStatement? statusStatement?
640 | descriptionStatement? referenceStatement? statusStatement? positionStatement?
641 | referenceStatement? positionStatement? descriptionStatement? statusStatement?
642 | referenceStatement? positionStatement? statusStatement? descriptionStatement?
643 | referenceStatement? statusStatement? descriptionStatement? positionStatement?
644 | referenceStatement? statusStatement? positionStatement? descriptionStatement?
645 | referenceStatement? descriptionStatement? positionStatement? statusStatement?
646 | referenceStatement? descriptionStatement? statusStatement? positionStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530647 ;
648
649 /**
650 * position-stmt = position-keyword sep
651 * position-value-arg-str stmtend
652 * position-value-arg-str = < a string that matches the rule
653 * position-value-arg >
654 * position-value-arg = non-negative-integer-value
655 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530656 positionStatement : POSITION_KEYWORD position STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530657
658 /**
659 * status-stmt = status-keyword sep status-arg-str stmtend
660 * status-arg-str = < a string that matches the rule
661 * status-arg >
662 * status-arg = current-keyword /
663 * obsolete-keyword /
664 * deprecated-keyword
665 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530666 statusStatement : STATUS_KEYWORD status STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530667
668 /**
669 * config-stmt = config-keyword sep
670 * config-arg-str stmtend
671 * config-arg-str = < a string that matches the rule
672 * config-arg >
673 * config-arg = true-keyword / false-keyword
674 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530675 configStatement : CONFIG_KEYWORD config STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530676
677 /**
678 * mandatory-stmt = mandatory-keyword sep
679 * mandatory-arg-str stmtend
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530680 *
Vidyashree Ramada621502016-02-05 22:32:34 +0530681 * mandatory-arg-str = < a string that matches the rule
682 * mandatory-arg >
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530683 *
684 * mandatory-arg = true-keyword / false-keyword
Vidyashree Ramada621502016-02-05 22:32:34 +0530685 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530686 mandatoryStatement : MANDATORY_KEYWORD mandatory STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530687
688 /**
689 * presence-stmt = presence-keyword sep string stmtend
690 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530691 presenceStatement : PRESENCE_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530692
693 /**
694 * ordered-by-stmt = ordered-by-keyword sep
695 * ordered-by-arg-str stmtend
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530696 *
Vidyashree Ramada621502016-02-05 22:32:34 +0530697 * ordered-by-arg-str = < a string that matches the rule
698 * ordered-by-arg >
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530699 *
Vidyashree Ramada621502016-02-05 22:32:34 +0530700 * ordered-by-arg = user-keyword / system-keyword
701 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530702 orderedByStatement : ORDERED_BY_KEYWORD orderedBy STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530703
704 /**
705 * must-stmt = must-keyword sep string optsep
706 * (";" /
707 * "{" stmtsep
708 * ;; these stmts can appear in any order
709 * [error-message-stmt stmtsep]
710 * [error-app-tag-stmt stmtsep]
711 * [description-stmt stmtsep]
712 * [reference-stmt stmtsep]
713 * "}")
714 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530715 mustStatement : MUST_KEYWORD string (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530716
717 /**
718 * error-message-stmt = error-message-keyword sep string stmtend
719 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530720 errorMessageStatement : ERROR_MESSAGE_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530721
722 /**
723 * error-app-tag-stmt = error-app-tag-keyword sep string stmtend
724 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530725 errorAppTagStatement : ERROR_APP_TAG_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530726
727 /**
728 * min-elements-stmt = min-elements-keyword sep
729 * min-value-arg-str stmtend
730 * min-value-arg-str = < a string that matches the rule
731 * min-value-arg >
732 * min-value-arg = non-negative-integer-value
733 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530734 minElementsStatement : MIN_ELEMENTS_KEYWORD minValue STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530735
736 /**
737 * max-elements-stmt = max-elements-keyword sep
738 * max-value-arg-str stmtend
739 * max-value-arg-str = < a string that matches the rule
740 * max-value-arg >
Vidyashree Ramada621502016-02-05 22:32:34 +0530741 * max-value-arg = unbounded-keyword /
742 * positive-integer-value
743 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530744 maxElementsStatement : MAX_ELEMENTS_KEYWORD maxValue STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530745
746 /**
747 * value-stmt = value-keyword sep integer-value stmtend
748 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530749 valueStatement : VALUE_KEYWORD ((MINUS INTEGER) | INTEGER) STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530750
751 /**
752 * grouping-stmt = grouping-keyword sep identifier-arg-str optsep
753 * (";" /
754 * "{" stmtsep
755 * ;; these stmts can appear in any order
756 * [status-stmt stmtsep]
757 * [description-stmt stmtsep]
758 * [reference-stmt stmtsep]
759 * *((typedef-stmt /
760 * grouping-stmt) stmtsep)
761 * *(data-def-stmt stmtsep)
762 * "}")
763 * TODO : 0..1 occurance to be checked in listener
764 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530765 groupingStatement : GROUPING_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530766 (statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement
767 | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530768
769 /**
770 * container-stmt = container-keyword sep identifier-arg-str optsep
771 * (";" /
772 * "{" stmtsep
773 * ;; these stmts can appear in any order
774 * [when-stmt stmtsep]
775 * *(if-feature-stmt stmtsep)
776 * *(must-stmt stmtsep)
777 * [presence-stmt stmtsep]
778 * [config-stmt stmtsep]
779 * [status-stmt stmtsep]
780 * [description-stmt stmtsep]
781 * [reference-stmt stmtsep]
782 * *((typedef-stmt /
783 * grouping-stmt) stmtsep)
784 * *(data-def-stmt stmtsep)
785 * "}")
786 * TODO : 0..1 occurance to be checked in listener
787 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530788 containerStatement : CONTAINER_KEYWORD identifier
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530789 (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | presenceStatement | configStatement
790 | statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement
791 | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530792
793 /**
794 * leaf-stmt = leaf-keyword sep identifier-arg-str optsep
795 * "{" stmtsep
796 * ;; these stmts can appear in any order
797 * [when-stmt stmtsep]
798 * *(if-feature-stmt stmtsep)
799 * type-stmt stmtsep
800 * [units-stmt stmtsep]
801 * *(must-stmt stmtsep)
802 * [default-stmt stmtsep]
803 * [config-stmt stmtsep]
804 * [mandatory-stmt stmtsep]
805 * [status-stmt stmtsep]
806 * [description-stmt stmtsep]
807 * [reference-stmt stmtsep]
808 * "}"
809 * TODO : 0..1 occurance to be checked in listener
810 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530811 leafStatement : LEAF_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement | unitsStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530812 | mustStatement | defaultStatement | configStatement | mandatoryStatement | statusStatement | descriptionStatement
813 | referenceStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +0530814
815 /**
816 * leaf-list-stmt = leaf-list-keyword sep identifier-arg-str optsep
817 * "{" stmtsep
818 * ;; these stmts can appear in any order
819 * [when-stmt stmtsep]
820 * *(if-feature-stmt stmtsep)
821 * type-stmt stmtsep
822 * [units-stmt stmtsep]
823 * *(must-stmt stmtsep)
824 * [config-stmt stmtsep]
825 * [min-elements-stmt stmtsep]
826 * [max-elements-stmt stmtsep]
827 * [ordered-by-stmt stmtsep]
828 * [status-stmt stmtsep]
829 * [description-stmt stmtsep]
830 * [reference-stmt stmtsep]
831 * "}"
832 * TODO : 0..1 occurance to be checked in listener
833 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530834 leafListStatement : LEAF_LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530835 | unitsStatement | mustStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement
836 | statusStatement | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +0530837
838 /**
839 * list-stmt = list-keyword sep identifier-arg-str optsep
840 * "{" stmtsep
841 * ;; these stmts can appear in any order
842 * [when-stmt stmtsep]
843 * *(if-feature-stmt stmtsep)
844 * *(must-stmt stmtsep)
845 * [key-stmt stmtsep]
846 * *(unique-stmt stmtsep)
847 * [config-stmt stmtsep]
848 * [min-elements-stmt stmtsep]
849 * [max-elements-stmt stmtsep]
850 * [ordered-by-stmt stmtsep]
851 * [status-stmt stmtsep]
852 * [description-stmt stmtsep]
853 * [reference-stmt stmtsep]
854 * *((typedef-stmt /
855 * grouping-stmt) stmtsep)
856 * 1*(data-def-stmt stmtsep)
857 * "}"
858 * TODO : 0..1 occurance to be checked in listener
859 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530860 listStatement : LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | keyStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530861 | uniqueStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement | statusStatement
862 | descriptionStatement | referenceStatement | typedefStatement | groupingStatement| dataDefStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +0530863
864 /**
865 * key-stmt = key-keyword sep key-arg-str stmtend
866 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530867 keyStatement : KEY_KEYWORD key STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530868
869 /**
870 * unique-stmt = unique-keyword sep unique-arg-str stmtend
871 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530872 uniqueStatement: UNIQUE_KEYWORD unique STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530873
874 /**
875 * choice-stmt = choice-keyword sep identifier-arg-str optsep
876 * (";" /
877 * "{" stmtsep
878 * ;; these stmts can appear in any order
879 * [when-stmt stmtsep]
880 * *(if-feature-stmt stmtsep)
881 * [default-stmt stmtsep]
882 * [config-stmt stmtsep]
883 * [mandatory-stmt stmtsep]
884 * [status-stmt stmtsep]
885 * [description-stmt stmtsep]
886 * [reference-stmt stmtsep]
887 * *((short-case-stmt / case-stmt) stmtsep)
888 * "}")
889 * TODO : 0..1 occurance to be checked in listener
890 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530891 choiceStatement : CHOICE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | defaultStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530892 | configStatement | mandatoryStatement | statusStatement | descriptionStatement | referenceStatement | shortCaseStatement
893 | caseStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530894
895 /**
896 * short-case-stmt = container-stmt /
897 * leaf-stmt /
898 * leaf-list-stmt /
899 * list-stmt /
900 * anyxml-stmt
901 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530902 shortCaseStatement : containerStatement | leafStatement | leafListStatement | listStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +0530903
904 /**
905 * case-stmt = case-keyword sep identifier-arg-str optsep
906 * (";" /
907 * "{" stmtsep
908 * ;; these stmts can appear in any order
909 * [when-stmt stmtsep]
910 * *(if-feature-stmt stmtsep)
911 * [status-stmt stmtsep]
912 * [description-stmt stmtsep]
913 * [reference-stmt stmtsep]
914 * *(data-def-stmt stmtsep)
915 * "}")
916 * TODO : 0..1 occurance to be checked in listener
917 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530918 caseStatement : CASE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530919 | descriptionStatement | referenceStatement | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530920
921 /**
922 * uses-stmt = uses-keyword sep identifier-ref-arg-str optsep
923 * (";" /
924 * "{" stmtsep
925 * ;; these stmts can appear in any order
926 * [when-stmt stmtsep]
927 * *(if-feature-stmt stmtsep)
928 * [status-stmt stmtsep]
929 * [description-stmt stmtsep]
930 * [reference-stmt stmtsep]
931 * *(refine-stmt stmtsep)
932 * *(uses-augment-stmt stmtsep)
933 * "}")
934 * TODO : 0..1 occurance to be checked in listener
935 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530936 usesStatement : USES_KEYWORD string (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
937 | descriptionStatement | referenceStatement | refineStatement | usesAugmentStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530938
939 /**
940 * refine-stmt = refine-keyword sep refine-arg-str optsep
941 * (";" /
942 * "{" stmtsep
943 * (refine-container-stmts /
944 * refine-leaf-stmts /
945 * refine-leaf-list-stmts /
946 * refine-list-stmts /
947 * refine-choice-stmts /
948 * refine-case-stmts /
949 * refine-anyxml-stmts)
950 * "}")
951 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530952 refineStatement : REFINE_KEYWORD refine (STMTEND | LEFT_CURLY_BRACE (refineContainerStatements
953 | refineLeafStatements | refineLeafListStatements | refineListStatements | refineChoiceStatements
954 | refineCaseStatements) RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530955
956 /**
957 * refine-container-stmts =
958 * ;; these stmts can appear in any order
959 * *(must-stmt stmtsep)
960 * [presence-stmt stmtsep]
961 * [config-stmt stmtsep]
962 * [description-stmt stmtsep]
963 * [reference-stmt stmtsep]
964 * TODO : 0..1 occurance to be checked in listener
965 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530966 refineContainerStatements : (mustStatement | presenceStatement | configStatement | descriptionStatement | referenceStatement)* ;
Vidyashree Ramada621502016-02-05 22:32:34 +0530967
968 /**
969 * refine-leaf-stmts = ;; these stmts can appear in any order
970 * *(must-stmt stmtsep)
971 * [default-stmt stmtsep]
972 * [config-stmt stmtsep]
973 * [mandatory-stmt stmtsep]
974 * [description-stmt stmtsep]
975 * [reference-stmt stmtsep]
976 * TODO : 0..1 occurance to be checked in listener
977 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530978 refineLeafStatements : (mustStatement | defaultStatement | configStatement | mandatoryStatement | descriptionStatement | referenceStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +0530979
980 /**
981 * refine-leaf-list-stmts =
982 * ;; these stmts can appear in any order
983 * *(must-stmt stmtsep)
984 * [config-stmt stmtsep]
985 * [min-elements-stmt stmtsep]
986 * [max-elements-stmt stmtsep]
987 * [description-stmt stmtsep]
988 * [reference-stmt stmtsep]
989 * TODO : 0..1 occurance to be checked in listener
990 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530991 refineLeafListStatements : (mustStatement | configStatement | minElementsStatement | maxElementsStatement | descriptionStatement
992 | referenceStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +0530993
994 /**
995 * refine-list-stmts = ;; these stmts can appear in any order
996 * *(must-stmt stmtsep)
997 * [config-stmt stmtsep]
998 * [min-elements-stmt stmtsep]
999 * [max-elements-stmt stmtsep]
1000 * [description-stmt stmtsep]
1001 * [reference-stmt stmtsep]
1002 * TODO : 0..1 occurance to be checked in listener
1003 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301004 refineListStatements : (mustStatement | configStatement | minElementsStatement | maxElementsStatement | descriptionStatement
1005 | referenceStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +05301006
1007 /**
1008 * refine-choice-stmts = ;; these stmts can appear in any order
1009 * [default-stmt stmtsep]
1010 * [config-stmt stmtsep]
1011 * [mandatory-stmt stmtsep]
1012 * [description-stmt stmtsep]
1013 * [reference-stmt stmtsep]
1014 * TODO : 0..1 occurance to be checked in listener
1015 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301016 refineChoiceStatements : (defaultStatement | configStatement | mandatoryStatement | descriptionStatement | referenceStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +05301017
1018 /**
1019 * refine-case-stmts = ;; these stmts can appear in any order
1020 * [description-stmt stmtsep]
1021 * [reference-stmt stmtsep]
1022 *
1023 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301024 refineCaseStatements : (descriptionStatement | referenceStatement)? | (referenceStatement | descriptionStatement)?;
Vidyashree Ramada621502016-02-05 22:32:34 +05301025
1026 /**
1027 * uses-augment-stmt = augment-keyword sep uses-augment-arg-str optsep
1028 * "{" stmtsep
1029 * ;; these stmts can appear in any order
1030 * [when-stmt stmtsep]
1031 * *(if-feature-stmt stmtsep)
1032 * [status-stmt stmtsep]
1033 * [description-stmt stmtsep]
1034 * [reference-stmt stmtsep]
1035 * 1*((data-def-stmt stmtsep) /
1036 * (case-stmt stmtsep))
1037 * "}"
1038 * TODO : 0..1 occurance to be checked in listener
1039 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301040 usesAugmentStatement : AUGMENT_KEYWORD augment LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement
1041 | statusStatement | descriptionStatement | referenceStatement | dataDefStatement
1042 | caseStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +05301043
1044 /**
1045 * augment-stmt = augment-keyword sep augment-arg-str optsep
1046 * "{" stmtsep
1047 * ;; these stmts can appear in any order
1048 * [when-stmt stmtsep]
1049 * *(if-feature-stmt stmtsep)
1050 * [status-stmt stmtsep]
1051 * [description-stmt stmtsep]
1052 * [reference-stmt stmtsep]
1053 * 1*((data-def-stmt stmtsep) /
1054 * (case-stmt stmtsep))
1055 * "}"
1056 * TODO : 0..1 occurance to be checked in listener
1057 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301058 augmentStatement : AUGMENT_KEYWORD string LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
1059 | descriptionStatement | referenceStatement | dataDefStatement | caseStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +05301060
1061 /**
1062 * when-stmt = when-keyword sep string optsep
1063 * (";" /
1064 * "{" stmtsep
1065 * ;; these stmts can appear in any order
1066 * [description-stmt stmtsep]
1067 * [reference-stmt stmtsep]
1068 * "}")
1069 *
1070 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301071 whenStatement : WHEN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE ((descriptionStatement? referenceStatement?)
1072 | (referenceStatement? descriptionStatement?)) RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +05301073
1074 /**
1075 * rpc-stmt = rpc-keyword sep identifier-arg-str optsep
1076 * (";" /
1077 * "{" stmtsep
1078 * ;; these stmts can appear in any order
1079 * *(if-feature-stmt stmtsep)
1080 * [status-stmt stmtsep]
1081 * [description-stmt stmtsep]
1082 * [reference-stmt stmtsep]
1083 * *((typedef-stmt /
1084 * grouping-stmt) stmtsep)
1085 * [input-stmt stmtsep]
1086 * [output-stmt stmtsep]
1087 * "}")
1088 * TODO : 0..1 occurance to be checked in listener
1089 */
Vidyashree Rama468f8282016-03-04 19:08:35 +05301090 rpcStatement : RPC_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement | statusStatement | descriptionStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301091 | referenceStatement | typedefStatement | groupingStatement | inputStatement | outputStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +05301092
1093 /**
1094 * input-stmt = input-keyword optsep
1095 * "{" stmtsep
1096 * ;; these stmts can appear in any order
1097 * *((typedef-stmt /
1098 * grouping-stmt) stmtsep)
1099 * 1*(data-def-stmt stmtsep)
1100 * "}"
1101 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301102 inputStatement : INPUT_KEYWORD LEFT_CURLY_BRACE
1103 ((typedefStatement | groupingStatement)* | dataDefStatement+)
1104 | (dataDefStatement+ | (typedefStatement | groupingStatement)*)RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +05301105
1106 /**
1107 * output-stmt = output-keyword optsep
1108 * "{" stmtsep
1109 * ;; these stmts can appear in any order
1110 * *((typedef-stmt /
1111 * grouping-stmt) stmtsep)
1112 * 1*(data-def-stmt stmtsep)
1113 * "}"
1114 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301115 outputStatement : OUTPUT_KEYWORD LEFT_CURLY_BRACE
1116 ((typedefStatement | groupingStatement)* | dataDefStatement+)
1117 | (dataDefStatement+ | (typedefStatement | groupingStatement)*)RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +05301118
1119 /**
1120 * notification-stmt = notification-keyword sep
1121 * identifier-arg-str optsep
1122 * (";" /
1123 * "{" stmtsep
1124 * ;; these stmts can appear in any order
1125 * *(if-feature-stmt stmtsep)
1126 * [status-stmt stmtsep]
1127 * [description-stmt stmtsep]
1128 * [reference-stmt stmtsep]
1129 * *((typedef-stmt /
1130 * grouping-stmt) stmtsep)
1131 * *(data-def-stmt stmtsep)
1132 * "}")
1133 * TODO : 0..1 occurance to be checked in listener
1134 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301135 notificationStatement : NOTIFICATION_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement | statusStatement
1136 | descriptionStatement | referenceStatement | typedefStatement | groupingStatement | dataDefStatement)*
Vidyashree Ramada621502016-02-05 22:32:34 +05301137 RIGHT_CURLY_BRACE);
1138
1139 /**
1140 * deviation-stmt = deviation-keyword sep
1141 * deviation-arg-str optsep
1142 * "{" stmtsep
1143 * ;; these stmts can appear in any order
1144 * [description-stmt stmtsep]
1145 * [reference-stmt stmtsep]
1146 * (deviate-not-supported-stmt /
1147 * 1*(deviate-add-stmt /
1148 * deviate-replace-stmt /
1149 * deviate-delete-stmt))
1150 * "}"
1151 * TODO : 0..1 occurance to be checked in listener
1152 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301153 deviationStatement: DEVIATION_KEYWORD deviation LEFT_CURLY_BRACE (descriptionStatement | referenceStatement
1154 | deviateNotSupportedStatement | deviateAddStatement | deviateReplaceStatement
1155 | deviateDeleteStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +05301156
1157 /**
1158 * deviate-not-supported-stmt =
1159 * deviate-keyword sep
1160 * not-supported-keyword optsep
1161 * (";" /
1162 * "{" stmtsep
1163 * "}")
1164 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301165 deviateNotSupportedStatement: DEVIATE_KEYWORD NOT_SUPPORTED_KEYWORD (STMTEND | LEFT_CURLY_BRACE RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +05301166
1167 /**
1168 * deviate-add-stmt = deviate-keyword sep add-keyword optsep
1169 * (";" /
1170 * "{" stmtsep
1171 * [units-stmt stmtsep]
1172 * *(must-stmt stmtsep)
1173 * *(unique-stmt stmtsep)
1174 * [default-stmt stmtsep]
1175 * [config-stmt stmtsep]
1176 * [mandatory-stmt stmtsep]
1177 * [min-elements-stmt stmtsep]
1178 * [max-elements-stmt stmtsep]
1179 * "}")
1180 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301181 deviateAddStatement: DEVIATE_KEYWORD ADD_KEYWORD (STMTEND | (LEFT_CURLY_BRACE unitsStatement? mustStatement* uniqueStatement*
1182 defaultStatement? configStatement? mandatoryStatement? minElementsStatement? maxElementsStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +05301183 RIGHT_CURLY_BRACE));
1184
1185 /**
1186 * deviate-delete-stmt = deviate-keyword sep delete-keyword optsep
1187 * (";" /
1188 * "{" stmtsep
1189 * [units-stmt stmtsep]
1190 * *(must-stmt stmtsep)
1191 * *(unique-stmt stmtsep)
1192 * [default-stmt stmtsep]
1193 * "}")
1194 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301195 deviateDeleteStatement: DEVIATE_KEYWORD DELETE_KEYWORD (STMTEND
1196 | (LEFT_CURLY_BRACE unitsStatement? mustStatement* uniqueStatement* defaultStatement? RIGHT_CURLY_BRACE));
Vidyashree Ramada621502016-02-05 22:32:34 +05301197
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301198 /**
Vidyashree Ramada621502016-02-05 22:32:34 +05301199 * deviate-replace-stmt = deviate-keyword sep replace-keyword optsep
1200 * (";" /
1201 * "{" stmtsep
1202 * [type-stmt stmtsep]
1203 * [units-stmt stmtsep]
1204 * [default-stmt stmtsep]
1205 * [config-stmt stmtsep]
1206 * [mandatory-stmt stmtsep]
1207 * [min-elements-stmt stmtsep]
1208 * [max-elements-stmt stmtsep]
1209 * "}")
1210 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301211 deviateReplaceStatement: DEVIATE_KEYWORD REPLACE_KEYWORD (STMTEND | (LEFT_CURLY_BRACE typeStatement? unitsStatement?
1212 defaultStatement? configStatement? mandatoryStatement? minElementsStatement?
1213 maxElementsStatement? RIGHT_CURLY_BRACE));
Vidyashree Ramada621502016-02-05 22:32:34 +05301214
Gaurav Agrawalb5a1c132016-02-21 02:56:46 +05301215 string : STRING (PLUS STRING)*
1216 | IDENTIFIER
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301217 | INTEGER
1218 | yangConstruct;
Vidyashree Rama468f8282016-03-04 19:08:35 +05301219
1220 identifier : STRING (PLUS STRING)*
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301221 | IDENTIFIER
1222 | yangConstruct;
Vidyashree Rama468f8282016-03-04 19:08:35 +05301223
1224 dateArgumentString : DATE_ARG
1225 | STRING (PLUS STRING)*;
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301226
1227 version : string;
1228
1229 range : string;
1230
1231 length : string;
1232
1233 path : string;
1234
1235 position : string;
1236
1237 status : string;
1238
1239 config : string;
1240
1241 mandatory : string;
1242
1243 orderedBy : string;
1244
1245 minValue : string;
1246
1247 maxValue : string;
1248
1249 key : string;
1250
1251 unique : string;
1252
1253 refine : string;
1254
1255 augment : string;
1256
1257 deviation : string;
1258
1259 yangConstruct : ANYXML_KEYWORD | ARGUMENT_KEYWORD | AUGMENT_KEYWORD | BASE_KEYWORD | BELONGS_TO_KEYWORD
1260 | BIT_KEYWORD | CASE_KEYWORD | CHOICE_KEYWORD | CONFIG_KEYWORD | CONTACT_KEYWORD | CONTAINER_KEYWORD
1261 | DEFAULT_KEYWORD | DESCRIPTION_KEYWORD | ENUM_KEYWORD ERROR_APP_TAG_KEYWORD | ERROR_MESSAGE_KEYWORD
1262 | EXTENSION_KEYWORD | DEVIATION_KEYWORD | DEVIATE_KEYWORD | FEATURE_KEYWORD
1263 | FRACTION_DIGITS_KEYWORD | GROUPING_KEYWORD | IDENTITY_KEYWORD | IF_FEATURE_KEYWORD
1264 | IMPORT_KEYWORD | INCLUDE_KEYWORD | INPUT_KEYWORD | KEY_KEYWORD | LEAF_KEYWORD | LEAF_LIST_KEYWORD
1265 | LENGTH_KEYWORD | LIST_KEYWORD | MANDATORY_KEYWORD | MAX_ELEMENTS_KEYWORD | MIN_ELEMENTS_KEYWORD
1266 | MODULE_KEYWORD | MUST_KEYWORD | NAMESPACE_KEYWORD | NOTIFICATION_KEYWORD | ORDERED_BY_KEYWORD
1267 | ORGANIZATION_KEYWORD | OUTPUT_KEYWORD | PATH_KEYWORD | PATTERN_KEYWORD |POSITION_KEYWORD
1268 | PREFIX_KEYWORD | PRESENCE_KEYWORD | RANGE_KEYWORD | REFERENCE_KEYWORD | REFINE_KEYWORD
1269 | REQUIRE_INSTANCE_KEYWORD | REVISION_KEYWORD | REVISION_DATE_KEYWORD | RPC_KEYWORD
1270 | STATUS_KEYWORD | SUBMODULE_KEYWORD | TYPE_KEYWORD | TYPEDEF_KEYWORD | UNIQUE_KEYWORD
1271 | UNITS_KEYWORD | USES_KEYWORD | VALUE_KEYWORD | WHEN_KEYWORD | YANG_VERSION_KEYWORD
1272 | YIN_ELEMENT_KEYWORD | ADD_KEYWORD | CURRENT_KEYWORD | DELETE_KEYWORD | DEPRECATED_KEYWORD
1273 | FALSE_KEYWORD | MAX_KEYWORD | MIN_KEYWORD | NOT_SUPPORTED_KEYWORD | OBSOLETE_KEYWORD
1274 | REPLACE_KEYWORD | SYSTEM_KEYWORD | TRUE_KEYWORD | UNBOUNDED_KEYWORD | USER_KEYWORD;