blob: 11e7833ca7e1f53836c9159ab6e2a696bc912fae [file] [log] [blame]
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301/*
Brian O'Connor0f7908b2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Vidyashree Rama66bc5252016-02-05 22:32:34 +05303 *
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 Agrawal607e05e2016-02-12 16:17:32 +053028 yangfile : moduleStatement
29 | subModuleStatement;
Vidyashree Rama66bc5252016-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 Rama07021a22016-03-09 20:41:44 +053043 moduleStatement : MODULE_KEYWORD identifier LEFT_CURLY_BRACE moduleBody RIGHT_CURLY_BRACE;
Vidyashree Rama66bc5252016-02-05 22:32:34 +053044
Gaurav Agrawal607e05e2016-02-12 16:17:32 +053045 moduleBody : moduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-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 Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +053067 linkageStatements : (importStatement
68 | includeStatement)*;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-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 Rama66bc5252016-02-05 22:32:34 +0530101 ;
102
103 // revision-stmts = *(revision-stmt stmtsep)
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530104 revisionStatements : revisionStatement*;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-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 Rama66bc5252016-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 Ramae68bb192016-03-15 10:18:25 +0530134 yangVersionStatement : YANG_VERSION_KEYWORD version STMTEND;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530141 namespaceStatement : NAMESPACE_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530142
143 /**
144 * prefix-stmt = prefix-keyword sep prefix-arg-str
145 * optsep stmtend
146 */
Vidyashree Ramad3221322016-03-04 19:08:35 +0530147 prefixStatement : PREFIX_KEYWORD identifier STMTEND;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530156 importStatement : IMPORT_KEYWORD identifier LEFT_CURLY_BRACE importStatementBody RIGHT_CURLY_BRACE;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530157
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530158 importStatementBody : prefixStatement revisionDateStatement?;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530159
160 // revision-date-stmt = revision-date-keyword sep revision-date stmtend
Vidyashree Ramad3221322016-03-04 19:08:35 +0530161 revisionDateStatement : REVISION_DATE_KEYWORD dateArgumentString STMTEND;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530170 includeStatement : INCLUDE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE revisionDateStatement? RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530171
172 /**
173 * organization-stmt = organization-keyword sep string
174 * optsep stmtend
175 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530176 organizationStatement : ORGANIZATION_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530177
178 // contact-stmt = contact-keyword sep string optsep stmtend
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530179 contactStatement : CONTACT_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530180
181 // description-stmt = description-keyword sep string optsep stmtend
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530182 descriptionStatement : DESCRIPTION_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530183
184 // reference-stmt = reference-keyword sep string optsep stmtend
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530185 referenceStatement : REFERENCE_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530195 revisionStatement : REVISION_KEYWORD dateArgumentString (STMTEND | LEFT_CURLY_BRACE revisionStatementBody RIGHT_CURLY_BRACE);
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530196 revisionStatementBody : descriptionStatement? referenceStatement?;
Vidyashree Rama66bc5252016-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 Rama07021a22016-03-09 20:41:44 +0530209 subModuleStatement : SUBMODULE_KEYWORD identifier LEFT_CURLY_BRACE submoduleBody RIGHT_CURLY_BRACE;
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530210 submoduleBody : submoduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530217 submoduleHeaderStatement : yangVersionStatement? belongstoStatement
218 | belongstoStatement yangVersionStatement?
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530228 belongstoStatement : BELONGS_TO_KEYWORD identifier LEFT_CURLY_BRACE belongstoStatementBody RIGHT_CURLY_BRACE;
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530229 belongstoStatementBody : prefixStatement;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530242 extensionStatement : EXTENSION_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE extensionBody RIGHT_CURLY_BRACE);
Gaurav Agrawal607e05e2016-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 Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530276 argumentStatement : ARGUMENT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE argumentBody RIGHT_CURLY_BRACE);
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530277 argumentBody : yinElementStatement?;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530278
279 /**
280 * yin-element-stmt = yin-element-keyword sep yin-element-arg-str
281 * stmtend
282 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530283 yinElementStatement : YIN_ELEMENT_KEYWORD (TRUE_KEYWORD | FALSE_KEYWORD) STMTEND;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530296 identityStatement : IDENTITY_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE identityBody RIGHT_CURLY_BRACE);
Gaurav Agrawal607e05e2016-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 Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530329 baseStatement : BASE_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-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 Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530378 dataDefStatement : containerStatement
379 | leafStatement
380 | leafListStatement
381 | listStatement
382 | choiceStatement
383 | usesStatement;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530384
385 /**
386 * if-feature-stmt = if-feature-keyword sep identifier-ref-arg-str
387 * optsep stmtend
388 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530389 ifFeatureStatement : IF_FEATURE_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530390
391 /**
392 * units-stmt = units-keyword sep string optsep stmtend
393 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530394 unitsStatement : UNITS_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530409 typedefStatement : TYPEDEF_KEYWORD identifier LEFT_CURLY_BRACE
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530410 (typeStatement | unitsStatement | defaultStatement | statusStatement | descriptionStatement | referenceStatement)*
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530420 typeStatement : TYPE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE typeBodyStatements RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530434 typeBodyStatements : numericalRestrictions | stringRestrictions | enumSpecification
435 | leafrefSpecification | identityrefSpecification | instanceIdentifierSpecification
436 | bitsSpecification | unionSpecification;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530437
438 /**
439 * numerical-restrictions = range-stmt stmtsep
440 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530441 numericalRestrictions : rangeStatement;
Vidyashree Rama66bc5252016-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 Ramae68bb192016-03-15 10:18:25 +0530454 rangeStatement : RANGE_KEYWORD range (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530455
Gaurav Agrawal607e05e2016-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 Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530487 stringRestrictions : ((lengthStatement)? (patternStatement)*) | ((patternStatement)* (lengthStatement)?);
Vidyashree Rama66bc5252016-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 Ramae68bb192016-03-15 10:18:25 +0530500 lengthStatement : LENGTH_KEYWORD length
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530501 (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530514 patternStatement : PATTERN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530515
516 /**
517 * default-stmt = default-keyword sep string stmtend
518 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530519 defaultStatement : DEFAULT_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530520
521 /**
522 * enum-specification = 1*(enum-stmt stmtsep)
523 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530524 enumSpecification : enumStatement+;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530537 enumStatement : ENUM_KEYWORD string (STMTEND | LEFT_CURLY_BRACE enumStatementBody RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530538
Gaurav Agrawal607e05e2016-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 Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530571 leafrefSpecification : (pathStatement (requireInstanceStatement)?) | ((requireInstanceStatement)? pathStatement);
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530572
573 /**
574 * path-stmt = path-keyword sep path-arg-str stmtend
575 */
Vidyashree Ramae68bb192016-03-15 10:18:25 +0530576 pathStatement : PATH_KEYWORD path STMTEND;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530585 requireInstanceStatement : REQUIRE_INSTANCE_KEYWORD (TRUE_KEYWORD | FALSE_KEYWORD) STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530586
587 /**
588 * instance-identifier-specification =
589 * [require-instance-stmt stmtsep]
590 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530591 instanceIdentifierSpecification : requireInstanceStatement?;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530592
593 /**
594 * identityref-specification =
595 * base-stmt stmtsep
596 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530597 identityrefSpecification : baseStatement;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530598
599 /**
600 * union-specification = 1*(type-stmt stmtsep)
601 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530602 unionSpecification : typeStatement+;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530603
604 /**
605 * bits-specification = 1*(bit-stmt stmtsep)
606 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530607 bitsSpecification : bitStatement+;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530621 bitStatement : BIT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE bitBodyStatement RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530622
Gaurav Agrawal607e05e2016-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 Rama66bc5252016-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 Ramae68bb192016-03-15 10:18:25 +0530656 positionStatement : POSITION_KEYWORD position STMTEND;
Vidyashree Rama66bc5252016-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 Ramae68bb192016-03-15 10:18:25 +0530666 statusStatement : STATUS_KEYWORD status STMTEND;
Vidyashree Rama66bc5252016-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 Ramae68bb192016-03-15 10:18:25 +0530675 configStatement : CONFIG_KEYWORD config STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530676
677 /**
678 * mandatory-stmt = mandatory-keyword sep
679 * mandatory-arg-str stmtend
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530680 *
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530681 * mandatory-arg-str = < a string that matches the rule
682 * mandatory-arg >
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530683 *
684 * mandatory-arg = true-keyword / false-keyword
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530685 */
Vidyashree Ramae68bb192016-03-15 10:18:25 +0530686 mandatoryStatement : MANDATORY_KEYWORD mandatory STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530687
688 /**
689 * presence-stmt = presence-keyword sep string stmtend
690 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530691 presenceStatement : PRESENCE_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530692
693 /**
694 * ordered-by-stmt = ordered-by-keyword sep
695 * ordered-by-arg-str stmtend
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530696 *
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530697 * ordered-by-arg-str = < a string that matches the rule
698 * ordered-by-arg >
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530699 *
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530700 * ordered-by-arg = user-keyword / system-keyword
701 */
Vidyashree Ramae68bb192016-03-15 10:18:25 +0530702 orderedByStatement : ORDERED_BY_KEYWORD orderedBy STMTEND;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530715 mustStatement : MUST_KEYWORD string (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530716
717 /**
718 * error-message-stmt = error-message-keyword sep string stmtend
719 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530720 errorMessageStatement : ERROR_MESSAGE_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530721
722 /**
723 * error-app-tag-stmt = error-app-tag-keyword sep string stmtend
724 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530725 errorAppTagStatement : ERROR_APP_TAG_KEYWORD string STMTEND;
Vidyashree Rama66bc5252016-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 Ramae68bb192016-03-15 10:18:25 +0530734 minElementsStatement : MIN_ELEMENTS_KEYWORD minValue STMTEND;
Vidyashree Rama66bc5252016-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 Rama66bc5252016-02-05 22:32:34 +0530741 * max-value-arg = unbounded-keyword /
742 * positive-integer-value
743 */
Vidyashree Ramae68bb192016-03-15 10:18:25 +0530744 maxElementsStatement : MAX_ELEMENTS_KEYWORD maxValue STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530745
746 /**
747 * value-stmt = value-keyword sep integer-value stmtend
748 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530749 valueStatement : VALUE_KEYWORD ((MINUS INTEGER) | INTEGER) STMTEND;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530765 groupingStatement : GROUPING_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530766 (statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement
767 | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530788 containerStatement : CONTAINER_KEYWORD identifier
Gaurav Agrawal607e05e2016-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 Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530811 leafStatement : LEAF_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement | unitsStatement
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530812 | mustStatement | defaultStatement | configStatement | mandatoryStatement | statusStatement | descriptionStatement
813 | referenceStatement)* RIGHT_CURLY_BRACE;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530834 leafListStatement : LEAF_LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530835 | unitsStatement | mustStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement
836 | statusStatement | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530860 listStatement : LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | keyStatement
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530861 | uniqueStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement | statusStatement
862 | descriptionStatement | referenceStatement | typedefStatement | groupingStatement| dataDefStatement)* RIGHT_CURLY_BRACE;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530863
864 /**
865 * key-stmt = key-keyword sep key-arg-str stmtend
866 */
Vidyashree Ramae68bb192016-03-15 10:18:25 +0530867 keyStatement : KEY_KEYWORD key STMTEND;
Vidyashree Rama66bc5252016-02-05 22:32:34 +0530868
869 /**
870 * unique-stmt = unique-keyword sep unique-arg-str stmtend
871 */
Vidyashree Ramae68bb192016-03-15 10:18:25 +0530872 uniqueStatement: UNIQUE_KEYWORD unique STMTEND;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530891 choiceStatement : CHOICE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | defaultStatement
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530892 | configStatement | mandatoryStatement | statusStatement | descriptionStatement | referenceStatement | shortCaseStatement
893 | caseStatement)* RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530902 shortCaseStatement : containerStatement | leafStatement | leafListStatement | listStatement;
Vidyashree Rama66bc5252016-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 Ramad3221322016-03-04 19:08:35 +0530918 caseStatement : CASE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
Gaurav Agrawal607e05e2016-02-12 16:17:32 +0530919 | descriptionStatement | referenceStatement | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-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 Rama66bc5252016-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 Ramae68bb192016-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 Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530966 refineContainerStatements : (mustStatement | presenceStatement | configStatement | descriptionStatement | referenceStatement)* ;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530978 refineLeafStatements : (mustStatement | defaultStatement | configStatement | mandatoryStatement | descriptionStatement | referenceStatement)*;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +0530991 refineLeafListStatements : (mustStatement | configStatement | minElementsStatement | maxElementsStatement | descriptionStatement
992 | referenceStatement)*;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +05301004 refineListStatements : (mustStatement | configStatement | minElementsStatement | maxElementsStatement | descriptionStatement
1005 | referenceStatement)*;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +05301016 refineChoiceStatements : (defaultStatement | configStatement | mandatoryStatement | descriptionStatement | referenceStatement)*;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +05301024 refineCaseStatements : (descriptionStatement | referenceStatement)? | (referenceStatement | descriptionStatement)?;
Vidyashree Rama66bc5252016-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 Ramae68bb192016-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 Rama66bc5252016-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 */
Vidyashree Ramae2bd9ba2016-03-29 14:37:02 +05301058 augmentStatement : AUGMENT_KEYWORD augment LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
Gaurav Agrawal607e05e2016-02-12 16:17:32 +05301059 | descriptionStatement | referenceStatement | dataDefStatement | caseStatement)* RIGHT_CURLY_BRACE;
Vidyashree Rama66bc5252016-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 Agrawal607e05e2016-02-12 16:17:32 +05301071 whenStatement : WHEN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE ((descriptionStatement? referenceStatement?)
1072 | (referenceStatement? descriptionStatement?)) RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-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 * "}")
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301088 */
Vidyashree Ramad3221322016-03-04 19:08:35 +05301089 rpcStatement : RPC_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement | statusStatement | descriptionStatement
Gaurav Agrawal607e05e2016-02-12 16:17:32 +05301090 | referenceStatement | typedefStatement | groupingStatement | inputStatement | outputStatement)* RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301091
1092 /**
1093 * input-stmt = input-keyword optsep
1094 * "{" stmtsep
1095 * ;; these stmts can appear in any order
1096 * *((typedef-stmt /
1097 * grouping-stmt) stmtsep)
1098 * 1*(data-def-stmt stmtsep)
1099 * "}"
1100 */
janani b06eca9b2016-04-26 18:49:20 +05301101 inputStatement : INPUT_KEYWORD LEFT_CURLY_BRACE (typedefStatement | groupingStatement | dataDefStatement)* RIGHT_CURLY_BRACE;
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301102
1103 /**
1104 * output-stmt = output-keyword optsep
1105 * "{" stmtsep
1106 * ;; these stmts can appear in any order
1107 * *((typedef-stmt /
1108 * grouping-stmt) stmtsep)
1109 * 1*(data-def-stmt stmtsep)
1110 * "}"
1111 */
janani b06eca9b2016-04-26 18:49:20 +05301112 outputStatement : OUTPUT_KEYWORD LEFT_CURLY_BRACE (typedefStatement | groupingStatement | dataDefStatement)* RIGHT_CURLY_BRACE;
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301113
1114 /**
1115 * notification-stmt = notification-keyword sep
1116 * identifier-arg-str optsep
1117 * (";" /
1118 * "{" stmtsep
1119 * ;; these stmts can appear in any order
1120 * *(if-feature-stmt stmtsep)
1121 * [status-stmt stmtsep]
1122 * [description-stmt stmtsep]
1123 * [reference-stmt stmtsep]
1124 * *((typedef-stmt /
1125 * grouping-stmt) stmtsep)
1126 * *(data-def-stmt stmtsep)
1127 * "}")
1128 * TODO : 0..1 occurance to be checked in listener
1129 */
Vidyashree Rama620b6e92016-03-28 11:59:27 +05301130 notificationStatement : NOTIFICATION_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement
1131 | statusStatement | descriptionStatement | referenceStatement | typedefStatement
1132 | groupingStatement | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301133
1134 /**
1135 * deviation-stmt = deviation-keyword sep
1136 * deviation-arg-str optsep
1137 * "{" stmtsep
1138 * ;; these stmts can appear in any order
1139 * [description-stmt stmtsep]
1140 * [reference-stmt stmtsep]
1141 * (deviate-not-supported-stmt /
1142 * 1*(deviate-add-stmt /
1143 * deviate-replace-stmt /
1144 * deviate-delete-stmt))
1145 * "}"
1146 * TODO : 0..1 occurance to be checked in listener
1147 */
Vidyashree Ramae68bb192016-03-15 10:18:25 +05301148 deviationStatement: DEVIATION_KEYWORD deviation LEFT_CURLY_BRACE (descriptionStatement | referenceStatement
1149 | deviateNotSupportedStatement | deviateAddStatement | deviateReplaceStatement
1150 | deviateDeleteStatement)* RIGHT_CURLY_BRACE;
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301151
1152 /**
1153 * deviate-not-supported-stmt =
1154 * deviate-keyword sep
1155 * not-supported-keyword optsep
1156 * (";" /
1157 * "{" stmtsep
1158 * "}")
1159 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +05301160 deviateNotSupportedStatement: DEVIATE_KEYWORD NOT_SUPPORTED_KEYWORD (STMTEND | LEFT_CURLY_BRACE RIGHT_CURLY_BRACE);
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301161
1162 /**
1163 * deviate-add-stmt = deviate-keyword sep add-keyword optsep
1164 * (";" /
1165 * "{" stmtsep
1166 * [units-stmt stmtsep]
1167 * *(must-stmt stmtsep)
1168 * *(unique-stmt stmtsep)
1169 * [default-stmt stmtsep]
1170 * [config-stmt stmtsep]
1171 * [mandatory-stmt stmtsep]
1172 * [min-elements-stmt stmtsep]
1173 * [max-elements-stmt stmtsep]
1174 * "}")
1175 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +05301176 deviateAddStatement: DEVIATE_KEYWORD ADD_KEYWORD (STMTEND | (LEFT_CURLY_BRACE unitsStatement? mustStatement* uniqueStatement*
1177 defaultStatement? configStatement? mandatoryStatement? minElementsStatement? maxElementsStatement?
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301178 RIGHT_CURLY_BRACE));
1179
1180 /**
1181 * deviate-delete-stmt = deviate-keyword sep delete-keyword optsep
1182 * (";" /
1183 * "{" stmtsep
1184 * [units-stmt stmtsep]
1185 * *(must-stmt stmtsep)
1186 * *(unique-stmt stmtsep)
1187 * [default-stmt stmtsep]
1188 * "}")
1189 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +05301190 deviateDeleteStatement: DEVIATE_KEYWORD DELETE_KEYWORD (STMTEND
1191 | (LEFT_CURLY_BRACE unitsStatement? mustStatement* uniqueStatement* defaultStatement? RIGHT_CURLY_BRACE));
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301192
Gaurav Agrawal607e05e2016-02-12 16:17:32 +05301193 /**
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301194 * deviate-replace-stmt = deviate-keyword sep replace-keyword optsep
1195 * (";" /
1196 * "{" stmtsep
1197 * [type-stmt stmtsep]
1198 * [units-stmt stmtsep]
1199 * [default-stmt stmtsep]
1200 * [config-stmt stmtsep]
1201 * [mandatory-stmt stmtsep]
1202 * [min-elements-stmt stmtsep]
1203 * [max-elements-stmt stmtsep]
1204 * "}")
1205 */
Gaurav Agrawal607e05e2016-02-12 16:17:32 +05301206 deviateReplaceStatement: DEVIATE_KEYWORD REPLACE_KEYWORD (STMTEND | (LEFT_CURLY_BRACE typeStatement? unitsStatement?
1207 defaultStatement? configStatement? mandatoryStatement? minElementsStatement?
1208 maxElementsStatement? RIGHT_CURLY_BRACE));
Vidyashree Rama66bc5252016-02-05 22:32:34 +05301209
Gaurav Agrawal0520c7c2016-02-21 02:56:46 +05301210 string : STRING (PLUS STRING)*
1211 | IDENTIFIER
Vidyashree Ramae68bb192016-03-15 10:18:25 +05301212 | INTEGER
1213 | yangConstruct;
Vidyashree Ramad3221322016-03-04 19:08:35 +05301214
1215 identifier : STRING (PLUS STRING)*
Vidyashree Ramae68bb192016-03-15 10:18:25 +05301216 | IDENTIFIER
1217 | yangConstruct;
Vidyashree Ramad3221322016-03-04 19:08:35 +05301218
1219 dateArgumentString : DATE_ARG
1220 | STRING (PLUS STRING)*;
Vidyashree Ramae68bb192016-03-15 10:18:25 +05301221
1222 version : string;
1223
1224 range : string;
1225
1226 length : string;
1227
1228 path : string;
1229
1230 position : string;
1231
1232 status : string;
1233
1234 config : string;
1235
1236 mandatory : string;
1237
1238 orderedBy : string;
1239
1240 minValue : string;
1241
1242 maxValue : string;
1243
1244 key : string;
1245
1246 unique : string;
1247
1248 refine : string;
1249
1250 augment : string;
1251
1252 deviation : string;
1253
1254 yangConstruct : ANYXML_KEYWORD | ARGUMENT_KEYWORD | AUGMENT_KEYWORD | BASE_KEYWORD | BELONGS_TO_KEYWORD
1255 | BIT_KEYWORD | CASE_KEYWORD | CHOICE_KEYWORD | CONFIG_KEYWORD | CONTACT_KEYWORD | CONTAINER_KEYWORD
1256 | DEFAULT_KEYWORD | DESCRIPTION_KEYWORD | ENUM_KEYWORD ERROR_APP_TAG_KEYWORD | ERROR_MESSAGE_KEYWORD
1257 | EXTENSION_KEYWORD | DEVIATION_KEYWORD | DEVIATE_KEYWORD | FEATURE_KEYWORD
1258 | FRACTION_DIGITS_KEYWORD | GROUPING_KEYWORD | IDENTITY_KEYWORD | IF_FEATURE_KEYWORD
1259 | IMPORT_KEYWORD | INCLUDE_KEYWORD | INPUT_KEYWORD | KEY_KEYWORD | LEAF_KEYWORD | LEAF_LIST_KEYWORD
1260 | LENGTH_KEYWORD | LIST_KEYWORD | MANDATORY_KEYWORD | MAX_ELEMENTS_KEYWORD | MIN_ELEMENTS_KEYWORD
1261 | MODULE_KEYWORD | MUST_KEYWORD | NAMESPACE_KEYWORD | NOTIFICATION_KEYWORD | ORDERED_BY_KEYWORD
1262 | ORGANIZATION_KEYWORD | OUTPUT_KEYWORD | PATH_KEYWORD | PATTERN_KEYWORD |POSITION_KEYWORD
1263 | PREFIX_KEYWORD | PRESENCE_KEYWORD | RANGE_KEYWORD | REFERENCE_KEYWORD | REFINE_KEYWORD
1264 | REQUIRE_INSTANCE_KEYWORD | REVISION_KEYWORD | REVISION_DATE_KEYWORD | RPC_KEYWORD
1265 | STATUS_KEYWORD | SUBMODULE_KEYWORD | TYPE_KEYWORD | TYPEDEF_KEYWORD | UNIQUE_KEYWORD
1266 | UNITS_KEYWORD | USES_KEYWORD | VALUE_KEYWORD | WHEN_KEYWORD | YANG_VERSION_KEYWORD
1267 | YIN_ELEMENT_KEYWORD | ADD_KEYWORD | CURRENT_KEYWORD | DELETE_KEYWORD | DEPRECATED_KEYWORD
1268 | FALSE_KEYWORD | MAX_KEYWORD | MIN_KEYWORD | NOT_SUPPORTED_KEYWORD | OBSOLETE_KEYWORD
1269 | REPLACE_KEYWORD | SYSTEM_KEYWORD | TRUE_KEYWORD | UNBOUNDED_KEYWORD | USER_KEYWORD;