blob: 55a7a35f8fa6c54e4bb0d60bbc612d33d67b6a4b [file] [log] [blame]
Vidyashree Ramada621502016-02-05 22:32:34 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Vidyashree Ramada621502016-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
janani bdd1314f2016-05-19 17:39:50 +053028 yangfile : moduleStatement EOF
29 | subModuleStatement EOF;
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
Vidyashree Rama1db15562016-05-17 16:16:15 +0530383 | anyxmlStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530384 | usesStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +0530385
386 /**
387 * if-feature-stmt = if-feature-keyword sep identifier-ref-arg-str
388 * optsep stmtend
389 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530390 ifFeatureStatement : IF_FEATURE_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530391
392 /**
393 * units-stmt = units-keyword sep string optsep stmtend
394 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530395 unitsStatement : UNITS_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530396
397 /**
398 * typedef-stmt = typedef-keyword sep identifier-arg-str optsep
399 * "{" stmtsep
400 * ;; these stmts can appear in any order
401 * type-stmt stmtsep
402 * [units-stmt stmtsep]
403 * [default-stmt stmtsep]
404 * [status-stmt stmtsep]
405 * [description-stmt stmtsep]
406 * [reference-stmt stmtsep]
407 * "}"
408 * TODO : 0..1 occurance to be validated in listener
409 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530410 typedefStatement : TYPEDEF_KEYWORD identifier LEFT_CURLY_BRACE
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530411 (typeStatement | unitsStatement | defaultStatement | statusStatement | descriptionStatement | referenceStatement)*
Vidyashree Ramada621502016-02-05 22:32:34 +0530412 RIGHT_CURLY_BRACE;
413
414 /**
415 * type-stmt = type-keyword sep identifier-ref-arg-str optsep
416 * (";" /
417 * "{" stmtsep
418 * type-body-stmts
419 * "}")
420 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530421 typeStatement : TYPE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE typeBodyStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530422
423 /**
424 * type-body-stmts = numerical-restrictions /
425 * decimal64-specification /
426 * string-restrictions /
427 * enum-specification /
428 * leafref-specification /
429 * identityref-specification /
430 * instance-identifier-specification /
431 * bits-specification /
432 * union-specification
Vidyashree Rama1db15562016-05-17 16:16:15 +0530433 *
Vidyashree Ramada621502016-02-05 22:32:34 +0530434 */
Vidyashree Rama1db15562016-05-17 16:16:15 +0530435 typeBodyStatements : numericalRestrictions | decimal64Specification | stringRestrictions | enumSpecification
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530436 | leafrefSpecification | identityrefSpecification | instanceIdentifierSpecification
437 | bitsSpecification | unionSpecification;
Vidyashree Ramada621502016-02-05 22:32:34 +0530438
439 /**
Vidyashree Rama1db15562016-05-17 16:16:15 +0530440 * fraction-digits-stmt = fraction-digits-keyword sep
441 * fraction-digits-arg-str stmtend
442 *
443 * fraction-digits-arg-str = < a string that matches the rule
444 * fraction-digits-arg >
445 *
446 * fraction-digits-arg = ("1" ["0" / "1" / "2" / "3" / "4" /
447 * "5" / "6" / "7" / "8"])
448 * / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"
449 */
450 decimal64Specification : FRACTION_DIGITS_KEYWORD fraction STMTEND;
451
452 /**
Vidyashree Ramada621502016-02-05 22:32:34 +0530453 * numerical-restrictions = range-stmt stmtsep
454 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530455 numericalRestrictions : rangeStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +0530456
457 /**
458 * range-stmt = range-keyword sep range-arg-str optsep
459 * (";" /
460 * "{" stmtsep
461 * ;; these stmts can appear in any order
462 * [error-message-stmt stmtsep]
463 * [error-app-tag-stmt stmtsep]
464 * [description-stmt stmtsep]
465 * [reference-stmt stmtsep]
466 * "}")
467 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530468 rangeStatement : RANGE_KEYWORD range (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530469
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530470 commonStatements : errorMessageStatement? errorAppTagStatement? descriptionStatement? referenceStatement?
471 | errorMessageStatement? errorAppTagStatement? referenceStatement? descriptionStatement?
472 | errorMessageStatement? descriptionStatement? errorAppTagStatement? referenceStatement?
473 | errorMessageStatement? descriptionStatement? referenceStatement? errorAppTagStatement?
474 | errorMessageStatement? referenceStatement? errorAppTagStatement? descriptionStatement?
475 | errorMessageStatement? referenceStatement? descriptionStatement? errorAppTagStatement?
476 | errorAppTagStatement? errorMessageStatement? descriptionStatement? referenceStatement?
477 | errorAppTagStatement? errorMessageStatement? referenceStatement? descriptionStatement?
478 | errorAppTagStatement? descriptionStatement? descriptionStatement? errorMessageStatement?
479 | errorAppTagStatement? descriptionStatement? errorMessageStatement? descriptionStatement?
480 | errorAppTagStatement? referenceStatement? errorMessageStatement? descriptionStatement?
481 | errorAppTagStatement? referenceStatement? descriptionStatement? errorMessageStatement?
482 | descriptionStatement? errorMessageStatement? errorAppTagStatement? referenceStatement?
483 | descriptionStatement? errorMessageStatement? referenceStatement? errorAppTagStatement?
484 | descriptionStatement? errorAppTagStatement? errorMessageStatement? referenceStatement?
485 | descriptionStatement? errorAppTagStatement? referenceStatement? errorMessageStatement?
486 | descriptionStatement? referenceStatement? errorMessageStatement? errorAppTagStatement?
487 | descriptionStatement? referenceStatement? errorAppTagStatement? errorMessageStatement?
488 | referenceStatement? errorMessageStatement? descriptionStatement? errorAppTagStatement?
489 | referenceStatement? errorMessageStatement? errorAppTagStatement? descriptionStatement?
490 | referenceStatement? errorAppTagStatement? descriptionStatement? errorMessageStatement?
491 | referenceStatement? errorAppTagStatement? errorMessageStatement? descriptionStatement?
492 | referenceStatement? descriptionStatement? errorMessageStatement? errorAppTagStatement?
493 | referenceStatement? descriptionStatement? errorAppTagStatement? errorMessageStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530494 ;
495
496 /**
497 * string-restrictions = ;; these stmts can appear in any order
498 * [length-stmt stmtsep]
499 * *(pattern-stmt stmtsep)
500 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530501 stringRestrictions : ((lengthStatement)? (patternStatement)*) | ((patternStatement)* (lengthStatement)?);
Vidyashree Ramada621502016-02-05 22:32:34 +0530502
503 /**
504 * length-stmt = length-keyword sep length-arg-str 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 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530514 lengthStatement : LENGTH_KEYWORD length
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530515 (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530516
517 /**
518 * pattern-stmt = pattern-keyword sep string optsep
519 * (";" /
520 * "{" stmtsep
521 * ;; these stmts can appear in any order
522 * [error-message-stmt stmtsep]
523 * [error-app-tag-stmt stmtsep]
524 * [description-stmt stmtsep]
525 * [reference-stmt stmtsep]
526 * "}")
527 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530528 patternStatement : PATTERN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530529
530 /**
531 * default-stmt = default-keyword sep string stmtend
532 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530533 defaultStatement : DEFAULT_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530534
535 /**
536 * enum-specification = 1*(enum-stmt stmtsep)
537 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530538 enumSpecification : enumStatement+;
Vidyashree Ramada621502016-02-05 22:32:34 +0530539
540 /**
541 * enum-stmt = enum-keyword sep string optsep
542 * (";" /
543 * "{" stmtsep
544 * ;; these stmts can appear in any order
545 * [value-stmt stmtsep]
546 * [status-stmt stmtsep]
547 * [description-stmt stmtsep]
548 * [reference-stmt stmtsep]
549 * "}")
550 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530551 enumStatement : ENUM_KEYWORD string (STMTEND | LEFT_CURLY_BRACE enumStatementBody RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530552
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530553 enumStatementBody : valueStatement? statusStatement? descriptionStatement? referenceStatement?
554 | valueStatement? statusStatement? referenceStatement? descriptionStatement?
555 | valueStatement? descriptionStatement? statusStatement? referenceStatement?
556 | valueStatement? descriptionStatement? referenceStatement? statusStatement?
557 | valueStatement? referenceStatement? statusStatement? descriptionStatement?
558 | valueStatement? referenceStatement? descriptionStatement? statusStatement?
559 | statusStatement? valueStatement? descriptionStatement? referenceStatement?
560 | statusStatement? valueStatement? referenceStatement? descriptionStatement?
561 | statusStatement? descriptionStatement? descriptionStatement? valueStatement?
562 | statusStatement? descriptionStatement? valueStatement? descriptionStatement?
563 | statusStatement? referenceStatement? valueStatement? descriptionStatement?
564 | statusStatement? referenceStatement? descriptionStatement? valueStatement?
565 | descriptionStatement? valueStatement? statusStatement? referenceStatement?
566 | descriptionStatement? valueStatement? referenceStatement? statusStatement?
567 | descriptionStatement? statusStatement? valueStatement? referenceStatement?
568 | descriptionStatement? statusStatement? referenceStatement? valueStatement?
569 | descriptionStatement? referenceStatement? valueStatement? statusStatement?
570 | descriptionStatement? referenceStatement? statusStatement? valueStatement?
571 | referenceStatement? valueStatement? descriptionStatement? statusStatement?
572 | referenceStatement? valueStatement? statusStatement? descriptionStatement?
573 | referenceStatement? statusStatement? descriptionStatement? valueStatement?
574 | referenceStatement? statusStatement? valueStatement? descriptionStatement?
575 | referenceStatement? descriptionStatement? valueStatement? statusStatement?
576 | referenceStatement? descriptionStatement? statusStatement? valueStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530577 ;
578
579 /**
580 * leafref-specification =
581 * ;; these stmts can appear in any order
582 * path-stmt stmtsep
583 * [require-instance-stmt stmtsep]
584 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530585 leafrefSpecification : (pathStatement (requireInstanceStatement)?) | ((requireInstanceStatement)? pathStatement);
Vidyashree Ramada621502016-02-05 22:32:34 +0530586
587 /**
588 * path-stmt = path-keyword sep path-arg-str stmtend
589 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530590 pathStatement : PATH_KEYWORD path STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530591
592 /**
593 * require-instance-stmt = require-instance-keyword sep
594 * require-instance-arg-str stmtend
595 * require-instance-arg-str = < a string that matches the rule
596 * require-instance-arg >
597 * require-instance-arg = true-keyword / false-keyword
598 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530599 requireInstanceStatement : REQUIRE_INSTANCE_KEYWORD (TRUE_KEYWORD | FALSE_KEYWORD) STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530600
601 /**
602 * instance-identifier-specification =
603 * [require-instance-stmt stmtsep]
604 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530605 instanceIdentifierSpecification : requireInstanceStatement?;
Vidyashree Ramada621502016-02-05 22:32:34 +0530606
607 /**
608 * identityref-specification =
609 * base-stmt stmtsep
610 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530611 identityrefSpecification : baseStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +0530612
613 /**
614 * union-specification = 1*(type-stmt stmtsep)
615 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530616 unionSpecification : typeStatement+;
Vidyashree Ramada621502016-02-05 22:32:34 +0530617
618 /**
619 * bits-specification = 1*(bit-stmt stmtsep)
620 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530621 bitsSpecification : bitStatement+;
Vidyashree Ramada621502016-02-05 22:32:34 +0530622
623 /**
624 * bit-stmt = bit-keyword sep identifier-arg-str optsep
625 * (";" /
626 * "{" stmtsep
627 * ;; these stmts can appear in any order
628 * [position-stmt stmtsep]
629 * [status-stmt stmtsep]
630 * [description-stmt stmtsep]
631 * [reference-stmt stmtsep]
632 * "}"
633 * "}")
634 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530635 bitStatement : BIT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE bitBodyStatement RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530636
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530637 bitBodyStatement : positionStatement? statusStatement? descriptionStatement? referenceStatement?
638 | positionStatement? statusStatement? referenceStatement? descriptionStatement?
639 | positionStatement? descriptionStatement? statusStatement? referenceStatement?
640 | positionStatement? descriptionStatement? referenceStatement? statusStatement?
641 | positionStatement? referenceStatement? statusStatement? descriptionStatement?
642 | positionStatement? referenceStatement? descriptionStatement? statusStatement?
643 | statusStatement? positionStatement? descriptionStatement? referenceStatement?
644 | statusStatement? positionStatement? referenceStatement? descriptionStatement?
645 | statusStatement? descriptionStatement? descriptionStatement? positionStatement?
646 | statusStatement? descriptionStatement? positionStatement? descriptionStatement?
647 | statusStatement? referenceStatement? positionStatement? descriptionStatement?
648 | statusStatement? referenceStatement? descriptionStatement? positionStatement?
649 | descriptionStatement? positionStatement? statusStatement? referenceStatement?
650 | descriptionStatement? positionStatement? referenceStatement? statusStatement?
651 | descriptionStatement? statusStatement? positionStatement? referenceStatement?
652 | descriptionStatement? statusStatement? referenceStatement? positionStatement?
653 | descriptionStatement? referenceStatement? positionStatement? statusStatement?
654 | descriptionStatement? referenceStatement? statusStatement? positionStatement?
655 | referenceStatement? positionStatement? descriptionStatement? statusStatement?
656 | referenceStatement? positionStatement? statusStatement? descriptionStatement?
657 | referenceStatement? statusStatement? descriptionStatement? positionStatement?
658 | referenceStatement? statusStatement? positionStatement? descriptionStatement?
659 | referenceStatement? descriptionStatement? positionStatement? statusStatement?
660 | referenceStatement? descriptionStatement? statusStatement? positionStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +0530661 ;
662
663 /**
664 * position-stmt = position-keyword sep
665 * position-value-arg-str stmtend
666 * position-value-arg-str = < a string that matches the rule
667 * position-value-arg >
668 * position-value-arg = non-negative-integer-value
669 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530670 positionStatement : POSITION_KEYWORD position STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530671
672 /**
673 * status-stmt = status-keyword sep status-arg-str stmtend
674 * status-arg-str = < a string that matches the rule
675 * status-arg >
676 * status-arg = current-keyword /
677 * obsolete-keyword /
678 * deprecated-keyword
679 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530680 statusStatement : STATUS_KEYWORD status STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530681
682 /**
683 * config-stmt = config-keyword sep
684 * config-arg-str stmtend
685 * config-arg-str = < a string that matches the rule
686 * config-arg >
687 * config-arg = true-keyword / false-keyword
688 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530689 configStatement : CONFIG_KEYWORD config STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530690
691 /**
692 * mandatory-stmt = mandatory-keyword sep
693 * mandatory-arg-str stmtend
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530694 *
Vidyashree Ramada621502016-02-05 22:32:34 +0530695 * mandatory-arg-str = < a string that matches the rule
696 * mandatory-arg >
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530697 *
698 * mandatory-arg = true-keyword / false-keyword
Vidyashree Ramada621502016-02-05 22:32:34 +0530699 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530700 mandatoryStatement : MANDATORY_KEYWORD mandatory STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530701
702 /**
703 * presence-stmt = presence-keyword sep string stmtend
704 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530705 presenceStatement : PRESENCE_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530706
707 /**
708 * ordered-by-stmt = ordered-by-keyword sep
709 * ordered-by-arg-str stmtend
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530710 *
Vidyashree Ramada621502016-02-05 22:32:34 +0530711 * ordered-by-arg-str = < a string that matches the rule
712 * ordered-by-arg >
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530713 *
Vidyashree Ramada621502016-02-05 22:32:34 +0530714 * ordered-by-arg = user-keyword / system-keyword
715 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530716 orderedByStatement : ORDERED_BY_KEYWORD orderedBy STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530717
718 /**
719 * must-stmt = must-keyword sep string optsep
720 * (";" /
721 * "{" stmtsep
722 * ;; these stmts can appear in any order
723 * [error-message-stmt stmtsep]
724 * [error-app-tag-stmt stmtsep]
725 * [description-stmt stmtsep]
726 * [reference-stmt stmtsep]
727 * "}")
728 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530729 mustStatement : MUST_KEYWORD string (STMTEND | LEFT_CURLY_BRACE commonStatements RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530730
731 /**
732 * error-message-stmt = error-message-keyword sep string stmtend
733 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530734 errorMessageStatement : ERROR_MESSAGE_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530735
736 /**
737 * error-app-tag-stmt = error-app-tag-keyword sep string stmtend
738 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530739 errorAppTagStatement : ERROR_APP_TAG_KEYWORD string STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530740
741 /**
742 * min-elements-stmt = min-elements-keyword sep
743 * min-value-arg-str stmtend
744 * min-value-arg-str = < a string that matches the rule
745 * min-value-arg >
746 * min-value-arg = non-negative-integer-value
747 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530748 minElementsStatement : MIN_ELEMENTS_KEYWORD minValue STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530749
750 /**
751 * max-elements-stmt = max-elements-keyword sep
752 * max-value-arg-str stmtend
753 * max-value-arg-str = < a string that matches the rule
754 * max-value-arg >
Vidyashree Ramada621502016-02-05 22:32:34 +0530755 * max-value-arg = unbounded-keyword /
756 * positive-integer-value
757 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530758 maxElementsStatement : MAX_ELEMENTS_KEYWORD maxValue STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530759
760 /**
761 * value-stmt = value-keyword sep integer-value stmtend
762 */
Vidyashree Rama1db15562016-05-17 16:16:15 +0530763 valueStatement : VALUE_KEYWORD value STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530764
765 /**
766 * grouping-stmt = grouping-keyword sep identifier-arg-str optsep
767 * (";" /
768 * "{" stmtsep
769 * ;; these stmts can appear in any order
770 * [status-stmt stmtsep]
771 * [description-stmt stmtsep]
772 * [reference-stmt stmtsep]
773 * *((typedef-stmt /
774 * grouping-stmt) stmtsep)
775 * *(data-def-stmt stmtsep)
776 * "}")
777 * TODO : 0..1 occurance to be checked in listener
778 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530779 groupingStatement : GROUPING_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530780 (statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement
781 | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530782
783 /**
784 * container-stmt = container-keyword sep identifier-arg-str optsep
785 * (";" /
786 * "{" stmtsep
787 * ;; these stmts can appear in any order
788 * [when-stmt stmtsep]
789 * *(if-feature-stmt stmtsep)
790 * *(must-stmt stmtsep)
791 * [presence-stmt stmtsep]
792 * [config-stmt stmtsep]
793 * [status-stmt stmtsep]
794 * [description-stmt stmtsep]
795 * [reference-stmt stmtsep]
796 * *((typedef-stmt /
797 * grouping-stmt) stmtsep)
798 * *(data-def-stmt stmtsep)
799 * "}")
800 * TODO : 0..1 occurance to be checked in listener
801 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530802 containerStatement : CONTAINER_KEYWORD identifier
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530803 (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | presenceStatement | configStatement
804 | statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement
805 | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530806
807 /**
808 * leaf-stmt = leaf-keyword sep identifier-arg-str optsep
809 * "{" stmtsep
810 * ;; these stmts can appear in any order
811 * [when-stmt stmtsep]
812 * *(if-feature-stmt stmtsep)
813 * type-stmt stmtsep
814 * [units-stmt stmtsep]
815 * *(must-stmt stmtsep)
816 * [default-stmt stmtsep]
817 * [config-stmt stmtsep]
818 * [mandatory-stmt stmtsep]
819 * [status-stmt stmtsep]
820 * [description-stmt stmtsep]
821 * [reference-stmt stmtsep]
822 * "}"
823 * TODO : 0..1 occurance to be checked in listener
824 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530825 leafStatement : LEAF_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement | unitsStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530826 | mustStatement | defaultStatement | configStatement | mandatoryStatement | statusStatement | descriptionStatement
827 | referenceStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +0530828
829 /**
830 * leaf-list-stmt = leaf-list-keyword sep identifier-arg-str optsep
831 * "{" stmtsep
832 * ;; these stmts can appear in any order
833 * [when-stmt stmtsep]
834 * *(if-feature-stmt stmtsep)
835 * type-stmt stmtsep
836 * [units-stmt stmtsep]
837 * *(must-stmt stmtsep)
838 * [config-stmt stmtsep]
839 * [min-elements-stmt stmtsep]
840 * [max-elements-stmt stmtsep]
841 * [ordered-by-stmt stmtsep]
842 * [status-stmt stmtsep]
843 * [description-stmt stmtsep]
844 * [reference-stmt stmtsep]
845 * "}"
846 * TODO : 0..1 occurance to be checked in listener
847 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530848 leafListStatement : LEAF_LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530849 | unitsStatement | mustStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement
850 | statusStatement | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +0530851
852 /**
853 * list-stmt = list-keyword sep identifier-arg-str optsep
854 * "{" stmtsep
855 * ;; these stmts can appear in any order
856 * [when-stmt stmtsep]
857 * *(if-feature-stmt stmtsep)
858 * *(must-stmt stmtsep)
859 * [key-stmt stmtsep]
860 * *(unique-stmt stmtsep)
861 * [config-stmt stmtsep]
862 * [min-elements-stmt stmtsep]
863 * [max-elements-stmt stmtsep]
864 * [ordered-by-stmt stmtsep]
865 * [status-stmt stmtsep]
866 * [description-stmt stmtsep]
867 * [reference-stmt stmtsep]
868 * *((typedef-stmt /
869 * grouping-stmt) stmtsep)
870 * 1*(data-def-stmt stmtsep)
871 * "}"
872 * TODO : 0..1 occurance to be checked in listener
873 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530874 listStatement : LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | keyStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530875 | uniqueStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement | statusStatement
876 | descriptionStatement | referenceStatement | typedefStatement | groupingStatement| dataDefStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +0530877
878 /**
879 * key-stmt = key-keyword sep key-arg-str stmtend
880 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530881 keyStatement : KEY_KEYWORD key STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530882
883 /**
884 * unique-stmt = unique-keyword sep unique-arg-str stmtend
885 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530886 uniqueStatement: UNIQUE_KEYWORD unique STMTEND;
Vidyashree Ramada621502016-02-05 22:32:34 +0530887
888 /**
889 * choice-stmt = choice-keyword sep identifier-arg-str optsep
890 * (";" /
891 * "{" stmtsep
892 * ;; these stmts can appear in any order
893 * [when-stmt stmtsep]
894 * *(if-feature-stmt stmtsep)
895 * [default-stmt stmtsep]
896 * [config-stmt stmtsep]
897 * [mandatory-stmt stmtsep]
898 * [status-stmt stmtsep]
899 * [description-stmt stmtsep]
900 * [reference-stmt stmtsep]
901 * *((short-case-stmt / case-stmt) stmtsep)
902 * "}")
903 * TODO : 0..1 occurance to be checked in listener
904 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530905 choiceStatement : CHOICE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | defaultStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530906 | configStatement | mandatoryStatement | statusStatement | descriptionStatement | referenceStatement | shortCaseStatement
907 | caseStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530908
909 /**
910 * short-case-stmt = container-stmt /
911 * leaf-stmt /
912 * leaf-list-stmt /
913 * list-stmt /
914 * anyxml-stmt
915 */
Vidyashree Rama1db15562016-05-17 16:16:15 +0530916 shortCaseStatement : containerStatement | leafStatement | leafListStatement | listStatement | anyxmlStatement;
Vidyashree Ramada621502016-02-05 22:32:34 +0530917
918 /**
919 * case-stmt = case-keyword sep identifier-arg-str optsep
920 * (";" /
921 * "{" stmtsep
922 * ;; these stmts can appear in any order
923 * [when-stmt stmtsep]
924 * *(if-feature-stmt stmtsep)
925 * [status-stmt stmtsep]
926 * [description-stmt stmtsep]
927 * [reference-stmt stmtsep]
928 * *(data-def-stmt stmtsep)
929 * "}")
930 * TODO : 0..1 occurance to be checked in listener
931 */
Vidyashree Rama468f8282016-03-04 19:08:35 +0530932 caseStatement : CASE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530933 | descriptionStatement | referenceStatement | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530934
935 /**
Vidyashree Rama1db15562016-05-17 16:16:15 +0530936 * anyxml-stmt = anyxml-keyword sep identifier-arg-str optsep
937 * (";" /
938 * "{" stmtsep
939 * ;; these stmts can appear in any order
940 * [when-stmt stmtsep]
941 * *(if-feature-stmt stmtsep)
942 * *(must-stmt stmtsep)
943 * [config-stmt stmtsep]
944 * [mandatory-stmt stmtsep]
945 * [status-stmt stmtsep]
946 * [description-stmt stmtsep]
947 * [reference-stmt stmtsep]
948 * "}")
949 */
950 anyxmlStatement : ANYXML_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement
951 | mustStatement | configStatement | mandatoryStatement | statusStatement | descriptionStatement
952 | referenceStatement)* RIGHT_CURLY_BRACE);
953
954 /**
Vidyashree Ramada621502016-02-05 22:32:34 +0530955 * uses-stmt = uses-keyword sep identifier-ref-arg-str optsep
956 * (";" /
957 * "{" stmtsep
958 * ;; these stmts can appear in any order
959 * [when-stmt stmtsep]
960 * *(if-feature-stmt stmtsep)
961 * [status-stmt stmtsep]
962 * [description-stmt stmtsep]
963 * [reference-stmt stmtsep]
964 * *(refine-stmt stmtsep)
965 * *(uses-augment-stmt stmtsep)
966 * "}")
967 * TODO : 0..1 occurance to be checked in listener
968 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530969 usesStatement : USES_KEYWORD string (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
Vidyashree Rama1db15562016-05-17 16:16:15 +0530970 | descriptionStatement | referenceStatement | refineStatement | augmentStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530971
972 /**
973 * refine-stmt = refine-keyword sep refine-arg-str optsep
974 * (";" /
975 * "{" stmtsep
976 * (refine-container-stmts /
977 * refine-leaf-stmts /
978 * refine-leaf-list-stmts /
979 * refine-list-stmts /
980 * refine-choice-stmts /
981 * refine-case-stmts /
982 * refine-anyxml-stmts)
983 * "}")
984 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +0530985 refineStatement : REFINE_KEYWORD refine (STMTEND | LEFT_CURLY_BRACE (refineContainerStatements
986 | refineLeafStatements | refineLeafListStatements | refineListStatements | refineChoiceStatements
Vidyashree Rama1db15562016-05-17 16:16:15 +0530987 | refineCaseStatements | refineAnyxmlStatements) RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +0530988
989 /**
990 * refine-container-stmts =
991 * ;; these stmts can appear in any order
992 * *(must-stmt stmtsep)
993 * [presence-stmt stmtsep]
994 * [config-stmt stmtsep]
995 * [description-stmt stmtsep]
996 * [reference-stmt stmtsep]
997 * TODO : 0..1 occurance to be checked in listener
998 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +0530999 refineContainerStatements : (mustStatement | presenceStatement | configStatement | descriptionStatement | referenceStatement)* ;
Vidyashree Ramada621502016-02-05 22:32:34 +05301000
1001 /**
1002 * refine-leaf-stmts = ;; these stmts can appear in any order
1003 * *(must-stmt stmtsep)
1004 * [default-stmt stmtsep]
1005 * [config-stmt stmtsep]
1006 * [mandatory-stmt stmtsep]
1007 * [description-stmt stmtsep]
1008 * [reference-stmt stmtsep]
1009 * TODO : 0..1 occurance to be checked in listener
1010 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301011 refineLeafStatements : (mustStatement | defaultStatement | configStatement | mandatoryStatement | descriptionStatement | referenceStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +05301012
1013 /**
1014 * refine-leaf-list-stmts =
1015 * ;; these stmts can appear in any order
1016 * *(must-stmt stmtsep)
1017 * [config-stmt stmtsep]
1018 * [min-elements-stmt stmtsep]
1019 * [max-elements-stmt stmtsep]
1020 * [description-stmt stmtsep]
1021 * [reference-stmt stmtsep]
1022 * TODO : 0..1 occurance to be checked in listener
1023 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301024 refineLeafListStatements : (mustStatement | configStatement | minElementsStatement | maxElementsStatement | descriptionStatement
1025 | referenceStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +05301026
1027 /**
1028 * refine-list-stmts = ;; these stmts can appear in any order
1029 * *(must-stmt stmtsep)
1030 * [config-stmt stmtsep]
1031 * [min-elements-stmt stmtsep]
1032 * [max-elements-stmt stmtsep]
1033 * [description-stmt stmtsep]
1034 * [reference-stmt stmtsep]
1035 * TODO : 0..1 occurance to be checked in listener
1036 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301037 refineListStatements : (mustStatement | configStatement | minElementsStatement | maxElementsStatement | descriptionStatement
1038 | referenceStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +05301039
1040 /**
1041 * refine-choice-stmts = ;; these stmts can appear in any order
1042 * [default-stmt stmtsep]
1043 * [config-stmt stmtsep]
1044 * [mandatory-stmt stmtsep]
1045 * [description-stmt stmtsep]
1046 * [reference-stmt stmtsep]
1047 * TODO : 0..1 occurance to be checked in listener
1048 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301049 refineChoiceStatements : (defaultStatement | configStatement | mandatoryStatement | descriptionStatement | referenceStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +05301050
1051 /**
1052 * refine-case-stmts = ;; these stmts can appear in any order
1053 * [description-stmt stmtsep]
1054 * [reference-stmt stmtsep]
1055 *
1056 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301057 refineCaseStatements : (descriptionStatement | referenceStatement)? | (referenceStatement | descriptionStatement)?;
Vidyashree Ramada621502016-02-05 22:32:34 +05301058
1059 /**
Vidyashree Rama1db15562016-05-17 16:16:15 +05301060 * refine-anyxml-stmts = ;; these stmts can appear in any order
1061 * *(must-stmt stmtsep)
1062 * [config-stmt stmtsep]
1063 * [mandatory-stmt stmtsep]
1064 * [description-stmt stmtsep]
1065 * [reference-stmt stmtsep]
Vidyashree Ramada621502016-02-05 22:32:34 +05301066 */
Vidyashree Rama1db15562016-05-17 16:16:15 +05301067 refineAnyxmlStatements : (mustStatement | configStatement | mandatoryStatement | descriptionStatement
1068 | referenceStatement)*;
Vidyashree Ramada621502016-02-05 22:32:34 +05301069
1070 /**
1071 * augment-stmt = augment-keyword sep augment-arg-str optsep
1072 * "{" stmtsep
1073 * ;; these stmts can appear in any order
1074 * [when-stmt stmtsep]
1075 * *(if-feature-stmt stmtsep)
1076 * [status-stmt stmtsep]
1077 * [description-stmt stmtsep]
1078 * [reference-stmt stmtsep]
1079 * 1*((data-def-stmt stmtsep) /
1080 * (case-stmt stmtsep))
1081 * "}"
1082 * TODO : 0..1 occurance to be checked in listener
1083 */
Vidyashree Rama25bf4d02016-03-29 14:37:02 +05301084 augmentStatement : AUGMENT_KEYWORD augment LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301085 | descriptionStatement | referenceStatement | dataDefStatement | caseStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +05301086
1087 /**
1088 * when-stmt = when-keyword sep string optsep
1089 * (";" /
1090 * "{" stmtsep
1091 * ;; these stmts can appear in any order
1092 * [description-stmt stmtsep]
1093 * [reference-stmt stmtsep]
1094 * "}")
1095 *
1096 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301097 whenStatement : WHEN_KEYWORD string (STMTEND | LEFT_CURLY_BRACE ((descriptionStatement? referenceStatement?)
1098 | (referenceStatement? descriptionStatement?)) RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +05301099
1100 /**
1101 * rpc-stmt = rpc-keyword sep identifier-arg-str optsep
1102 * (";" /
1103 * "{" stmtsep
1104 * ;; these stmts can appear in any order
1105 * *(if-feature-stmt stmtsep)
1106 * [status-stmt stmtsep]
1107 * [description-stmt stmtsep]
1108 * [reference-stmt stmtsep]
1109 * *((typedef-stmt /
1110 * grouping-stmt) stmtsep)
1111 * [input-stmt stmtsep]
1112 * [output-stmt stmtsep]
1113 * "}")
Vidyashree Ramada621502016-02-05 22:32:34 +05301114 */
Vidyashree Rama468f8282016-03-04 19:08:35 +05301115 rpcStatement : RPC_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement | statusStatement | descriptionStatement
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301116 | referenceStatement | typedefStatement | groupingStatement | inputStatement | outputStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +05301117
1118 /**
1119 * input-stmt = input-keyword optsep
1120 * "{" stmtsep
1121 * ;; these stmts can appear in any order
1122 * *((typedef-stmt /
1123 * grouping-stmt) stmtsep)
1124 * 1*(data-def-stmt stmtsep)
1125 * "}"
1126 */
janani b4e53f9b2016-04-26 18:49:20 +05301127 inputStatement : INPUT_KEYWORD LEFT_CURLY_BRACE (typedefStatement | groupingStatement | dataDefStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +05301128
1129 /**
1130 * output-stmt = output-keyword optsep
1131 * "{" stmtsep
1132 * ;; these stmts can appear in any order
1133 * *((typedef-stmt /
1134 * grouping-stmt) stmtsep)
1135 * 1*(data-def-stmt stmtsep)
1136 * "}"
1137 */
janani b4e53f9b2016-04-26 18:49:20 +05301138 outputStatement : OUTPUT_KEYWORD LEFT_CURLY_BRACE (typedefStatement | groupingStatement | dataDefStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +05301139
1140 /**
1141 * notification-stmt = notification-keyword sep
1142 * identifier-arg-str optsep
1143 * (";" /
1144 * "{" stmtsep
1145 * ;; these stmts can appear in any order
1146 * *(if-feature-stmt stmtsep)
1147 * [status-stmt stmtsep]
1148 * [description-stmt stmtsep]
1149 * [reference-stmt stmtsep]
1150 * *((typedef-stmt /
1151 * grouping-stmt) stmtsep)
1152 * *(data-def-stmt stmtsep)
1153 * "}")
1154 * TODO : 0..1 occurance to be checked in listener
1155 */
Vidyashree Rama506cbe12016-03-28 11:59:27 +05301156 notificationStatement : NOTIFICATION_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement
1157 | statusStatement | descriptionStatement | referenceStatement | typedefStatement
1158 | groupingStatement | dataDefStatement)* RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +05301159
1160 /**
1161 * deviation-stmt = deviation-keyword sep
1162 * deviation-arg-str optsep
1163 * "{" stmtsep
1164 * ;; these stmts can appear in any order
1165 * [description-stmt stmtsep]
1166 * [reference-stmt stmtsep]
1167 * (deviate-not-supported-stmt /
1168 * 1*(deviate-add-stmt /
1169 * deviate-replace-stmt /
1170 * deviate-delete-stmt))
1171 * "}"
1172 * TODO : 0..1 occurance to be checked in listener
1173 */
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301174 deviationStatement: DEVIATION_KEYWORD deviation LEFT_CURLY_BRACE (descriptionStatement | referenceStatement
1175 | deviateNotSupportedStatement | deviateAddStatement | deviateReplaceStatement
1176 | deviateDeleteStatement)* RIGHT_CURLY_BRACE;
Vidyashree Ramada621502016-02-05 22:32:34 +05301177
1178 /**
1179 * deviate-not-supported-stmt =
1180 * deviate-keyword sep
1181 * not-supported-keyword optsep
1182 * (";" /
1183 * "{" stmtsep
1184 * "}")
1185 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301186 deviateNotSupportedStatement: DEVIATE_KEYWORD NOT_SUPPORTED_KEYWORD (STMTEND | LEFT_CURLY_BRACE RIGHT_CURLY_BRACE);
Vidyashree Ramada621502016-02-05 22:32:34 +05301187
1188 /**
1189 * deviate-add-stmt = deviate-keyword sep add-keyword optsep
1190 * (";" /
1191 * "{" stmtsep
1192 * [units-stmt stmtsep]
1193 * *(must-stmt stmtsep)
1194 * *(unique-stmt stmtsep)
1195 * [default-stmt stmtsep]
1196 * [config-stmt stmtsep]
1197 * [mandatory-stmt stmtsep]
1198 * [min-elements-stmt stmtsep]
1199 * [max-elements-stmt stmtsep]
1200 * "}")
1201 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301202 deviateAddStatement: DEVIATE_KEYWORD ADD_KEYWORD (STMTEND | (LEFT_CURLY_BRACE unitsStatement? mustStatement* uniqueStatement*
1203 defaultStatement? configStatement? mandatoryStatement? minElementsStatement? maxElementsStatement?
Vidyashree Ramada621502016-02-05 22:32:34 +05301204 RIGHT_CURLY_BRACE));
1205
1206 /**
1207 * deviate-delete-stmt = deviate-keyword sep delete-keyword optsep
1208 * (";" /
1209 * "{" stmtsep
1210 * [units-stmt stmtsep]
1211 * *(must-stmt stmtsep)
1212 * *(unique-stmt stmtsep)
1213 * [default-stmt stmtsep]
1214 * "}")
1215 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301216 deviateDeleteStatement: DEVIATE_KEYWORD DELETE_KEYWORD (STMTEND
1217 | (LEFT_CURLY_BRACE unitsStatement? mustStatement* uniqueStatement* defaultStatement? RIGHT_CURLY_BRACE));
Vidyashree Ramada621502016-02-05 22:32:34 +05301218
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301219 /**
Vidyashree Ramada621502016-02-05 22:32:34 +05301220 * deviate-replace-stmt = deviate-keyword sep replace-keyword optsep
1221 * (";" /
1222 * "{" stmtsep
1223 * [type-stmt stmtsep]
1224 * [units-stmt stmtsep]
1225 * [default-stmt stmtsep]
1226 * [config-stmt stmtsep]
1227 * [mandatory-stmt stmtsep]
1228 * [min-elements-stmt stmtsep]
1229 * [max-elements-stmt stmtsep]
1230 * "}")
1231 */
Gaurav Agrawal4f8ad172016-02-12 16:17:32 +05301232 deviateReplaceStatement: DEVIATE_KEYWORD REPLACE_KEYWORD (STMTEND | (LEFT_CURLY_BRACE typeStatement? unitsStatement?
1233 defaultStatement? configStatement? mandatoryStatement? minElementsStatement?
1234 maxElementsStatement? RIGHT_CURLY_BRACE));
Vidyashree Ramada621502016-02-05 22:32:34 +05301235
Gaurav Agrawalb5a1c132016-02-21 02:56:46 +05301236 string : STRING (PLUS STRING)*
1237 | IDENTIFIER
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301238 | INTEGER
1239 | yangConstruct;
Vidyashree Rama468f8282016-03-04 19:08:35 +05301240
1241 identifier : STRING (PLUS STRING)*
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301242 | IDENTIFIER
1243 | yangConstruct;
Vidyashree Rama468f8282016-03-04 19:08:35 +05301244
1245 dateArgumentString : DATE_ARG
1246 | STRING (PLUS STRING)*;
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301247
1248 version : string;
1249
1250 range : string;
1251
1252 length : string;
1253
1254 path : string;
1255
1256 position : string;
1257
1258 status : string;
1259
1260 config : string;
1261
1262 mandatory : string;
1263
1264 orderedBy : string;
1265
1266 minValue : string;
1267
1268 maxValue : string;
1269
1270 key : string;
1271
1272 unique : string;
1273
1274 refine : string;
1275
1276 augment : string;
1277
1278 deviation : string;
1279
Vidyashree Rama1db15562016-05-17 16:16:15 +05301280 value : string;
1281
1282 fraction : string;
1283
Vidyashree Rama8a6b1282016-03-15 10:18:25 +05301284 yangConstruct : ANYXML_KEYWORD | ARGUMENT_KEYWORD | AUGMENT_KEYWORD | BASE_KEYWORD | BELONGS_TO_KEYWORD
1285 | BIT_KEYWORD | CASE_KEYWORD | CHOICE_KEYWORD | CONFIG_KEYWORD | CONTACT_KEYWORD | CONTAINER_KEYWORD
1286 | DEFAULT_KEYWORD | DESCRIPTION_KEYWORD | ENUM_KEYWORD ERROR_APP_TAG_KEYWORD | ERROR_MESSAGE_KEYWORD
1287 | EXTENSION_KEYWORD | DEVIATION_KEYWORD | DEVIATE_KEYWORD | FEATURE_KEYWORD
1288 | FRACTION_DIGITS_KEYWORD | GROUPING_KEYWORD | IDENTITY_KEYWORD | IF_FEATURE_KEYWORD
1289 | IMPORT_KEYWORD | INCLUDE_KEYWORD | INPUT_KEYWORD | KEY_KEYWORD | LEAF_KEYWORD | LEAF_LIST_KEYWORD
1290 | LENGTH_KEYWORD | LIST_KEYWORD | MANDATORY_KEYWORD | MAX_ELEMENTS_KEYWORD | MIN_ELEMENTS_KEYWORD
1291 | MODULE_KEYWORD | MUST_KEYWORD | NAMESPACE_KEYWORD | NOTIFICATION_KEYWORD | ORDERED_BY_KEYWORD
1292 | ORGANIZATION_KEYWORD | OUTPUT_KEYWORD | PATH_KEYWORD | PATTERN_KEYWORD |POSITION_KEYWORD
1293 | PREFIX_KEYWORD | PRESENCE_KEYWORD | RANGE_KEYWORD | REFERENCE_KEYWORD | REFINE_KEYWORD
1294 | REQUIRE_INSTANCE_KEYWORD | REVISION_KEYWORD | REVISION_DATE_KEYWORD | RPC_KEYWORD
1295 | STATUS_KEYWORD | SUBMODULE_KEYWORD | TYPE_KEYWORD | TYPEDEF_KEYWORD | UNIQUE_KEYWORD
1296 | UNITS_KEYWORD | USES_KEYWORD | VALUE_KEYWORD | WHEN_KEYWORD | YANG_VERSION_KEYWORD
1297 | YIN_ELEMENT_KEYWORD | ADD_KEYWORD | CURRENT_KEYWORD | DELETE_KEYWORD | DEPRECATED_KEYWORD
1298 | FALSE_KEYWORD | MAX_KEYWORD | MIN_KEYWORD | NOT_SUPPORTED_KEYWORD | OBSOLETE_KEYWORD
1299 | REPLACE_KEYWORD | SYSTEM_KEYWORD | TRUE_KEYWORD | UNBOUNDED_KEYWORD | USER_KEYWORD;