Vidyashree Rama
Committed by Gerrit Code Review

Identifier issue fix for module, list, container, leaf, leaf-list, prefix + date…

… agr string for revision fix

Change-Id: Id9d596512f35b54f6359d361402bcd0180b71678
Showing 33 changed files with 767 additions and 473 deletions
...@@ -27,7 +27,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -27,7 +27,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
27 * Enter a parse tree produced by GeneratedYangParser for grammar rule 27 * Enter a parse tree produced by GeneratedYangParser for grammar rule
28 * yangfile. 28 * yangfile.
29 * 29 *
30 - * @param currentContext current context in the parsed tree. 30 + * @param currentContext current context in the parsed tree
31 */ 31 */
32 void enterYangfile(GeneratedYangParser.YangfileContext currentContext); 32 void enterYangfile(GeneratedYangParser.YangfileContext currentContext);
33 33
...@@ -35,7 +35,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -35,7 +35,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
35 * Exit a parse tree produced by GeneratedYangParser for grammar rule 35 * Exit a parse tree produced by GeneratedYangParser for grammar rule
36 * yangfile. 36 * yangfile.
37 * 37 *
38 - * @param currentContext current context in the parsed tree. 38 + * @param currentContext current context in the parsed tree
39 */ 39 */
40 void exitYangfile(GeneratedYangParser.YangfileContext currentContext); 40 void exitYangfile(GeneratedYangParser.YangfileContext currentContext);
41 41
...@@ -43,7 +43,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -43,7 +43,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
43 * Enter a parse tree produced by GeneratedYangParser for grammar rule 43 * Enter a parse tree produced by GeneratedYangParser for grammar rule
44 * moduleStatement. 44 * moduleStatement.
45 * 45 *
46 - * @param currentContext current context in the parsed tree. 46 + * @param currentContext current context in the parsed tree
47 */ 47 */
48 void enterModuleStatement(GeneratedYangParser.ModuleStatementContext currentContext); 48 void enterModuleStatement(GeneratedYangParser.ModuleStatementContext currentContext);
49 49
...@@ -51,7 +51,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -51,7 +51,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
51 * Exit a parse tree produced by GeneratedYangParser for grammar rule 51 * Exit a parse tree produced by GeneratedYangParser for grammar rule
52 * moduleStatement. 52 * moduleStatement.
53 * 53 *
54 - * @param currentContext current context in the parsed tree. 54 + * @param currentContext current context in the parsed tree
55 */ 55 */
56 void exitModuleStatement(GeneratedYangParser.ModuleStatementContext currentContext); 56 void exitModuleStatement(GeneratedYangParser.ModuleStatementContext currentContext);
57 57
...@@ -59,7 +59,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -59,7 +59,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
59 * Enter a parse tree produced by GeneratedYangParser for grammar rule 59 * Enter a parse tree produced by GeneratedYangParser for grammar rule
60 * moduleBody. 60 * moduleBody.
61 * 61 *
62 - * @param currentContext current context in the parsed tree. 62 + * @param currentContext current context in the parsed tree
63 */ 63 */
64 void enterModuleBody(GeneratedYangParser.ModuleBodyContext currentContext); 64 void enterModuleBody(GeneratedYangParser.ModuleBodyContext currentContext);
65 65
...@@ -67,7 +67,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -67,7 +67,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
67 * Exit a parse tree produced by GeneratedYangParser for grammar rule 67 * Exit a parse tree produced by GeneratedYangParser for grammar rule
68 * moduleBody. 68 * moduleBody.
69 * 69 *
70 - * @param currentContext current context in the parsed tree. 70 + * @param currentContext current context in the parsed tree
71 */ 71 */
72 void exitModuleBody(GeneratedYangParser.ModuleBodyContext currentContext); 72 void exitModuleBody(GeneratedYangParser.ModuleBodyContext currentContext);
73 73
...@@ -75,7 +75,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -75,7 +75,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
75 * Enter a parse tree produced by GeneratedYangParser for grammar rule 75 * Enter a parse tree produced by GeneratedYangParser for grammar rule
76 * moduleHeaderStatement. 76 * moduleHeaderStatement.
77 * 77 *
78 - * @param currentContext current context in the parsed tree. 78 + * @param currentContext current context in the parsed tree
79 */ 79 */
80 void enterModuleHeaderStatement(GeneratedYangParser.ModuleHeaderStatementContext currentContext); 80 void enterModuleHeaderStatement(GeneratedYangParser.ModuleHeaderStatementContext currentContext);
81 81
...@@ -83,7 +83,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -83,7 +83,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
83 * Exit a parse tree produced by GeneratedYangParser for grammar rule 83 * Exit a parse tree produced by GeneratedYangParser for grammar rule
84 * moduleHeaderStatement. 84 * moduleHeaderStatement.
85 * 85 *
86 - * @param currentContext current context in the parsed tree. 86 + * @param currentContext current context in the parsed tree
87 */ 87 */
88 void exitModuleHeaderStatement(GeneratedYangParser.ModuleHeaderStatementContext currentContext); 88 void exitModuleHeaderStatement(GeneratedYangParser.ModuleHeaderStatementContext currentContext);
89 89
...@@ -91,7 +91,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -91,7 +91,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
91 * Enter a parse tree produced by GeneratedYangParser for grammar rule 91 * Enter a parse tree produced by GeneratedYangParser for grammar rule
92 * linkageStatements. 92 * linkageStatements.
93 * 93 *
94 - * @param currentContext current context in the parsed tree. 94 + * @param currentContext current context in the parsed tree
95 */ 95 */
96 void enterLinkageStatements(GeneratedYangParser.LinkageStatementsContext currentContext); 96 void enterLinkageStatements(GeneratedYangParser.LinkageStatementsContext currentContext);
97 97
...@@ -99,7 +99,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -99,7 +99,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
99 * Exit a parse tree produced by GeneratedYangParser for grammar rule 99 * Exit a parse tree produced by GeneratedYangParser for grammar rule
100 * linkageStatements. 100 * linkageStatements.
101 * 101 *
102 - * @param currentContext current context in the parsed tree. 102 + * @param currentContext current context in the parsed tree
103 */ 103 */
104 void exitLinkageStatements(GeneratedYangParser.LinkageStatementsContext currentContext); 104 void exitLinkageStatements(GeneratedYangParser.LinkageStatementsContext currentContext);
105 105
...@@ -107,7 +107,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -107,7 +107,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
107 * Enter a parse tree produced by GeneratedYangParser for grammar rule 107 * Enter a parse tree produced by GeneratedYangParser for grammar rule
108 * metaStatements. 108 * metaStatements.
109 * 109 *
110 - * @param currentContext current context in the parsed tree. 110 + * @param currentContext current context in the parsed tree
111 */ 111 */
112 void enterMetaStatements(GeneratedYangParser.MetaStatementsContext currentContext); 112 void enterMetaStatements(GeneratedYangParser.MetaStatementsContext currentContext);
113 113
...@@ -115,7 +115,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -115,7 +115,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
115 * Exit a parse tree produced by GeneratedYangParser for grammar rule 115 * Exit a parse tree produced by GeneratedYangParser for grammar rule
116 * metaStatements. 116 * metaStatements.
117 * 117 *
118 - * @param currentContext current context in the parsed tree. 118 + * @param currentContext current context in the parsed tree
119 */ 119 */
120 void exitMetaStatements(GeneratedYangParser.MetaStatementsContext currentContext); 120 void exitMetaStatements(GeneratedYangParser.MetaStatementsContext currentContext);
121 121
...@@ -123,7 +123,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -123,7 +123,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
123 * Enter a parse tree produced by GeneratedYangParser for grammar rule 123 * Enter a parse tree produced by GeneratedYangParser for grammar rule
124 * revisionStatements. 124 * revisionStatements.
125 * 125 *
126 - * @param currentContext current context in the parsed tree. 126 + * @param currentContext current context in the parsed tree
127 */ 127 */
128 void enterRevisionStatements(GeneratedYangParser.RevisionStatementsContext currentContext); 128 void enterRevisionStatements(GeneratedYangParser.RevisionStatementsContext currentContext);
129 129
...@@ -131,7 +131,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -131,7 +131,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
131 * Exit a parse tree produced by GeneratedYangParser for grammar rule 131 * Exit a parse tree produced by GeneratedYangParser for grammar rule
132 * revisionStatements. 132 * revisionStatements.
133 * 133 *
134 - * @param currentContext current context in the parsed tree. 134 + * @param currentContext current context in the parsed tree
135 */ 135 */
136 void exitRevisionStatements(GeneratedYangParser.RevisionStatementsContext currentContext); 136 void exitRevisionStatements(GeneratedYangParser.RevisionStatementsContext currentContext);
137 137
...@@ -139,7 +139,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -139,7 +139,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
139 * Enter a parse tree produced by GeneratedYangParser for grammar rule 139 * Enter a parse tree produced by GeneratedYangParser for grammar rule
140 * bodyStatements. 140 * bodyStatements.
141 * 141 *
142 - * @param currentContext current context in the parsed tree. 142 + * @param currentContext current context in the parsed tree
143 */ 143 */
144 void enterBodyStatements(GeneratedYangParser.BodyStatementsContext currentContext); 144 void enterBodyStatements(GeneratedYangParser.BodyStatementsContext currentContext);
145 145
...@@ -147,7 +147,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -147,7 +147,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
147 * Exit a parse tree produced by GeneratedYangParser for grammar rule 147 * Exit a parse tree produced by GeneratedYangParser for grammar rule
148 * bodyStatements. 148 * bodyStatements.
149 * 149 *
150 - * @param currentContext current context in the parsed tree. 150 + * @param currentContext current context in the parsed tree
151 */ 151 */
152 void exitBodyStatements(GeneratedYangParser.BodyStatementsContext currentContext); 152 void exitBodyStatements(GeneratedYangParser.BodyStatementsContext currentContext);
153 153
...@@ -155,7 +155,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -155,7 +155,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
155 * Enter a parse tree produced by GeneratedYangParser for grammar rule 155 * Enter a parse tree produced by GeneratedYangParser for grammar rule
156 * yangVersionStatement. 156 * yangVersionStatement.
157 * 157 *
158 - * @param currentContext current context in the parsed tree. 158 + * @param currentContext current context in the parsed tree
159 */ 159 */
160 void enterYangVersionStatement(GeneratedYangParser.YangVersionStatementContext currentContext); 160 void enterYangVersionStatement(GeneratedYangParser.YangVersionStatementContext currentContext);
161 161
...@@ -163,7 +163,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -163,7 +163,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
163 * Exit a parse tree produced by GeneratedYangParser for grammar rule 163 * Exit a parse tree produced by GeneratedYangParser for grammar rule
164 * yangVersionStatement. 164 * yangVersionStatement.
165 * 165 *
166 - * @param currentContext current context in the parsed tree. 166 + * @param currentContext current context in the parsed tree
167 */ 167 */
168 void exitYangVersionStatement(GeneratedYangParser.YangVersionStatementContext currentContext); 168 void exitYangVersionStatement(GeneratedYangParser.YangVersionStatementContext currentContext);
169 169
...@@ -171,7 +171,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -171,7 +171,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
171 * Enter a parse tree produced by GeneratedYangParser for grammar rule 171 * Enter a parse tree produced by GeneratedYangParser for grammar rule
172 * namespaceStatement. 172 * namespaceStatement.
173 * 173 *
174 - * @param currentContext current context in the parsed tree. 174 + * @param currentContext current context in the parsed tree
175 */ 175 */
176 void enterNamespaceStatement(GeneratedYangParser.NamespaceStatementContext currentContext); 176 void enterNamespaceStatement(GeneratedYangParser.NamespaceStatementContext currentContext);
177 177
...@@ -179,7 +179,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -179,7 +179,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
179 * Exit a parse tree produced by GeneratedYangParser for grammar rule 179 * Exit a parse tree produced by GeneratedYangParser for grammar rule
180 * namespaceStatement. 180 * namespaceStatement.
181 * 181 *
182 - * @param currentContext current context in the parsed tree. 182 + * @param currentContext current context in the parsed tree
183 */ 183 */
184 void exitNamespaceStatement(GeneratedYangParser.NamespaceStatementContext currentContext); 184 void exitNamespaceStatement(GeneratedYangParser.NamespaceStatementContext currentContext);
185 185
...@@ -187,7 +187,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -187,7 +187,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
187 * Enter a parse tree produced by GeneratedYangParser for grammar rule 187 * Enter a parse tree produced by GeneratedYangParser for grammar rule
188 * prefixStatement. 188 * prefixStatement.
189 * 189 *
190 - * @param currentContext current context in the parsed tree. 190 + * @param currentContext current context in the parsed tree
191 */ 191 */
192 void enterPrefixStatement(GeneratedYangParser.PrefixStatementContext currentContext); 192 void enterPrefixStatement(GeneratedYangParser.PrefixStatementContext currentContext);
193 193
...@@ -195,7 +195,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -195,7 +195,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
195 * Exit a parse tree produced by GeneratedYangParser for grammar rule 195 * Exit a parse tree produced by GeneratedYangParser for grammar rule
196 * prefixStatement. 196 * prefixStatement.
197 * 197 *
198 - * @param currentContext current context in the parsed tree. 198 + * @param currentContext current context in the parsed tree
199 */ 199 */
200 void exitPrefixStatement(GeneratedYangParser.PrefixStatementContext currentContext); 200 void exitPrefixStatement(GeneratedYangParser.PrefixStatementContext currentContext);
201 201
...@@ -203,7 +203,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -203,7 +203,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
203 * Enter a parse tree produced by GeneratedYangParser for grammar rule 203 * Enter a parse tree produced by GeneratedYangParser for grammar rule
204 * importStatement. 204 * importStatement.
205 * 205 *
206 - * @param currentContext current context in the parsed tree. 206 + * @param currentContext current context in the parsed tree
207 */ 207 */
208 void enterImportStatement(GeneratedYangParser.ImportStatementContext currentContext); 208 void enterImportStatement(GeneratedYangParser.ImportStatementContext currentContext);
209 209
...@@ -211,7 +211,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -211,7 +211,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
211 * Exit a parse tree produced by GeneratedYangParser for grammar rule 211 * Exit a parse tree produced by GeneratedYangParser for grammar rule
212 * importStatement. 212 * importStatement.
213 * 213 *
214 - * @param currentContext current context in the parsed tree. 214 + * @param currentContext current context in the parsed tree
215 */ 215 */
216 void exitImportStatement(GeneratedYangParser.ImportStatementContext currentContext); 216 void exitImportStatement(GeneratedYangParser.ImportStatementContext currentContext);
217 217
...@@ -219,7 +219,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -219,7 +219,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
219 * Enter a parse tree produced by GeneratedYangParser for grammar rule 219 * Enter a parse tree produced by GeneratedYangParser for grammar rule
220 * importStatementBody. 220 * importStatementBody.
221 * 221 *
222 - * @param currentContext current context in the parsed tree. 222 + * @param currentContext current context in the parsed tree
223 */ 223 */
224 void enterImportStatementBody(GeneratedYangParser.ImportStatementBodyContext currentContext); 224 void enterImportStatementBody(GeneratedYangParser.ImportStatementBodyContext currentContext);
225 225
...@@ -227,7 +227,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -227,7 +227,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
227 * Exit a parse tree produced by GeneratedYangParser for grammar rule 227 * Exit a parse tree produced by GeneratedYangParser for grammar rule
228 * importStatementBody. 228 * importStatementBody.
229 * 229 *
230 - * @param currentContext current context in the parsed tree. 230 + * @param currentContext current context in the parsed tree
231 */ 231 */
232 void exitImportStatementBody(GeneratedYangParser.ImportStatementBodyContext currentContext); 232 void exitImportStatementBody(GeneratedYangParser.ImportStatementBodyContext currentContext);
233 233
...@@ -235,7 +235,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -235,7 +235,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
235 * Enter a parse tree produced by GeneratedYangParser for grammar rule 235 * Enter a parse tree produced by GeneratedYangParser for grammar rule
236 * revisionDateStatement. 236 * revisionDateStatement.
237 * 237 *
238 - * @param currentContext current context in the parsed tree. 238 + * @param currentContext current context in the parsed tree
239 */ 239 */
240 void enterRevisionDateStatement(GeneratedYangParser.RevisionDateStatementContext currentContext); 240 void enterRevisionDateStatement(GeneratedYangParser.RevisionDateStatementContext currentContext);
241 241
...@@ -243,7 +243,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -243,7 +243,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
243 * Exit a parse tree produced by GeneratedYangParser for grammar rule 243 * Exit a parse tree produced by GeneratedYangParser for grammar rule
244 * revisionDateStatement. 244 * revisionDateStatement.
245 * 245 *
246 - * @param currentContext current context in the parsed tree. 246 + * @param currentContext current context in the parsed tree
247 */ 247 */
248 void exitRevisionDateStatement(GeneratedYangParser.RevisionDateStatementContext currentContext); 248 void exitRevisionDateStatement(GeneratedYangParser.RevisionDateStatementContext currentContext);
249 249
...@@ -251,7 +251,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -251,7 +251,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
251 * Enter a parse tree produced by GeneratedYangParser for grammar rule 251 * Enter a parse tree produced by GeneratedYangParser for grammar rule
252 * includeStatement. 252 * includeStatement.
253 * 253 *
254 - * @param currentContext current context in the parsed tree. 254 + * @param currentContext current context in the parsed tree
255 */ 255 */
256 void enterIncludeStatement(GeneratedYangParser.IncludeStatementContext currentContext); 256 void enterIncludeStatement(GeneratedYangParser.IncludeStatementContext currentContext);
257 257
...@@ -259,7 +259,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -259,7 +259,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
259 * Exit a parse tree produced by GeneratedYangParser for grammar rule 259 * Exit a parse tree produced by GeneratedYangParser for grammar rule
260 * includeStatement. 260 * includeStatement.
261 * 261 *
262 - * @param currentContext current context in the parsed tree. 262 + * @param currentContext current context in the parsed tree
263 */ 263 */
264 void exitIncludeStatement(GeneratedYangParser.IncludeStatementContext currentContext); 264 void exitIncludeStatement(GeneratedYangParser.IncludeStatementContext currentContext);
265 265
...@@ -267,7 +267,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -267,7 +267,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
267 * Enter a parse tree produced by GeneratedYangParser for grammar rule 267 * Enter a parse tree produced by GeneratedYangParser for grammar rule
268 * organizationStatement. 268 * organizationStatement.
269 * 269 *
270 - * @param currentContext current context in the parsed tree. 270 + * @param currentContext current context in the parsed tree
271 */ 271 */
272 void enterOrganizationStatement(GeneratedYangParser.OrganizationStatementContext currentContext); 272 void enterOrganizationStatement(GeneratedYangParser.OrganizationStatementContext currentContext);
273 273
...@@ -275,7 +275,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -275,7 +275,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
275 * Exit a parse tree produced by GeneratedYangParser for grammar rule 275 * Exit a parse tree produced by GeneratedYangParser for grammar rule
276 * organizationStatement. 276 * organizationStatement.
277 * 277 *
278 - * @param currentContext current context in the parsed tree. 278 + * @param currentContext current context in the parsed tree
279 */ 279 */
280 void exitOrganizationStatement(GeneratedYangParser.OrganizationStatementContext currentContext); 280 void exitOrganizationStatement(GeneratedYangParser.OrganizationStatementContext currentContext);
281 281
...@@ -283,7 +283,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -283,7 +283,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
283 * Enter a parse tree produced by GeneratedYangParser for grammar rule 283 * Enter a parse tree produced by GeneratedYangParser for grammar rule
284 * contactStatement. 284 * contactStatement.
285 * 285 *
286 - * @param currentContext current context in the parsed tree. 286 + * @param currentContext current context in the parsed tree
287 */ 287 */
288 void enterContactStatement(GeneratedYangParser.ContactStatementContext currentContext); 288 void enterContactStatement(GeneratedYangParser.ContactStatementContext currentContext);
289 289
...@@ -291,7 +291,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -291,7 +291,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
291 * Exit a parse tree produced by GeneratedYangParser for grammar rule 291 * Exit a parse tree produced by GeneratedYangParser for grammar rule
292 * contactStatement. 292 * contactStatement.
293 * 293 *
294 - * @param currentContext current context in the parsed tree. 294 + * @param currentContext current context in the parsed tree
295 */ 295 */
296 void exitContactStatement(GeneratedYangParser.ContactStatementContext currentContext); 296 void exitContactStatement(GeneratedYangParser.ContactStatementContext currentContext);
297 297
...@@ -299,7 +299,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -299,7 +299,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
299 * Enter a parse tree produced by GeneratedYangParser for grammar rule 299 * Enter a parse tree produced by GeneratedYangParser for grammar rule
300 * descriptionStatement. 300 * descriptionStatement.
301 * 301 *
302 - * @param currentContext current context in the parsed tree. 302 + * @param currentContext current context in the parsed tree
303 */ 303 */
304 void enterDescriptionStatement(GeneratedYangParser.DescriptionStatementContext currentContext); 304 void enterDescriptionStatement(GeneratedYangParser.DescriptionStatementContext currentContext);
305 305
...@@ -307,7 +307,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -307,7 +307,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
307 * Exit a parse tree produced by GeneratedYangParser for grammar rule 307 * Exit a parse tree produced by GeneratedYangParser for grammar rule
308 * descriptionStatement. 308 * descriptionStatement.
309 * 309 *
310 - * @param currentContext current context in the parsed tree. 310 + * @param currentContext current context in the parsed tree
311 */ 311 */
312 void exitDescriptionStatement(GeneratedYangParser.DescriptionStatementContext currentContext); 312 void exitDescriptionStatement(GeneratedYangParser.DescriptionStatementContext currentContext);
313 313
...@@ -315,7 +315,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -315,7 +315,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
315 * Enter a parse tree produced by GeneratedYangParser for grammar rule 315 * Enter a parse tree produced by GeneratedYangParser for grammar rule
316 * referenceStatement. 316 * referenceStatement.
317 * 317 *
318 - * @param currentContext current context in the parsed tree. 318 + * @param currentContext current context in the parsed tree
319 */ 319 */
320 void enterReferenceStatement(GeneratedYangParser.ReferenceStatementContext currentContext); 320 void enterReferenceStatement(GeneratedYangParser.ReferenceStatementContext currentContext);
321 321
...@@ -323,7 +323,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -323,7 +323,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
323 * Exit a parse tree produced by GeneratedYangParser for grammar rule 323 * Exit a parse tree produced by GeneratedYangParser for grammar rule
324 * referenceStatement. 324 * referenceStatement.
325 * 325 *
326 - * @param currentContext current context in the parsed tree. 326 + * @param currentContext current context in the parsed tree
327 */ 327 */
328 void exitReferenceStatement(GeneratedYangParser.ReferenceStatementContext currentContext); 328 void exitReferenceStatement(GeneratedYangParser.ReferenceStatementContext currentContext);
329 329
...@@ -331,7 +331,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -331,7 +331,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
331 * Enter a parse tree produced by GeneratedYangParser for grammar rule 331 * Enter a parse tree produced by GeneratedYangParser for grammar rule
332 * revisionStatement. 332 * revisionStatement.
333 * 333 *
334 - * @param currentContext current context in the parsed tree. 334 + * @param currentContext current context in the parsed tree
335 */ 335 */
336 void enterRevisionStatement(GeneratedYangParser.RevisionStatementContext currentContext); 336 void enterRevisionStatement(GeneratedYangParser.RevisionStatementContext currentContext);
337 337
...@@ -339,7 +339,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -339,7 +339,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
339 * Exit a parse tree produced by GeneratedYangParser for grammar rule 339 * Exit a parse tree produced by GeneratedYangParser for grammar rule
340 * revisionStatement. 340 * revisionStatement.
341 * 341 *
342 - * @param currentContext current context in the parsed tree. 342 + * @param currentContext current context in the parsed tree
343 */ 343 */
344 void exitRevisionStatement(GeneratedYangParser.RevisionStatementContext currentContext); 344 void exitRevisionStatement(GeneratedYangParser.RevisionStatementContext currentContext);
345 345
...@@ -347,7 +347,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -347,7 +347,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
347 * Enter a parse tree produced by GeneratedYangParser for grammar rule 347 * Enter a parse tree produced by GeneratedYangParser for grammar rule
348 * revisionStatementBody. 348 * revisionStatementBody.
349 * 349 *
350 - * @param currentContext current context in the parsed tree. 350 + * @param currentContext current context in the parsed tree
351 */ 351 */
352 void enterRevisionStatementBody(GeneratedYangParser.RevisionStatementBodyContext currentContext); 352 void enterRevisionStatementBody(GeneratedYangParser.RevisionStatementBodyContext currentContext);
353 353
...@@ -355,7 +355,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -355,7 +355,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
355 * Exit a parse tree produced by GeneratedYangParser for grammar rule 355 * Exit a parse tree produced by GeneratedYangParser for grammar rule
356 * revisionStatementBody. 356 * revisionStatementBody.
357 * 357 *
358 - * @param currentContext current context in the parsed tree. 358 + * @param currentContext current context in the parsed tree
359 */ 359 */
360 void exitRevisionStatementBody(GeneratedYangParser.RevisionStatementBodyContext currentContext); 360 void exitRevisionStatementBody(GeneratedYangParser.RevisionStatementBodyContext currentContext);
361 361
...@@ -363,7 +363,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -363,7 +363,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
363 * Enter a parse tree produced by GeneratedYangParser for grammar rule 363 * Enter a parse tree produced by GeneratedYangParser for grammar rule
364 * subModuleStatement. 364 * subModuleStatement.
365 * 365 *
366 - * @param currentContext current context in the parsed tree. 366 + * @param currentContext current context in the parsed tree
367 */ 367 */
368 void enterSubModuleStatement(GeneratedYangParser.SubModuleStatementContext currentContext); 368 void enterSubModuleStatement(GeneratedYangParser.SubModuleStatementContext currentContext);
369 369
...@@ -371,7 +371,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -371,7 +371,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
371 * Exit a parse tree produced by GeneratedYangParser for grammar rule 371 * Exit a parse tree produced by GeneratedYangParser for grammar rule
372 * subModuleStatement. 372 * subModuleStatement.
373 * 373 *
374 - * @param currentContext current context in the parsed tree. 374 + * @param currentContext current context in the parsed tree
375 */ 375 */
376 void exitSubModuleStatement(GeneratedYangParser.SubModuleStatementContext currentContext); 376 void exitSubModuleStatement(GeneratedYangParser.SubModuleStatementContext currentContext);
377 377
...@@ -379,7 +379,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -379,7 +379,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
379 * Enter a parse tree produced by GeneratedYangParser for grammar rule 379 * Enter a parse tree produced by GeneratedYangParser for grammar rule
380 * submoduleBody. 380 * submoduleBody.
381 * 381 *
382 - * @param currentContext current context in the parsed tree. 382 + * @param currentContext current context in the parsed tree
383 */ 383 */
384 void enterSubmoduleBody(GeneratedYangParser.SubmoduleBodyContext currentContext); 384 void enterSubmoduleBody(GeneratedYangParser.SubmoduleBodyContext currentContext);
385 385
...@@ -387,7 +387,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -387,7 +387,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
387 * Exit a parse tree produced by GeneratedYangParser for grammar rule 387 * Exit a parse tree produced by GeneratedYangParser for grammar rule
388 * submoduleBody. 388 * submoduleBody.
389 * 389 *
390 - * @param currentContext current context in the parsed tree. 390 + * @param currentContext current context in the parsed tree
391 */ 391 */
392 void exitSubmoduleBody(GeneratedYangParser.SubmoduleBodyContext currentContext); 392 void exitSubmoduleBody(GeneratedYangParser.SubmoduleBodyContext currentContext);
393 393
...@@ -395,7 +395,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -395,7 +395,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
395 * Enter a parse tree produced by GeneratedYangParser for grammar rule 395 * Enter a parse tree produced by GeneratedYangParser for grammar rule
396 * submoduleHeaderStatement. 396 * submoduleHeaderStatement.
397 * 397 *
398 - * @param currentContext current context in the parsed tree. 398 + * @param currentContext current context in the parsed tree
399 */ 399 */
400 void enterSubmoduleHeaderStatement(GeneratedYangParser.SubmoduleHeaderStatementContext currentContext); 400 void enterSubmoduleHeaderStatement(GeneratedYangParser.SubmoduleHeaderStatementContext currentContext);
401 401
...@@ -403,7 +403,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -403,7 +403,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
403 * Exit a parse tree produced by GeneratedYangParser for grammar rule 403 * Exit a parse tree produced by GeneratedYangParser for grammar rule
404 * submoduleHeaderStatement. 404 * submoduleHeaderStatement.
405 * 405 *
406 - * @param currentContext current context in the parsed tree. 406 + * @param currentContext current context in the parsed tree
407 */ 407 */
408 void exitSubmoduleHeaderStatement(GeneratedYangParser.SubmoduleHeaderStatementContext currentContext); 408 void exitSubmoduleHeaderStatement(GeneratedYangParser.SubmoduleHeaderStatementContext currentContext);
409 409
...@@ -411,7 +411,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -411,7 +411,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
411 * Enter a parse tree produced by GeneratedYangParser for grammar rule 411 * Enter a parse tree produced by GeneratedYangParser for grammar rule
412 * belongstoStatement. 412 * belongstoStatement.
413 * 413 *
414 - * @param currentContext current context in the parsed tree. 414 + * @param currentContext current context in the parsed tree
415 */ 415 */
416 void enterBelongstoStatement(GeneratedYangParser.BelongstoStatementContext currentContext); 416 void enterBelongstoStatement(GeneratedYangParser.BelongstoStatementContext currentContext);
417 417
...@@ -419,7 +419,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -419,7 +419,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
419 * Exit a parse tree produced by GeneratedYangParser for grammar rule 419 * Exit a parse tree produced by GeneratedYangParser for grammar rule
420 * belongstoStatement. 420 * belongstoStatement.
421 * 421 *
422 - * @param currentContext current context in the parsed tree. 422 + * @param currentContext current context in the parsed tree
423 */ 423 */
424 void exitBelongstoStatement(GeneratedYangParser.BelongstoStatementContext currentContext); 424 void exitBelongstoStatement(GeneratedYangParser.BelongstoStatementContext currentContext);
425 425
...@@ -427,7 +427,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -427,7 +427,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
427 * Enter a parse tree produced by GeneratedYangParser for grammar rule 427 * Enter a parse tree produced by GeneratedYangParser for grammar rule
428 * belongstoStatementBody. 428 * belongstoStatementBody.
429 * 429 *
430 - * @param currentContext current context in the parsed tree. 430 + * @param currentContext current context in the parsed tree
431 */ 431 */
432 void enterBelongstoStatementBody(GeneratedYangParser.BelongstoStatementBodyContext currentContext); 432 void enterBelongstoStatementBody(GeneratedYangParser.BelongstoStatementBodyContext currentContext);
433 433
...@@ -435,7 +435,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -435,7 +435,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
435 * Exit a parse tree produced by GeneratedYangParser for grammar rule 435 * Exit a parse tree produced by GeneratedYangParser for grammar rule
436 * belongstoStatementBody. 436 * belongstoStatementBody.
437 * 437 *
438 - * @param currentContext current context in the parsed tree. 438 + * @param currentContext current context in the parsed tree
439 */ 439 */
440 void exitBelongstoStatementBody(GeneratedYangParser.BelongstoStatementBodyContext currentContext); 440 void exitBelongstoStatementBody(GeneratedYangParser.BelongstoStatementBodyContext currentContext);
441 441
...@@ -443,7 +443,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -443,7 +443,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
443 * Enter a parse tree produced by GeneratedYangParser for grammar rule 443 * Enter a parse tree produced by GeneratedYangParser for grammar rule
444 * extensionStatement. 444 * extensionStatement.
445 * 445 *
446 - * @param currentContext current context in the parsed tree. 446 + * @param currentContext current context in the parsed tree
447 */ 447 */
448 void enterExtensionStatement(GeneratedYangParser.ExtensionStatementContext currentContext); 448 void enterExtensionStatement(GeneratedYangParser.ExtensionStatementContext currentContext);
449 449
...@@ -451,7 +451,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -451,7 +451,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
451 * Exit a parse tree produced by GeneratedYangParser for grammar rule 451 * Exit a parse tree produced by GeneratedYangParser for grammar rule
452 * extensionStatement. 452 * extensionStatement.
453 * 453 *
454 - * @param currentContext current context in the parsed tree. 454 + * @param currentContext current context in the parsed tree
455 */ 455 */
456 void exitExtensionStatement(GeneratedYangParser.ExtensionStatementContext currentContext); 456 void exitExtensionStatement(GeneratedYangParser.ExtensionStatementContext currentContext);
457 457
...@@ -459,7 +459,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -459,7 +459,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
459 * Enter a parse tree produced by GeneratedYangParser for grammar rule 459 * Enter a parse tree produced by GeneratedYangParser for grammar rule
460 * extensionBody. 460 * extensionBody.
461 * 461 *
462 - * @param currentContext current context in the parsed tree. 462 + * @param currentContext current context in the parsed tree
463 */ 463 */
464 void enterExtensionBody(GeneratedYangParser.ExtensionBodyContext currentContext); 464 void enterExtensionBody(GeneratedYangParser.ExtensionBodyContext currentContext);
465 465
...@@ -467,7 +467,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -467,7 +467,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
467 * Exit a parse tree produced by GeneratedYangParser for grammar rule 467 * Exit a parse tree produced by GeneratedYangParser for grammar rule
468 * extensionBody. 468 * extensionBody.
469 * 469 *
470 - * @param currentContext current context in the parsed tree. 470 + * @param currentContext current context in the parsed tree
471 */ 471 */
472 void exitExtensionBody(GeneratedYangParser.ExtensionBodyContext currentContext); 472 void exitExtensionBody(GeneratedYangParser.ExtensionBodyContext currentContext);
473 473
...@@ -475,7 +475,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -475,7 +475,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
475 * Enter a parse tree produced by GeneratedYangParser for grammar rule 475 * Enter a parse tree produced by GeneratedYangParser for grammar rule
476 * argumentStatement. 476 * argumentStatement.
477 * 477 *
478 - * @param currentContext current context in the parsed tree. 478 + * @param currentContext current context in the parsed tree
479 */ 479 */
480 void enterArgumentStatement(GeneratedYangParser.ArgumentStatementContext currentContext); 480 void enterArgumentStatement(GeneratedYangParser.ArgumentStatementContext currentContext);
481 481
...@@ -483,7 +483,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -483,7 +483,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
483 * Exit a parse tree produced by GeneratedYangParser for grammar rule 483 * Exit a parse tree produced by GeneratedYangParser for grammar rule
484 * argumentStatement. 484 * argumentStatement.
485 * 485 *
486 - * @param currentContext current context in the parsed tree. 486 + * @param currentContext current context in the parsed tree
487 */ 487 */
488 void exitArgumentStatement(GeneratedYangParser.ArgumentStatementContext currentContext); 488 void exitArgumentStatement(GeneratedYangParser.ArgumentStatementContext currentContext);
489 489
...@@ -491,7 +491,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -491,7 +491,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
491 * Enter a parse tree produced by GeneratedYangParser for grammar rule 491 * Enter a parse tree produced by GeneratedYangParser for grammar rule
492 * argumentBody. 492 * argumentBody.
493 * 493 *
494 - * @param currentContext current context in the parsed tree. 494 + * @param currentContext current context in the parsed tree
495 */ 495 */
496 void enterArgumentBody(GeneratedYangParser.ArgumentBodyContext currentContext); 496 void enterArgumentBody(GeneratedYangParser.ArgumentBodyContext currentContext);
497 497
...@@ -499,7 +499,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -499,7 +499,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
499 * Exit a parse tree produced by GeneratedYangParser for grammar rule 499 * Exit a parse tree produced by GeneratedYangParser for grammar rule
500 * argumentBody. 500 * argumentBody.
501 * 501 *
502 - * @param currentContext current context in the parsed tree. 502 + * @param currentContext current context in the parsed tree
503 */ 503 */
504 void exitArgumentBody(GeneratedYangParser.ArgumentBodyContext currentContext); 504 void exitArgumentBody(GeneratedYangParser.ArgumentBodyContext currentContext);
505 505
...@@ -507,7 +507,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -507,7 +507,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
507 * Enter a parse tree produced by GeneratedYangParser for grammar rule 507 * Enter a parse tree produced by GeneratedYangParser for grammar rule
508 * yinElementStatement. 508 * yinElementStatement.
509 * 509 *
510 - * @param currentContext current context in the parsed tree. 510 + * @param currentContext current context in the parsed tree
511 */ 511 */
512 void enterYinElementStatement(GeneratedYangParser.YinElementStatementContext currentContext); 512 void enterYinElementStatement(GeneratedYangParser.YinElementStatementContext currentContext);
513 513
...@@ -515,7 +515,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -515,7 +515,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
515 * Exit a parse tree produced by GeneratedYangParser for grammar rule 515 * Exit a parse tree produced by GeneratedYangParser for grammar rule
516 * yinElementStatement. 516 * yinElementStatement.
517 * 517 *
518 - * @param currentContext current context in the parsed tree. 518 + * @param currentContext current context in the parsed tree
519 */ 519 */
520 void exitYinElementStatement(GeneratedYangParser.YinElementStatementContext currentContext); 520 void exitYinElementStatement(GeneratedYangParser.YinElementStatementContext currentContext);
521 521
...@@ -523,7 +523,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -523,7 +523,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
523 * Enter a parse tree produced by GeneratedYangParser for grammar rule 523 * Enter a parse tree produced by GeneratedYangParser for grammar rule
524 * identityStatement. 524 * identityStatement.
525 * 525 *
526 - * @param currentContext current context in the parsed tree. 526 + * @param currentContext current context in the parsed tree
527 */ 527 */
528 void enterIdentityStatement(GeneratedYangParser.IdentityStatementContext currentContext); 528 void enterIdentityStatement(GeneratedYangParser.IdentityStatementContext currentContext);
529 529
...@@ -531,7 +531,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -531,7 +531,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
531 * Exit a parse tree produced by GeneratedYangParser for grammar rule 531 * Exit a parse tree produced by GeneratedYangParser for grammar rule
532 * identityStatement. 532 * identityStatement.
533 * 533 *
534 - * @param currentContext current context in the parsed tree. 534 + * @param currentContext current context in the parsed tree
535 */ 535 */
536 void exitIdentityStatement(GeneratedYangParser.IdentityStatementContext currentContext); 536 void exitIdentityStatement(GeneratedYangParser.IdentityStatementContext currentContext);
537 537
...@@ -539,7 +539,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -539,7 +539,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
539 * Enter a parse tree produced by GeneratedYangParser for grammar rule 539 * Enter a parse tree produced by GeneratedYangParser for grammar rule
540 * identityBody. 540 * identityBody.
541 * 541 *
542 - * @param currentContext current context in the parsed tree. 542 + * @param currentContext current context in the parsed tree
543 */ 543 */
544 void enterIdentityBody(GeneratedYangParser.IdentityBodyContext currentContext); 544 void enterIdentityBody(GeneratedYangParser.IdentityBodyContext currentContext);
545 545
...@@ -547,7 +547,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -547,7 +547,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
547 * Exit a parse tree produced by GeneratedYangParser for grammar rule 547 * Exit a parse tree produced by GeneratedYangParser for grammar rule
548 * identityBody. 548 * identityBody.
549 * 549 *
550 - * @param currentContext current context in the parsed tree. 550 + * @param currentContext current context in the parsed tree
551 */ 551 */
552 void exitIdentityBody(GeneratedYangParser.IdentityBodyContext currentContext); 552 void exitIdentityBody(GeneratedYangParser.IdentityBodyContext currentContext);
553 553
...@@ -555,7 +555,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -555,7 +555,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
555 * Enter a parse tree produced by GeneratedYangParser for grammar rule 555 * Enter a parse tree produced by GeneratedYangParser for grammar rule
556 * baseStatement. 556 * baseStatement.
557 * 557 *
558 - * @param currentContext current context in the parsed tree. 558 + * @param currentContext current context in the parsed tree
559 */ 559 */
560 void enterBaseStatement(GeneratedYangParser.BaseStatementContext currentContext); 560 void enterBaseStatement(GeneratedYangParser.BaseStatementContext currentContext);
561 561
...@@ -563,7 +563,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -563,7 +563,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
563 * Exit a parse tree produced by GeneratedYangParser for grammar rule 563 * Exit a parse tree produced by GeneratedYangParser for grammar rule
564 * baseStatement. 564 * baseStatement.
565 * 565 *
566 - * @param currentContext current context in the parsed tree. 566 + * @param currentContext current context in the parsed tree
567 */ 567 */
568 void exitBaseStatement(GeneratedYangParser.BaseStatementContext currentContext); 568 void exitBaseStatement(GeneratedYangParser.BaseStatementContext currentContext);
569 569
...@@ -571,7 +571,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -571,7 +571,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
571 * Enter a parse tree produced by GeneratedYangParser for grammar rule 571 * Enter a parse tree produced by GeneratedYangParser for grammar rule
572 * featureStatement. 572 * featureStatement.
573 * 573 *
574 - * @param currentContext current context in the parsed tree. 574 + * @param currentContext current context in the parsed tree
575 */ 575 */
576 void enterFeatureStatement(GeneratedYangParser.FeatureStatementContext currentContext); 576 void enterFeatureStatement(GeneratedYangParser.FeatureStatementContext currentContext);
577 577
...@@ -579,7 +579,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -579,7 +579,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
579 * Exit a parse tree produced by GeneratedYangParser for grammar rule 579 * Exit a parse tree produced by GeneratedYangParser for grammar rule
580 * featureStatement. 580 * featureStatement.
581 * 581 *
582 - * @param currentContext current context in the parsed tree. 582 + * @param currentContext current context in the parsed tree
583 */ 583 */
584 void exitFeatureStatement(GeneratedYangParser.FeatureStatementContext currentContext); 584 void exitFeatureStatement(GeneratedYangParser.FeatureStatementContext currentContext);
585 585
...@@ -587,7 +587,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -587,7 +587,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
587 * Enter a parse tree produced by GeneratedYangParser for grammar rule 587 * Enter a parse tree produced by GeneratedYangParser for grammar rule
588 * featureBody. 588 * featureBody.
589 * 589 *
590 - * @param currentContext current context in the parsed tree. 590 + * @param currentContext current context in the parsed tree
591 */ 591 */
592 void enterFeatureBody(GeneratedYangParser.FeatureBodyContext currentContext); 592 void enterFeatureBody(GeneratedYangParser.FeatureBodyContext currentContext);
593 593
...@@ -595,7 +595,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -595,7 +595,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
595 * Exit a parse tree produced by GeneratedYangParser for grammar rule 595 * Exit a parse tree produced by GeneratedYangParser for grammar rule
596 * featureBody. 596 * featureBody.
597 * 597 *
598 - * @param currentContext current context in the parsed tree. 598 + * @param currentContext current context in the parsed tree
599 */ 599 */
600 void exitFeatureBody(GeneratedYangParser.FeatureBodyContext currentContext); 600 void exitFeatureBody(GeneratedYangParser.FeatureBodyContext currentContext);
601 601
...@@ -603,7 +603,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -603,7 +603,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
603 * Enter a parse tree produced by GeneratedYangParser for grammar rule 603 * Enter a parse tree produced by GeneratedYangParser for grammar rule
604 * dataDefStatement. 604 * dataDefStatement.
605 * 605 *
606 - * @param currentContext current context in the parsed tree. 606 + * @param currentContext current context in the parsed tree
607 */ 607 */
608 void enterDataDefStatement(GeneratedYangParser.DataDefStatementContext currentContext); 608 void enterDataDefStatement(GeneratedYangParser.DataDefStatementContext currentContext);
609 609
...@@ -611,7 +611,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -611,7 +611,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
611 * Exit a parse tree produced by GeneratedYangParser for grammar rule 611 * Exit a parse tree produced by GeneratedYangParser for grammar rule
612 * dataDefStatement. 612 * dataDefStatement.
613 * 613 *
614 - * @param currentContext current context in the parsed tree. 614 + * @param currentContext current context in the parsed tree
615 */ 615 */
616 void exitDataDefStatement(GeneratedYangParser.DataDefStatementContext currentContext); 616 void exitDataDefStatement(GeneratedYangParser.DataDefStatementContext currentContext);
617 617
...@@ -619,7 +619,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -619,7 +619,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
619 * Enter a parse tree produced by GeneratedYangParser for grammar rule 619 * Enter a parse tree produced by GeneratedYangParser for grammar rule
620 * ifFeatureStatement. 620 * ifFeatureStatement.
621 * 621 *
622 - * @param currentContext current context in the parsed tree. 622 + * @param currentContext current context in the parsed tree
623 */ 623 */
624 void enterIfFeatureStatement(GeneratedYangParser.IfFeatureStatementContext currentContext); 624 void enterIfFeatureStatement(GeneratedYangParser.IfFeatureStatementContext currentContext);
625 625
...@@ -627,7 +627,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -627,7 +627,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
627 * Exit a parse tree produced by GeneratedYangParser for grammar rule 627 * Exit a parse tree produced by GeneratedYangParser for grammar rule
628 * ifFeatureStatement. 628 * ifFeatureStatement.
629 * 629 *
630 - * @param currentContext current context in the parsed tree. 630 + * @param currentContext current context in the parsed tree
631 */ 631 */
632 void exitIfFeatureStatement(GeneratedYangParser.IfFeatureStatementContext currentContext); 632 void exitIfFeatureStatement(GeneratedYangParser.IfFeatureStatementContext currentContext);
633 633
...@@ -635,7 +635,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -635,7 +635,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
635 * Enter a parse tree produced by GeneratedYangParser for grammar rule 635 * Enter a parse tree produced by GeneratedYangParser for grammar rule
636 * unitsStatement. 636 * unitsStatement.
637 * 637 *
638 - * @param currentContext current context in the parsed tree. 638 + * @param currentContext current context in the parsed tree
639 */ 639 */
640 void enterUnitsStatement(GeneratedYangParser.UnitsStatementContext currentContext); 640 void enterUnitsStatement(GeneratedYangParser.UnitsStatementContext currentContext);
641 641
...@@ -643,7 +643,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -643,7 +643,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
643 * Exit a parse tree produced by GeneratedYangParser for grammar rule 643 * Exit a parse tree produced by GeneratedYangParser for grammar rule
644 * unitsStatement. 644 * unitsStatement.
645 * 645 *
646 - * @param currentContext current context in the parsed tree. 646 + * @param currentContext current context in the parsed tree
647 */ 647 */
648 void exitUnitsStatement(GeneratedYangParser.UnitsStatementContext currentContext); 648 void exitUnitsStatement(GeneratedYangParser.UnitsStatementContext currentContext);
649 649
...@@ -651,7 +651,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -651,7 +651,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
651 * Enter a parse tree produced by GeneratedYangParser for grammar rule 651 * Enter a parse tree produced by GeneratedYangParser for grammar rule
652 * typedefStatement. 652 * typedefStatement.
653 * 653 *
654 - * @param currentContext current context in the parsed tree. 654 + * @param currentContext current context in the parsed tree
655 */ 655 */
656 void enterTypedefStatement(GeneratedYangParser.TypedefStatementContext currentContext); 656 void enterTypedefStatement(GeneratedYangParser.TypedefStatementContext currentContext);
657 657
...@@ -659,7 +659,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -659,7 +659,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
659 * Exit a parse tree produced by GeneratedYangParser for grammar rule 659 * Exit a parse tree produced by GeneratedYangParser for grammar rule
660 * typedefStatement. 660 * typedefStatement.
661 * 661 *
662 - * @param currentContext current context in the parsed tree. 662 + * @param currentContext current context in the parsed tree
663 */ 663 */
664 void exitTypedefStatement(GeneratedYangParser.TypedefStatementContext currentContext); 664 void exitTypedefStatement(GeneratedYangParser.TypedefStatementContext currentContext);
665 665
...@@ -667,7 +667,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -667,7 +667,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
667 * Enter a parse tree produced by GeneratedYangParser for grammar rule 667 * Enter a parse tree produced by GeneratedYangParser for grammar rule
668 * typeStatement. 668 * typeStatement.
669 * 669 *
670 - * @param currentContext current context in the parsed tree. 670 + * @param currentContext current context in the parsed tree
671 */ 671 */
672 void enterTypeStatement(GeneratedYangParser.TypeStatementContext currentContext); 672 void enterTypeStatement(GeneratedYangParser.TypeStatementContext currentContext);
673 673
...@@ -675,7 +675,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -675,7 +675,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
675 * Exit a parse tree produced by GeneratedYangParser for grammar rule 675 * Exit a parse tree produced by GeneratedYangParser for grammar rule
676 * typeStatement. 676 * typeStatement.
677 * 677 *
678 - * @param currentContext current context in the parsed tree. 678 + * @param currentContext current context in the parsed tree
679 */ 679 */
680 void exitTypeStatement(GeneratedYangParser.TypeStatementContext currentContext); 680 void exitTypeStatement(GeneratedYangParser.TypeStatementContext currentContext);
681 681
...@@ -683,7 +683,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -683,7 +683,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
683 * Enter a parse tree produced by GeneratedYangParser for grammar rule 683 * Enter a parse tree produced by GeneratedYangParser for grammar rule
684 * typeBodyStatements. 684 * typeBodyStatements.
685 * 685 *
686 - * @param currentContext current context in the parsed tree. 686 + * @param currentContext current context in the parsed tree
687 */ 687 */
688 void enterTypeBodyStatements(GeneratedYangParser.TypeBodyStatementsContext currentContext); 688 void enterTypeBodyStatements(GeneratedYangParser.TypeBodyStatementsContext currentContext);
689 689
...@@ -691,7 +691,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -691,7 +691,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
691 * Exit a parse tree produced by GeneratedYangParser for grammar rule 691 * Exit a parse tree produced by GeneratedYangParser for grammar rule
692 * typeBodyStatements. 692 * typeBodyStatements.
693 * 693 *
694 - * @param currentContext current context in the parsed tree. 694 + * @param currentContext current context in the parsed tree
695 */ 695 */
696 void exitTypeBodyStatements(GeneratedYangParser.TypeBodyStatementsContext currentContext); 696 void exitTypeBodyStatements(GeneratedYangParser.TypeBodyStatementsContext currentContext);
697 697
...@@ -699,7 +699,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -699,7 +699,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
699 * Enter a parse tree produced by GeneratedYangParser for grammar rule 699 * Enter a parse tree produced by GeneratedYangParser for grammar rule
700 * numericalRestrictions. 700 * numericalRestrictions.
701 * 701 *
702 - * @param currentContext current context in the parsed tree. 702 + * @param currentContext current context in the parsed tree
703 */ 703 */
704 void enterNumericalRestrictions(GeneratedYangParser.NumericalRestrictionsContext currentContext); 704 void enterNumericalRestrictions(GeneratedYangParser.NumericalRestrictionsContext currentContext);
705 705
...@@ -707,7 +707,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -707,7 +707,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
707 * Exit a parse tree produced by GeneratedYangParser for grammar rule 707 * Exit a parse tree produced by GeneratedYangParser for grammar rule
708 * numericalRestrictions. 708 * numericalRestrictions.
709 * 709 *
710 - * @param currentContext current context in the parsed tree. 710 + * @param currentContext current context in the parsed tree
711 */ 711 */
712 void exitNumericalRestrictions(GeneratedYangParser.NumericalRestrictionsContext currentContext); 712 void exitNumericalRestrictions(GeneratedYangParser.NumericalRestrictionsContext currentContext);
713 713
...@@ -715,7 +715,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -715,7 +715,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
715 * Enter a parse tree produced by GeneratedYangParser for grammar rule 715 * Enter a parse tree produced by GeneratedYangParser for grammar rule
716 * rangeStatement. 716 * rangeStatement.
717 * 717 *
718 - * @param currentContext current context in the parsed tree. 718 + * @param currentContext current context in the parsed tree
719 */ 719 */
720 void enterRangeStatement(GeneratedYangParser.RangeStatementContext currentContext); 720 void enterRangeStatement(GeneratedYangParser.RangeStatementContext currentContext);
721 721
...@@ -723,7 +723,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -723,7 +723,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
723 * Exit a parse tree produced by GeneratedYangParser for grammar rule 723 * Exit a parse tree produced by GeneratedYangParser for grammar rule
724 * rangeStatement. 724 * rangeStatement.
725 * 725 *
726 - * @param currentContext current context in the parsed tree. 726 + * @param currentContext current context in the parsed tree
727 */ 727 */
728 void exitRangeStatement(GeneratedYangParser.RangeStatementContext currentContext); 728 void exitRangeStatement(GeneratedYangParser.RangeStatementContext currentContext);
729 729
...@@ -731,7 +731,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -731,7 +731,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
731 * Enter a parse tree produced by GeneratedYangParser for grammar rule 731 * Enter a parse tree produced by GeneratedYangParser for grammar rule
732 * commonStatements. 732 * commonStatements.
733 * 733 *
734 - * @param currentContext current context in the parsed tree. 734 + * @param currentContext current context in the parsed tree
735 */ 735 */
736 void enterCommonStatements(GeneratedYangParser.CommonStatementsContext currentContext); 736 void enterCommonStatements(GeneratedYangParser.CommonStatementsContext currentContext);
737 737
...@@ -739,7 +739,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -739,7 +739,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
739 * Exit a parse tree produced by GeneratedYangParser for grammar rule 739 * Exit a parse tree produced by GeneratedYangParser for grammar rule
740 * commonStatements. 740 * commonStatements.
741 * 741 *
742 - * @param currentContext current context in the parsed tree. 742 + * @param currentContext current context in the parsed tree
743 */ 743 */
744 void exitCommonStatements(GeneratedYangParser.CommonStatementsContext currentContext); 744 void exitCommonStatements(GeneratedYangParser.CommonStatementsContext currentContext);
745 745
...@@ -747,7 +747,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -747,7 +747,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
747 * Enter a parse tree produced by GeneratedYangParser for grammar rule 747 * Enter a parse tree produced by GeneratedYangParser for grammar rule
748 * stringRestrictions. 748 * stringRestrictions.
749 * 749 *
750 - * @param currentContext current context in the parsed tree. 750 + * @param currentContext current context in the parsed tree
751 */ 751 */
752 void enterStringRestrictions(GeneratedYangParser.StringRestrictionsContext currentContext); 752 void enterStringRestrictions(GeneratedYangParser.StringRestrictionsContext currentContext);
753 753
...@@ -755,7 +755,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -755,7 +755,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
755 * Exit a parse tree produced by GeneratedYangParser for grammar rule 755 * Exit a parse tree produced by GeneratedYangParser for grammar rule
756 * stringRestrictions. 756 * stringRestrictions.
757 * 757 *
758 - * @param currentContext current context in the parsed tree. 758 + * @param currentContext current context in the parsed tree
759 */ 759 */
760 void exitStringRestrictions(GeneratedYangParser.StringRestrictionsContext currentContext); 760 void exitStringRestrictions(GeneratedYangParser.StringRestrictionsContext currentContext);
761 761
...@@ -763,7 +763,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -763,7 +763,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
763 * Enter a parse tree produced by GeneratedYangParser for grammar rule 763 * Enter a parse tree produced by GeneratedYangParser for grammar rule
764 * lengthStatement. 764 * lengthStatement.
765 * 765 *
766 - * @param currentContext current context in the parsed tree. 766 + * @param currentContext current context in the parsed tree
767 */ 767 */
768 void enterLengthStatement(GeneratedYangParser.LengthStatementContext currentContext); 768 void enterLengthStatement(GeneratedYangParser.LengthStatementContext currentContext);
769 769
...@@ -771,7 +771,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -771,7 +771,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
771 * Exit a parse tree produced by GeneratedYangParser for grammar rule 771 * Exit a parse tree produced by GeneratedYangParser for grammar rule
772 * lengthStatement. 772 * lengthStatement.
773 * 773 *
774 - * @param currentContext current context in the parsed tree. 774 + * @param currentContext current context in the parsed tree
775 */ 775 */
776 void exitLengthStatement(GeneratedYangParser.LengthStatementContext currentContext); 776 void exitLengthStatement(GeneratedYangParser.LengthStatementContext currentContext);
777 777
...@@ -779,7 +779,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -779,7 +779,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
779 * Enter a parse tree produced by GeneratedYangParser for grammar rule 779 * Enter a parse tree produced by GeneratedYangParser for grammar rule
780 * patternStatement. 780 * patternStatement.
781 * 781 *
782 - * @param currentContext current context in the parsed tree. 782 + * @param currentContext current context in the parsed tree
783 */ 783 */
784 void enterPatternStatement(GeneratedYangParser.PatternStatementContext currentContext); 784 void enterPatternStatement(GeneratedYangParser.PatternStatementContext currentContext);
785 785
...@@ -787,7 +787,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -787,7 +787,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
787 * Exit a parse tree produced by GeneratedYangParser for grammar rule 787 * Exit a parse tree produced by GeneratedYangParser for grammar rule
788 * patternStatement. 788 * patternStatement.
789 * 789 *
790 - * @param currentContext current context in the parsed tree. 790 + * @param currentContext current context in the parsed tree
791 */ 791 */
792 void exitPatternStatement(GeneratedYangParser.PatternStatementContext currentContext); 792 void exitPatternStatement(GeneratedYangParser.PatternStatementContext currentContext);
793 793
...@@ -795,7 +795,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -795,7 +795,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
795 * Enter a parse tree produced by GeneratedYangParser for grammar rule 795 * Enter a parse tree produced by GeneratedYangParser for grammar rule
796 * defaultStatement. 796 * defaultStatement.
797 * 797 *
798 - * @param currentContext current context in the parsed tree. 798 + * @param currentContext current context in the parsed tree
799 */ 799 */
800 void enterDefaultStatement(GeneratedYangParser.DefaultStatementContext currentContext); 800 void enterDefaultStatement(GeneratedYangParser.DefaultStatementContext currentContext);
801 801
...@@ -803,7 +803,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -803,7 +803,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
803 * Exit a parse tree produced by GeneratedYangParser for grammar rule 803 * Exit a parse tree produced by GeneratedYangParser for grammar rule
804 * defaultStatement. 804 * defaultStatement.
805 * 805 *
806 - * @param currentContext current context in the parsed tree. 806 + * @param currentContext current context in the parsed tree
807 */ 807 */
808 void exitDefaultStatement(GeneratedYangParser.DefaultStatementContext currentContext); 808 void exitDefaultStatement(GeneratedYangParser.DefaultStatementContext currentContext);
809 809
...@@ -811,7 +811,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -811,7 +811,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
811 * Enter a parse tree produced by GeneratedYangParser for grammar rule 811 * Enter a parse tree produced by GeneratedYangParser for grammar rule
812 * enumSpecification. 812 * enumSpecification.
813 * 813 *
814 - * @param currentContext current context in the parsed tree. 814 + * @param currentContext current context in the parsed tree
815 */ 815 */
816 void enterEnumSpecification(GeneratedYangParser.EnumSpecificationContext currentContext); 816 void enterEnumSpecification(GeneratedYangParser.EnumSpecificationContext currentContext);
817 817
...@@ -819,7 +819,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -819,7 +819,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
819 * Exit a parse tree produced by GeneratedYangParser for grammar rule 819 * Exit a parse tree produced by GeneratedYangParser for grammar rule
820 * enumSpecification. 820 * enumSpecification.
821 * 821 *
822 - * @param currentContext current context in the parsed tree. 822 + * @param currentContext current context in the parsed tree
823 */ 823 */
824 void exitEnumSpecification(GeneratedYangParser.EnumSpecificationContext currentContext); 824 void exitEnumSpecification(GeneratedYangParser.EnumSpecificationContext currentContext);
825 825
...@@ -827,7 +827,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -827,7 +827,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
827 * Enter a parse tree produced by GeneratedYangParser for grammar rule 827 * Enter a parse tree produced by GeneratedYangParser for grammar rule
828 * enumStatement. 828 * enumStatement.
829 * 829 *
830 - * @param currentContext current context in the parsed tree. 830 + * @param currentContext current context in the parsed tree
831 */ 831 */
832 void enterEnumStatement(GeneratedYangParser.EnumStatementContext currentContext); 832 void enterEnumStatement(GeneratedYangParser.EnumStatementContext currentContext);
833 833
...@@ -835,7 +835,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -835,7 +835,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
835 * Exit a parse tree produced by GeneratedYangParser for grammar rule 835 * Exit a parse tree produced by GeneratedYangParser for grammar rule
836 * enumStatement. 836 * enumStatement.
837 * 837 *
838 - * @param currentContext current context in the parsed tree. 838 + * @param currentContext current context in the parsed tree
839 */ 839 */
840 void exitEnumStatement(GeneratedYangParser.EnumStatementContext currentContext); 840 void exitEnumStatement(GeneratedYangParser.EnumStatementContext currentContext);
841 841
...@@ -843,7 +843,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -843,7 +843,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
843 * Enter a parse tree produced by GeneratedYangParser for grammar rule 843 * Enter a parse tree produced by GeneratedYangParser for grammar rule
844 * enumStatementBody. 844 * enumStatementBody.
845 * 845 *
846 - * @param currentContext current context in the parsed tree. 846 + * @param currentContext current context in the parsed tree
847 */ 847 */
848 void enterEnumStatementBody(GeneratedYangParser.EnumStatementBodyContext currentContext); 848 void enterEnumStatementBody(GeneratedYangParser.EnumStatementBodyContext currentContext);
849 849
...@@ -851,7 +851,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -851,7 +851,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
851 * Exit a parse tree produced by GeneratedYangParser for grammar rule 851 * Exit a parse tree produced by GeneratedYangParser for grammar rule
852 * enumStatementBody. 852 * enumStatementBody.
853 * 853 *
854 - * @param currentContext current context in the parsed tree. 854 + * @param currentContext current context in the parsed tree
855 */ 855 */
856 void exitEnumStatementBody(GeneratedYangParser.EnumStatementBodyContext currentContext); 856 void exitEnumStatementBody(GeneratedYangParser.EnumStatementBodyContext currentContext);
857 857
...@@ -859,7 +859,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -859,7 +859,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
859 * Enter a parse tree produced by GeneratedYangParser for grammar rule 859 * Enter a parse tree produced by GeneratedYangParser for grammar rule
860 * leafrefSpecification. 860 * leafrefSpecification.
861 * 861 *
862 - * @param currentContext current context in the parsed tree. 862 + * @param currentContext current context in the parsed tree
863 */ 863 */
864 void enterLeafrefSpecification(GeneratedYangParser.LeafrefSpecificationContext currentContext); 864 void enterLeafrefSpecification(GeneratedYangParser.LeafrefSpecificationContext currentContext);
865 865
...@@ -867,7 +867,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -867,7 +867,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
867 * Exit a parse tree produced by GeneratedYangParser for grammar rule 867 * Exit a parse tree produced by GeneratedYangParser for grammar rule
868 * leafrefSpecification. 868 * leafrefSpecification.
869 * 869 *
870 - * @param currentContext current context in the parsed tree. 870 + * @param currentContext current context in the parsed tree
871 */ 871 */
872 void exitLeafrefSpecification(GeneratedYangParser.LeafrefSpecificationContext currentContext); 872 void exitLeafrefSpecification(GeneratedYangParser.LeafrefSpecificationContext currentContext);
873 873
...@@ -875,7 +875,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -875,7 +875,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
875 * Enter a parse tree produced by GeneratedYangParser for grammar rule 875 * Enter a parse tree produced by GeneratedYangParser for grammar rule
876 * pathStatement. 876 * pathStatement.
877 * 877 *
878 - * @param currentContext current context in the parsed tree. 878 + * @param currentContext current context in the parsed tree
879 */ 879 */
880 void enterPathStatement(GeneratedYangParser.PathStatementContext currentContext); 880 void enterPathStatement(GeneratedYangParser.PathStatementContext currentContext);
881 881
...@@ -883,7 +883,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -883,7 +883,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
883 * Exit a parse tree produced by GeneratedYangParser for grammar rule 883 * Exit a parse tree produced by GeneratedYangParser for grammar rule
884 * pathStatement. 884 * pathStatement.
885 * 885 *
886 - * @param currentContext current context in the parsed tree. 886 + * @param currentContext current context in the parsed tree
887 */ 887 */
888 void exitPathStatement(GeneratedYangParser.PathStatementContext currentContext); 888 void exitPathStatement(GeneratedYangParser.PathStatementContext currentContext);
889 889
...@@ -891,7 +891,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -891,7 +891,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
891 * Enter a parse tree produced by GeneratedYangParser for grammar rule 891 * Enter a parse tree produced by GeneratedYangParser for grammar rule
892 * requireInstanceStatement. 892 * requireInstanceStatement.
893 * 893 *
894 - * @param currentContext current context in the parsed tree. 894 + * @param currentContext current context in the parsed tree
895 */ 895 */
896 void enterRequireInstanceStatement(GeneratedYangParser.RequireInstanceStatementContext currentContext); 896 void enterRequireInstanceStatement(GeneratedYangParser.RequireInstanceStatementContext currentContext);
897 897
...@@ -899,7 +899,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -899,7 +899,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
899 * Exit a parse tree produced by GeneratedYangParser for grammar rule 899 * Exit a parse tree produced by GeneratedYangParser for grammar rule
900 * requireInstanceStatement. 900 * requireInstanceStatement.
901 * 901 *
902 - * @param currentContext current context in the parsed tree. 902 + * @param currentContext current context in the parsed tree
903 */ 903 */
904 void exitRequireInstanceStatement(GeneratedYangParser.RequireInstanceStatementContext currentContext); 904 void exitRequireInstanceStatement(GeneratedYangParser.RequireInstanceStatementContext currentContext);
905 905
...@@ -907,7 +907,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -907,7 +907,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
907 * Enter a parse tree produced by GeneratedYangParser for grammar rule 907 * Enter a parse tree produced by GeneratedYangParser for grammar rule
908 * instanceIdentifierSpecification. 908 * instanceIdentifierSpecification.
909 * 909 *
910 - * @param currentContext current context in the parsed tree. 910 + * @param currentContext current context in the parsed tree
911 */ 911 */
912 void enterInstanceIdentifierSpecification( 912 void enterInstanceIdentifierSpecification(
913 GeneratedYangParser.InstanceIdentifierSpecificationContext currentContext); 913 GeneratedYangParser.InstanceIdentifierSpecificationContext currentContext);
...@@ -916,7 +916,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -916,7 +916,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
916 * Exit a parse tree produced by GeneratedYangParser for grammar rule 916 * Exit a parse tree produced by GeneratedYangParser for grammar rule
917 * instanceIdentifierSpecification. 917 * instanceIdentifierSpecification.
918 * 918 *
919 - * @param currentContext current context in the parsed tree. 919 + * @param currentContext current context in the parsed tree
920 */ 920 */
921 void exitInstanceIdentifierSpecification(GeneratedYangParser.InstanceIdentifierSpecificationContext currentContext); 921 void exitInstanceIdentifierSpecification(GeneratedYangParser.InstanceIdentifierSpecificationContext currentContext);
922 922
...@@ -924,7 +924,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -924,7 +924,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
924 * Enter a parse tree produced by GeneratedYangParser for grammar rule 924 * Enter a parse tree produced by GeneratedYangParser for grammar rule
925 * identityrefSpecification. 925 * identityrefSpecification.
926 * 926 *
927 - * @param currentContext current context in the parsed tree. 927 + * @param currentContext current context in the parsed tree
928 */ 928 */
929 void enterIdentityrefSpecification(GeneratedYangParser.IdentityrefSpecificationContext currentContext); 929 void enterIdentityrefSpecification(GeneratedYangParser.IdentityrefSpecificationContext currentContext);
930 930
...@@ -932,7 +932,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -932,7 +932,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
932 * Exit a parse tree produced by GeneratedYangParser for grammar rule 932 * Exit a parse tree produced by GeneratedYangParser for grammar rule
933 * identityrefSpecification. 933 * identityrefSpecification.
934 * 934 *
935 - * @param currentContext current context in the parsed tree. 935 + * @param currentContext current context in the parsed tree
936 */ 936 */
937 void exitIdentityrefSpecification(GeneratedYangParser.IdentityrefSpecificationContext currentContext); 937 void exitIdentityrefSpecification(GeneratedYangParser.IdentityrefSpecificationContext currentContext);
938 938
...@@ -940,7 +940,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -940,7 +940,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
940 * Enter a parse tree produced by GeneratedYangParser for grammar rule 940 * Enter a parse tree produced by GeneratedYangParser for grammar rule
941 * unionSpecification. 941 * unionSpecification.
942 * 942 *
943 - * @param currentContext current context in the parsed tree. 943 + * @param currentContext current context in the parsed tree
944 */ 944 */
945 void enterUnionSpecification(GeneratedYangParser.UnionSpecificationContext currentContext); 945 void enterUnionSpecification(GeneratedYangParser.UnionSpecificationContext currentContext);
946 946
...@@ -948,7 +948,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -948,7 +948,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
948 * Exit a parse tree produced by GeneratedYangParser for grammar rule 948 * Exit a parse tree produced by GeneratedYangParser for grammar rule
949 * unionSpecification. 949 * unionSpecification.
950 * 950 *
951 - * @param currentContext current context in the parsed tree. 951 + * @param currentContext current context in the parsed tree
952 */ 952 */
953 void exitUnionSpecification(GeneratedYangParser.UnionSpecificationContext currentContext); 953 void exitUnionSpecification(GeneratedYangParser.UnionSpecificationContext currentContext);
954 954
...@@ -956,7 +956,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -956,7 +956,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
956 * Enter a parse tree produced by GeneratedYangParser for grammar rule 956 * Enter a parse tree produced by GeneratedYangParser for grammar rule
957 * bitsSpecification. 957 * bitsSpecification.
958 * 958 *
959 - * @param currentContext current context in the parsed tree. 959 + * @param currentContext current context in the parsed tree
960 */ 960 */
961 void enterBitsSpecification(GeneratedYangParser.BitsSpecificationContext currentContext); 961 void enterBitsSpecification(GeneratedYangParser.BitsSpecificationContext currentContext);
962 962
...@@ -964,7 +964,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -964,7 +964,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
964 * Exit a parse tree produced by GeneratedYangParser for grammar rule 964 * Exit a parse tree produced by GeneratedYangParser for grammar rule
965 * bitsSpecification. 965 * bitsSpecification.
966 * 966 *
967 - * @param currentContext current context in the parsed tree. 967 + * @param currentContext current context in the parsed tree
968 */ 968 */
969 void exitBitsSpecification(GeneratedYangParser.BitsSpecificationContext currentContext); 969 void exitBitsSpecification(GeneratedYangParser.BitsSpecificationContext currentContext);
970 970
...@@ -972,7 +972,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -972,7 +972,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
972 * Enter a parse tree produced by GeneratedYangParser for grammar rule 972 * Enter a parse tree produced by GeneratedYangParser for grammar rule
973 * bitStatement. 973 * bitStatement.
974 * 974 *
975 - * @param currentContext current context in the parsed tree. 975 + * @param currentContext current context in the parsed tree
976 */ 976 */
977 void enterBitStatement(GeneratedYangParser.BitStatementContext currentContext); 977 void enterBitStatement(GeneratedYangParser.BitStatementContext currentContext);
978 978
...@@ -980,7 +980,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -980,7 +980,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
980 * Exit a parse tree produced by GeneratedYangParser for grammar rule 980 * Exit a parse tree produced by GeneratedYangParser for grammar rule
981 * bitStatement. 981 * bitStatement.
982 * 982 *
983 - * @param currentContext current context in the parsed tree. 983 + * @param currentContext current context in the parsed tree
984 */ 984 */
985 void exitBitStatement(GeneratedYangParser.BitStatementContext currentContext); 985 void exitBitStatement(GeneratedYangParser.BitStatementContext currentContext);
986 986
...@@ -988,7 +988,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -988,7 +988,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
988 * Enter a parse tree produced by GeneratedYangParser for grammar rule 988 * Enter a parse tree produced by GeneratedYangParser for grammar rule
989 * bitBodyStatement. 989 * bitBodyStatement.
990 * 990 *
991 - * @param currentContext current context in the parsed tree. 991 + * @param currentContext current context in the parsed tree
992 */ 992 */
993 void enterBitBodyStatement(GeneratedYangParser.BitBodyStatementContext currentContext); 993 void enterBitBodyStatement(GeneratedYangParser.BitBodyStatementContext currentContext);
994 994
...@@ -996,7 +996,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -996,7 +996,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
996 * Exit a parse tree produced by GeneratedYangParser for grammar rule 996 * Exit a parse tree produced by GeneratedYangParser for grammar rule
997 * bitBodyStatement. 997 * bitBodyStatement.
998 * 998 *
999 - * @param currentContext current context in the parsed tree. 999 + * @param currentContext current context in the parsed tree
1000 */ 1000 */
1001 void exitBitBodyStatement(GeneratedYangParser.BitBodyStatementContext currentContext); 1001 void exitBitBodyStatement(GeneratedYangParser.BitBodyStatementContext currentContext);
1002 1002
...@@ -1004,7 +1004,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1004,7 +1004,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1004 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1004 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1005 * positionStatement. 1005 * positionStatement.
1006 * 1006 *
1007 - * @param currentContext current context in the parsed tree. 1007 + * @param currentContext current context in the parsed tree
1008 */ 1008 */
1009 void enterPositionStatement(GeneratedYangParser.PositionStatementContext currentContext); 1009 void enterPositionStatement(GeneratedYangParser.PositionStatementContext currentContext);
1010 1010
...@@ -1012,7 +1012,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1012,7 +1012,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1012 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1012 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1013 * positionStatement. 1013 * positionStatement.
1014 * 1014 *
1015 - * @param currentContext current context in the parsed tree. 1015 + * @param currentContext current context in the parsed tree
1016 */ 1016 */
1017 void exitPositionStatement(GeneratedYangParser.PositionStatementContext currentContext); 1017 void exitPositionStatement(GeneratedYangParser.PositionStatementContext currentContext);
1018 1018
...@@ -1020,7 +1020,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1020,7 +1020,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1020 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1020 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1021 * statusStatement. 1021 * statusStatement.
1022 * 1022 *
1023 - * @param currentContext current context in the parsed tree. 1023 + * @param currentContext current context in the parsed tree
1024 */ 1024 */
1025 void enterStatusStatement(GeneratedYangParser.StatusStatementContext currentContext); 1025 void enterStatusStatement(GeneratedYangParser.StatusStatementContext currentContext);
1026 1026
...@@ -1028,7 +1028,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1028,7 +1028,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1028 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1028 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1029 * statusStatement. 1029 * statusStatement.
1030 * 1030 *
1031 - * @param currentContext current context in the parsed tree. 1031 + * @param currentContext current context in the parsed tree
1032 */ 1032 */
1033 void exitStatusStatement(GeneratedYangParser.StatusStatementContext currentContext); 1033 void exitStatusStatement(GeneratedYangParser.StatusStatementContext currentContext);
1034 1034
...@@ -1036,7 +1036,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1036,7 +1036,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1036 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1036 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1037 * configStatement. 1037 * configStatement.
1038 * 1038 *
1039 - * @param currentContext current context in the parsed tree. 1039 + * @param currentContext current context in the parsed tree
1040 */ 1040 */
1041 void enterConfigStatement(GeneratedYangParser.ConfigStatementContext currentContext); 1041 void enterConfigStatement(GeneratedYangParser.ConfigStatementContext currentContext);
1042 1042
...@@ -1044,7 +1044,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1044,7 +1044,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1044 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1044 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1045 * configStatement. 1045 * configStatement.
1046 * 1046 *
1047 - * @param currentContext current context in the parsed tree. 1047 + * @param currentContext current context in the parsed tree
1048 */ 1048 */
1049 void exitConfigStatement(GeneratedYangParser.ConfigStatementContext currentContext); 1049 void exitConfigStatement(GeneratedYangParser.ConfigStatementContext currentContext);
1050 1050
...@@ -1052,7 +1052,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1052,7 +1052,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1052 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1052 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1053 * mandatoryStatement. 1053 * mandatoryStatement.
1054 * 1054 *
1055 - * @param currentContext current context in the parsed tree. 1055 + * @param currentContext current context in the parsed tree
1056 */ 1056 */
1057 void enterMandatoryStatement(GeneratedYangParser.MandatoryStatementContext currentContext); 1057 void enterMandatoryStatement(GeneratedYangParser.MandatoryStatementContext currentContext);
1058 1058
...@@ -1060,7 +1060,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1060,7 +1060,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1060 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1060 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1061 * mandatoryStatement. 1061 * mandatoryStatement.
1062 * 1062 *
1063 - * @param currentContext current context in the parsed tree. 1063 + * @param currentContext current context in the parsed tree
1064 */ 1064 */
1065 void exitMandatoryStatement(GeneratedYangParser.MandatoryStatementContext currentContext); 1065 void exitMandatoryStatement(GeneratedYangParser.MandatoryStatementContext currentContext);
1066 1066
...@@ -1068,7 +1068,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1068,7 +1068,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1068 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1068 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1069 * presenceStatement. 1069 * presenceStatement.
1070 * 1070 *
1071 - * @param currentContext current context in the parsed tree. 1071 + * @param currentContext current context in the parsed tree
1072 */ 1072 */
1073 void enterPresenceStatement(GeneratedYangParser.PresenceStatementContext currentContext); 1073 void enterPresenceStatement(GeneratedYangParser.PresenceStatementContext currentContext);
1074 1074
...@@ -1076,7 +1076,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1076,7 +1076,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1076 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1076 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1077 * presenceStatement. 1077 * presenceStatement.
1078 * 1078 *
1079 - * @param currentContext current context in the parsed tree. 1079 + * @param currentContext current context in the parsed tree
1080 */ 1080 */
1081 void exitPresenceStatement(GeneratedYangParser.PresenceStatementContext currentContext); 1081 void exitPresenceStatement(GeneratedYangParser.PresenceStatementContext currentContext);
1082 1082
...@@ -1084,7 +1084,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1084,7 +1084,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1084 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1084 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1085 * orderedByStatement. 1085 * orderedByStatement.
1086 * 1086 *
1087 - * @param currentContext current context in the parsed tree. 1087 + * @param currentContext current context in the parsed tree
1088 */ 1088 */
1089 void enterOrderedByStatement(GeneratedYangParser.OrderedByStatementContext currentContext); 1089 void enterOrderedByStatement(GeneratedYangParser.OrderedByStatementContext currentContext);
1090 1090
...@@ -1092,7 +1092,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1092,7 +1092,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1092 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1092 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1093 * orderedByStatement. 1093 * orderedByStatement.
1094 * 1094 *
1095 - * @param currentContext current context in the parsed tree. 1095 + * @param currentContext current context in the parsed tree
1096 */ 1096 */
1097 void exitOrderedByStatement(GeneratedYangParser.OrderedByStatementContext currentContext); 1097 void exitOrderedByStatement(GeneratedYangParser.OrderedByStatementContext currentContext);
1098 1098
...@@ -1100,7 +1100,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1100,7 +1100,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1100 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1100 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1101 * mustStatement. 1101 * mustStatement.
1102 * 1102 *
1103 - * @param currentContext current context in the parsed tree. 1103 + * @param currentContext current context in the parsed tree
1104 */ 1104 */
1105 void enterMustStatement(GeneratedYangParser.MustStatementContext currentContext); 1105 void enterMustStatement(GeneratedYangParser.MustStatementContext currentContext);
1106 1106
...@@ -1108,7 +1108,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1108,7 +1108,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1108 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1108 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1109 * mustStatement. 1109 * mustStatement.
1110 * 1110 *
1111 - * @param currentContext current context in the parsed tree. 1111 + * @param currentContext current context in the parsed tree
1112 */ 1112 */
1113 void exitMustStatement(GeneratedYangParser.MustStatementContext currentContext); 1113 void exitMustStatement(GeneratedYangParser.MustStatementContext currentContext);
1114 1114
...@@ -1116,7 +1116,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1116,7 +1116,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1116 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1116 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1117 * errorMessageStatement. 1117 * errorMessageStatement.
1118 * 1118 *
1119 - * @param currentContext current context in the parsed tree. 1119 + * @param currentContext current context in the parsed tree
1120 */ 1120 */
1121 void enterErrorMessageStatement(GeneratedYangParser.ErrorMessageStatementContext currentContext); 1121 void enterErrorMessageStatement(GeneratedYangParser.ErrorMessageStatementContext currentContext);
1122 1122
...@@ -1124,7 +1124,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1124,7 +1124,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1124 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1124 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1125 * errorMessageStatement. 1125 * errorMessageStatement.
1126 * 1126 *
1127 - * @param currentContext current context in the parsed tree. 1127 + * @param currentContext current context in the parsed tree
1128 */ 1128 */
1129 void exitErrorMessageStatement(GeneratedYangParser.ErrorMessageStatementContext currentContext); 1129 void exitErrorMessageStatement(GeneratedYangParser.ErrorMessageStatementContext currentContext);
1130 1130
...@@ -1132,7 +1132,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1132,7 +1132,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1132 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1132 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1133 * errorAppTagStatement. 1133 * errorAppTagStatement.
1134 * 1134 *
1135 - * @param currentContext current context in the parsed tree. 1135 + * @param currentContext current context in the parsed tree
1136 */ 1136 */
1137 void enterErrorAppTagStatement(GeneratedYangParser.ErrorAppTagStatementContext currentContext); 1137 void enterErrorAppTagStatement(GeneratedYangParser.ErrorAppTagStatementContext currentContext);
1138 1138
...@@ -1140,7 +1140,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1140,7 +1140,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1140 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1140 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1141 * errorAppTagStatement. 1141 * errorAppTagStatement.
1142 * 1142 *
1143 - * @param currentContext current context in the parsed tree. 1143 + * @param currentContext current context in the parsed tree
1144 */ 1144 */
1145 void exitErrorAppTagStatement(GeneratedYangParser.ErrorAppTagStatementContext currentContext); 1145 void exitErrorAppTagStatement(GeneratedYangParser.ErrorAppTagStatementContext currentContext);
1146 1146
...@@ -1148,7 +1148,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1148,7 +1148,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1148 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1148 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1149 * minElementsStatement. 1149 * minElementsStatement.
1150 * 1150 *
1151 - * @param currentContext current context in the parsed tree. 1151 + * @param currentContext current context in the parsed tree
1152 */ 1152 */
1153 void enterMinElementsStatement(GeneratedYangParser.MinElementsStatementContext currentContext); 1153 void enterMinElementsStatement(GeneratedYangParser.MinElementsStatementContext currentContext);
1154 1154
...@@ -1156,7 +1156,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1156,7 +1156,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1156 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1156 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1157 * minElementsStatement. 1157 * minElementsStatement.
1158 * 1158 *
1159 - * @param currentContext current context in the parsed tree. 1159 + * @param currentContext current context in the parsed tree
1160 */ 1160 */
1161 void exitMinElementsStatement(GeneratedYangParser.MinElementsStatementContext currentContext); 1161 void exitMinElementsStatement(GeneratedYangParser.MinElementsStatementContext currentContext);
1162 1162
...@@ -1164,7 +1164,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1164,7 +1164,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1164 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1164 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1165 * maxElementsStatement. 1165 * maxElementsStatement.
1166 * 1166 *
1167 - * @param currentContext current context in the parsed tree. 1167 + * @param currentContext current context in the parsed tree
1168 */ 1168 */
1169 void enterMaxElementsStatement(GeneratedYangParser.MaxElementsStatementContext currentContext); 1169 void enterMaxElementsStatement(GeneratedYangParser.MaxElementsStatementContext currentContext);
1170 1170
...@@ -1172,7 +1172,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1172,7 +1172,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1172 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1172 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1173 * maxElementsStatement. 1173 * maxElementsStatement.
1174 * 1174 *
1175 - * @param currentContext current context in the parsed tree. 1175 + * @param currentContext current context in the parsed tree
1176 */ 1176 */
1177 void exitMaxElementsStatement(GeneratedYangParser.MaxElementsStatementContext currentContext); 1177 void exitMaxElementsStatement(GeneratedYangParser.MaxElementsStatementContext currentContext);
1178 1178
...@@ -1180,7 +1180,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1180,7 +1180,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1180 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1180 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1181 * maxValueArgument. 1181 * maxValueArgument.
1182 * 1182 *
1183 - * @param currentContext current context in the parsed tree. 1183 + * @param currentContext current context in the parsed tree
1184 */ 1184 */
1185 void enterMaxValueArgument(GeneratedYangParser.MaxValueArgumentContext currentContext); 1185 void enterMaxValueArgument(GeneratedYangParser.MaxValueArgumentContext currentContext);
1186 1186
...@@ -1188,7 +1188,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1188,7 +1188,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1188 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1188 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1189 * maxValueArgument. 1189 * maxValueArgument.
1190 * 1190 *
1191 - * @param currentContext current context in the parsed tree. 1191 + * @param currentContext current context in the parsed tree
1192 */ 1192 */
1193 void exitMaxValueArgument(GeneratedYangParser.MaxValueArgumentContext currentContext); 1193 void exitMaxValueArgument(GeneratedYangParser.MaxValueArgumentContext currentContext);
1194 1194
...@@ -1196,7 +1196,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1196,7 +1196,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1196 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1196 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1197 * valueStatement. 1197 * valueStatement.
1198 * 1198 *
1199 - * @param currentContext current context in the parsed tree. 1199 + * @param currentContext current context in the parsed tree
1200 */ 1200 */
1201 void enterValueStatement(GeneratedYangParser.ValueStatementContext currentContext); 1201 void enterValueStatement(GeneratedYangParser.ValueStatementContext currentContext);
1202 1202
...@@ -1204,7 +1204,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1204,7 +1204,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1204 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1204 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1205 * valueStatement. 1205 * valueStatement.
1206 * 1206 *
1207 - * @param currentContext current context in the parsed tree. 1207 + * @param currentContext current context in the parsed tree
1208 */ 1208 */
1209 void exitValueStatement(GeneratedYangParser.ValueStatementContext currentContext); 1209 void exitValueStatement(GeneratedYangParser.ValueStatementContext currentContext);
1210 1210
...@@ -1212,7 +1212,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1212,7 +1212,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1212 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1212 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1213 * groupingStatement. 1213 * groupingStatement.
1214 * 1214 *
1215 - * @param currentContext current context in the parsed tree. 1215 + * @param currentContext current context in the parsed tree
1216 */ 1216 */
1217 void enterGroupingStatement(GeneratedYangParser.GroupingStatementContext currentContext); 1217 void enterGroupingStatement(GeneratedYangParser.GroupingStatementContext currentContext);
1218 1218
...@@ -1220,7 +1220,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1220,7 +1220,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1220 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1220 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1221 * groupingStatement. 1221 * groupingStatement.
1222 * 1222 *
1223 - * @param currentContext current context in the parsed tree. 1223 + * @param currentContext current context in the parsed tree
1224 */ 1224 */
1225 void exitGroupingStatement(GeneratedYangParser.GroupingStatementContext currentContext); 1225 void exitGroupingStatement(GeneratedYangParser.GroupingStatementContext currentContext);
1226 1226
...@@ -1228,7 +1228,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1228,7 +1228,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1228 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1228 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1229 * containerStatement. 1229 * containerStatement.
1230 * 1230 *
1231 - * @param currentContext current context in the parsed tree. 1231 + * @param currentContext current context in the parsed tree
1232 */ 1232 */
1233 void enterContainerStatement(GeneratedYangParser.ContainerStatementContext currentContext); 1233 void enterContainerStatement(GeneratedYangParser.ContainerStatementContext currentContext);
1234 1234
...@@ -1236,7 +1236,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1236,7 +1236,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1236 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1236 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1237 * containerStatement. 1237 * containerStatement.
1238 * 1238 *
1239 - * @param currentContext current context in the parsed tree. 1239 + * @param currentContext current context in the parsed tree
1240 */ 1240 */
1241 void exitContainerStatement(GeneratedYangParser.ContainerStatementContext currentContext); 1241 void exitContainerStatement(GeneratedYangParser.ContainerStatementContext currentContext);
1242 1242
...@@ -1244,7 +1244,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1244,7 +1244,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1244 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1244 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1245 * leafStatement. 1245 * leafStatement.
1246 * 1246 *
1247 - * @param currentContext current context in the parsed tree. 1247 + * @param currentContext current context in the parsed tree
1248 */ 1248 */
1249 void enterLeafStatement(GeneratedYangParser.LeafStatementContext currentContext); 1249 void enterLeafStatement(GeneratedYangParser.LeafStatementContext currentContext);
1250 1250
...@@ -1252,7 +1252,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1252,7 +1252,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1252 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1252 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1253 * leafStatement. 1253 * leafStatement.
1254 * 1254 *
1255 - * @param currentContext current context in the parsed tree. 1255 + * @param currentContext current context in the parsed tree
1256 */ 1256 */
1257 void exitLeafStatement(GeneratedYangParser.LeafStatementContext currentContext); 1257 void exitLeafStatement(GeneratedYangParser.LeafStatementContext currentContext);
1258 1258
...@@ -1260,7 +1260,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1260,7 +1260,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1260 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1260 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1261 * leafListStatement. 1261 * leafListStatement.
1262 * 1262 *
1263 - * @param currentContext current context in the parsed tree. 1263 + * @param currentContext current context in the parsed tree
1264 */ 1264 */
1265 void enterLeafListStatement(GeneratedYangParser.LeafListStatementContext currentContext); 1265 void enterLeafListStatement(GeneratedYangParser.LeafListStatementContext currentContext);
1266 1266
...@@ -1268,7 +1268,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1268,7 +1268,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1268 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1268 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1269 * leafListStatement. 1269 * leafListStatement.
1270 * 1270 *
1271 - * @param currentContext current context in the parsed tree. 1271 + * @param currentContext current context in the parsed tree
1272 */ 1272 */
1273 void exitLeafListStatement(GeneratedYangParser.LeafListStatementContext currentContext); 1273 void exitLeafListStatement(GeneratedYangParser.LeafListStatementContext currentContext);
1274 1274
...@@ -1276,7 +1276,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1276,7 +1276,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1276 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1276 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1277 * listStatement. 1277 * listStatement.
1278 * 1278 *
1279 - * @param currentContext current context in the parsed tree. 1279 + * @param currentContext current context in the parsed tree
1280 */ 1280 */
1281 void enterListStatement(GeneratedYangParser.ListStatementContext currentContext); 1281 void enterListStatement(GeneratedYangParser.ListStatementContext currentContext);
1282 1282
...@@ -1284,7 +1284,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1284,7 +1284,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1284 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1284 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1285 * listStatement. 1285 * listStatement.
1286 * 1286 *
1287 - * @param currentContext current context in the parsed tree. 1287 + * @param currentContext current context in the parsed tree
1288 */ 1288 */
1289 void exitListStatement(GeneratedYangParser.ListStatementContext currentContext); 1289 void exitListStatement(GeneratedYangParser.ListStatementContext currentContext);
1290 1290
...@@ -1292,7 +1292,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1292,7 +1292,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1292 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1292 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1293 * keyStatement. 1293 * keyStatement.
1294 * 1294 *
1295 - * @param currentContext current context in the parsed tree. 1295 + * @param currentContext current context in the parsed tree
1296 */ 1296 */
1297 void enterKeyStatement(GeneratedYangParser.KeyStatementContext currentContext); 1297 void enterKeyStatement(GeneratedYangParser.KeyStatementContext currentContext);
1298 1298
...@@ -1300,7 +1300,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1300,7 +1300,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1300 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1300 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1301 * keyStatement. 1301 * keyStatement.
1302 * 1302 *
1303 - * @param currentContext current context in the parsed tree. 1303 + * @param currentContext current context in the parsed tree
1304 */ 1304 */
1305 void exitKeyStatement(GeneratedYangParser.KeyStatementContext currentContext); 1305 void exitKeyStatement(GeneratedYangParser.KeyStatementContext currentContext);
1306 1306
...@@ -1308,7 +1308,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1308,7 +1308,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1308 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1308 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1309 * uniqueStatement. 1309 * uniqueStatement.
1310 * 1310 *
1311 - * @param currentContext current context in the parsed tree. 1311 + * @param currentContext current context in the parsed tree
1312 */ 1312 */
1313 void enterUniqueStatement(GeneratedYangParser.UniqueStatementContext currentContext); 1313 void enterUniqueStatement(GeneratedYangParser.UniqueStatementContext currentContext);
1314 1314
...@@ -1316,7 +1316,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1316,7 +1316,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1316 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1316 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1317 * uniqueStatement. 1317 * uniqueStatement.
1318 * 1318 *
1319 - * @param currentContext current context in the parsed tree. 1319 + * @param currentContext current context in the parsed tree
1320 */ 1320 */
1321 void exitUniqueStatement(GeneratedYangParser.UniqueStatementContext currentContext); 1321 void exitUniqueStatement(GeneratedYangParser.UniqueStatementContext currentContext);
1322 1322
...@@ -1324,7 +1324,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1324,7 +1324,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1324 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1324 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1325 * choiceStatement. 1325 * choiceStatement.
1326 * 1326 *
1327 - * @param currentContext current context in the parsed tree. 1327 + * @param currentContext current context in the parsed tree
1328 */ 1328 */
1329 void enterChoiceStatement(GeneratedYangParser.ChoiceStatementContext currentContext); 1329 void enterChoiceStatement(GeneratedYangParser.ChoiceStatementContext currentContext);
1330 1330
...@@ -1332,7 +1332,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1332,7 +1332,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1332 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1332 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1333 * choiceStatement. 1333 * choiceStatement.
1334 * 1334 *
1335 - * @param currentContext current context in the parsed tree. 1335 + * @param currentContext current context in the parsed tree
1336 */ 1336 */
1337 void exitChoiceStatement(GeneratedYangParser.ChoiceStatementContext currentContext); 1337 void exitChoiceStatement(GeneratedYangParser.ChoiceStatementContext currentContext);
1338 1338
...@@ -1340,7 +1340,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1340,7 +1340,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1340 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1340 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1341 * shortCaseStatement. 1341 * shortCaseStatement.
1342 * 1342 *
1343 - * @param currentContext current context in the parsed tree. 1343 + * @param currentContext current context in the parsed tree
1344 */ 1344 */
1345 void enterShortCaseStatement(GeneratedYangParser.ShortCaseStatementContext currentContext); 1345 void enterShortCaseStatement(GeneratedYangParser.ShortCaseStatementContext currentContext);
1346 1346
...@@ -1348,7 +1348,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1348,7 +1348,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1348 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1348 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1349 * shortCaseStatement. 1349 * shortCaseStatement.
1350 * 1350 *
1351 - * @param currentContext current context in the parsed tree. 1351 + * @param currentContext current context in the parsed tree
1352 */ 1352 */
1353 void exitShortCaseStatement(GeneratedYangParser.ShortCaseStatementContext currentContext); 1353 void exitShortCaseStatement(GeneratedYangParser.ShortCaseStatementContext currentContext);
1354 1354
...@@ -1356,7 +1356,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1356,7 +1356,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1356 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1356 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1357 * caseStatement. 1357 * caseStatement.
1358 * 1358 *
1359 - * @param currentContext current context in the parsed tree. 1359 + * @param currentContext current context in the parsed tree
1360 */ 1360 */
1361 void enterCaseStatement(GeneratedYangParser.CaseStatementContext currentContext); 1361 void enterCaseStatement(GeneratedYangParser.CaseStatementContext currentContext);
1362 1362
...@@ -1364,7 +1364,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1364,7 +1364,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1364 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1364 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1365 * caseStatement. 1365 * caseStatement.
1366 * 1366 *
1367 - * @param currentContext current context in the parsed tree. 1367 + * @param currentContext current context in the parsed tree
1368 */ 1368 */
1369 void exitCaseStatement(GeneratedYangParser.CaseStatementContext currentContext); 1369 void exitCaseStatement(GeneratedYangParser.CaseStatementContext currentContext);
1370 1370
...@@ -1372,7 +1372,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1372,7 +1372,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1372 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1372 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1373 * usesStatement. 1373 * usesStatement.
1374 * 1374 *
1375 - * @param currentContext current context in the parsed tree. 1375 + * @param currentContext current context in the parsed tree
1376 */ 1376 */
1377 void enterUsesStatement(GeneratedYangParser.UsesStatementContext currentContext); 1377 void enterUsesStatement(GeneratedYangParser.UsesStatementContext currentContext);
1378 1378
...@@ -1380,7 +1380,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1380,7 +1380,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1380 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1380 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1381 * usesStatement. 1381 * usesStatement.
1382 * 1382 *
1383 - * @param currentContext current context in the parsed tree. 1383 + * @param currentContext current context in the parsed tree
1384 */ 1384 */
1385 void exitUsesStatement(GeneratedYangParser.UsesStatementContext currentContext); 1385 void exitUsesStatement(GeneratedYangParser.UsesStatementContext currentContext);
1386 1386
...@@ -1388,7 +1388,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1388,7 +1388,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1388 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1388 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1389 * refineStatement. 1389 * refineStatement.
1390 * 1390 *
1391 - * @param currentContext current context in the parsed tree. 1391 + * @param currentContext current context in the parsed tree
1392 */ 1392 */
1393 void enterRefineStatement(GeneratedYangParser.RefineStatementContext currentContext); 1393 void enterRefineStatement(GeneratedYangParser.RefineStatementContext currentContext);
1394 1394
...@@ -1396,7 +1396,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1396,7 +1396,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1396 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1396 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1397 * refineStatement. 1397 * refineStatement.
1398 * 1398 *
1399 - * @param currentContext current context in the parsed tree. 1399 + * @param currentContext current context in the parsed tree
1400 */ 1400 */
1401 void exitRefineStatement(GeneratedYangParser.RefineStatementContext currentContext); 1401 void exitRefineStatement(GeneratedYangParser.RefineStatementContext currentContext);
1402 1402
...@@ -1404,7 +1404,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1404,7 +1404,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1404 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1404 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1405 * refineContainerStatements. 1405 * refineContainerStatements.
1406 * 1406 *
1407 - * @param currentContext current context in the parsed tree. 1407 + * @param currentContext current context in the parsed tree
1408 */ 1408 */
1409 void enterRefineContainerStatements(GeneratedYangParser.RefineContainerStatementsContext currentContext); 1409 void enterRefineContainerStatements(GeneratedYangParser.RefineContainerStatementsContext currentContext);
1410 1410
...@@ -1412,7 +1412,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1412,7 +1412,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1412 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1412 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1413 * refineContainerStatements. 1413 * refineContainerStatements.
1414 * 1414 *
1415 - * @param currentContext current context in the parsed tree. 1415 + * @param currentContext current context in the parsed tree
1416 */ 1416 */
1417 void exitRefineContainerStatements(GeneratedYangParser.RefineContainerStatementsContext currentContext); 1417 void exitRefineContainerStatements(GeneratedYangParser.RefineContainerStatementsContext currentContext);
1418 1418
...@@ -1420,7 +1420,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1420,7 +1420,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1420 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1420 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1421 * refineLeafStatements. 1421 * refineLeafStatements.
1422 * 1422 *
1423 - * @param currentContext current context in the parsed tree. 1423 + * @param currentContext current context in the parsed tree
1424 */ 1424 */
1425 void enterRefineLeafStatements(GeneratedYangParser.RefineLeafStatementsContext currentContext); 1425 void enterRefineLeafStatements(GeneratedYangParser.RefineLeafStatementsContext currentContext);
1426 1426
...@@ -1428,7 +1428,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1428,7 +1428,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1428 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1428 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1429 * refineLeafStatements. 1429 * refineLeafStatements.
1430 * 1430 *
1431 - * @param currentContext current context in the parsed tree. 1431 + * @param currentContext current context in the parsed tree
1432 */ 1432 */
1433 void exitRefineLeafStatements(GeneratedYangParser.RefineLeafStatementsContext currentContext); 1433 void exitRefineLeafStatements(GeneratedYangParser.RefineLeafStatementsContext currentContext);
1434 1434
...@@ -1436,7 +1436,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1436,7 +1436,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1436 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1436 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1437 * refineLeafListStatements. 1437 * refineLeafListStatements.
1438 * 1438 *
1439 - * @param currentContext current context in the parsed tree. 1439 + * @param currentContext current context in the parsed tree
1440 */ 1440 */
1441 void enterRefineLeafListStatements(GeneratedYangParser.RefineLeafListStatementsContext currentContext); 1441 void enterRefineLeafListStatements(GeneratedYangParser.RefineLeafListStatementsContext currentContext);
1442 1442
...@@ -1444,7 +1444,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1444,7 +1444,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1444 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1444 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1445 * refineLeafListStatements. 1445 * refineLeafListStatements.
1446 * 1446 *
1447 - * @param currentContext current context in the parsed tree. 1447 + * @param currentContext current context in the parsed tree
1448 */ 1448 */
1449 void exitRefineLeafListStatements(GeneratedYangParser.RefineLeafListStatementsContext currentContext); 1449 void exitRefineLeafListStatements(GeneratedYangParser.RefineLeafListStatementsContext currentContext);
1450 1450
...@@ -1452,7 +1452,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1452,7 +1452,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1452 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1452 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1453 * refineListStatements. 1453 * refineListStatements.
1454 * 1454 *
1455 - * @param currentContext current context in the parsed tree. 1455 + * @param currentContext current context in the parsed tree
1456 */ 1456 */
1457 void enterRefineListStatements(GeneratedYangParser.RefineListStatementsContext currentContext); 1457 void enterRefineListStatements(GeneratedYangParser.RefineListStatementsContext currentContext);
1458 1458
...@@ -1460,7 +1460,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1460,7 +1460,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1460 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1460 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1461 * refineListStatements. 1461 * refineListStatements.
1462 * 1462 *
1463 - * @param currentContext current context in the parsed tree. 1463 + * @param currentContext current context in the parsed tree
1464 */ 1464 */
1465 void exitRefineListStatements(GeneratedYangParser.RefineListStatementsContext currentContext); 1465 void exitRefineListStatements(GeneratedYangParser.RefineListStatementsContext currentContext);
1466 1466
...@@ -1468,7 +1468,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1468,7 +1468,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1468 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1468 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1469 * refineChoiceStatements. 1469 * refineChoiceStatements.
1470 * 1470 *
1471 - * @param currentContext current context in the parsed tree. 1471 + * @param currentContext current context in the parsed tree
1472 */ 1472 */
1473 void enterRefineChoiceStatements(GeneratedYangParser.RefineChoiceStatementsContext currentContext); 1473 void enterRefineChoiceStatements(GeneratedYangParser.RefineChoiceStatementsContext currentContext);
1474 1474
...@@ -1476,7 +1476,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1476,7 +1476,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1476 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1476 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1477 * refineChoiceStatements. 1477 * refineChoiceStatements.
1478 * 1478 *
1479 - * @param currentContext current context in the parsed tree. 1479 + * @param currentContext current context in the parsed tree
1480 */ 1480 */
1481 void exitRefineChoiceStatements(GeneratedYangParser.RefineChoiceStatementsContext currentContext); 1481 void exitRefineChoiceStatements(GeneratedYangParser.RefineChoiceStatementsContext currentContext);
1482 1482
...@@ -1484,7 +1484,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1484,7 +1484,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1484 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1484 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1485 * refineCaseStatements. 1485 * refineCaseStatements.
1486 * 1486 *
1487 - * @param currentContext current context in the parsed tree. 1487 + * @param currentContext current context in the parsed tree
1488 */ 1488 */
1489 void enterRefineCaseStatements(GeneratedYangParser.RefineCaseStatementsContext currentContext); 1489 void enterRefineCaseStatements(GeneratedYangParser.RefineCaseStatementsContext currentContext);
1490 1490
...@@ -1492,7 +1492,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1492,7 +1492,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1492 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1492 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1493 * refineCaseStatements. 1493 * refineCaseStatements.
1494 * 1494 *
1495 - * @param currentContext current context in the parsed tree. 1495 + * @param currentContext current context in the parsed tree
1496 */ 1496 */
1497 void exitRefineCaseStatements(GeneratedYangParser.RefineCaseStatementsContext currentContext); 1497 void exitRefineCaseStatements(GeneratedYangParser.RefineCaseStatementsContext currentContext);
1498 1498
...@@ -1500,7 +1500,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1500,7 +1500,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1500 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1500 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1501 * usesAugmentStatement. 1501 * usesAugmentStatement.
1502 * 1502 *
1503 - * @param currentContext current context in the parsed tree. 1503 + * @param currentContext current context in the parsed tree
1504 */ 1504 */
1505 void enterUsesAugmentStatement(GeneratedYangParser.UsesAugmentStatementContext currentContext); 1505 void enterUsesAugmentStatement(GeneratedYangParser.UsesAugmentStatementContext currentContext);
1506 1506
...@@ -1508,7 +1508,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1508,7 +1508,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1508 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1508 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1509 * usesAugmentStatement. 1509 * usesAugmentStatement.
1510 * 1510 *
1511 - * @param currentContext current context in the parsed tree. 1511 + * @param currentContext current context in the parsed tree
1512 */ 1512 */
1513 void exitUsesAugmentStatement(GeneratedYangParser.UsesAugmentStatementContext currentContext); 1513 void exitUsesAugmentStatement(GeneratedYangParser.UsesAugmentStatementContext currentContext);
1514 1514
...@@ -1516,7 +1516,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1516,7 +1516,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1516 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1516 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1517 * augmentStatement. 1517 * augmentStatement.
1518 * 1518 *
1519 - * @param currentContext current context in the parsed tree. 1519 + * @param currentContext current context in the parsed tree
1520 */ 1520 */
1521 void enterAugmentStatement(GeneratedYangParser.AugmentStatementContext currentContext); 1521 void enterAugmentStatement(GeneratedYangParser.AugmentStatementContext currentContext);
1522 1522
...@@ -1524,7 +1524,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1524,7 +1524,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1524 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1524 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1525 * augmentStatement. 1525 * augmentStatement.
1526 * 1526 *
1527 - * @param currentContext current context in the parsed tree. 1527 + * @param currentContext current context in the parsed tree
1528 */ 1528 */
1529 void exitAugmentStatement(GeneratedYangParser.AugmentStatementContext currentContext); 1529 void exitAugmentStatement(GeneratedYangParser.AugmentStatementContext currentContext);
1530 1530
...@@ -1532,7 +1532,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1532,7 +1532,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1532 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1532 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1533 * whenStatement. 1533 * whenStatement.
1534 * 1534 *
1535 - * @param currentContext current context in the parsed tree. 1535 + * @param currentContext current context in the parsed tree
1536 */ 1536 */
1537 void enterWhenStatement(GeneratedYangParser.WhenStatementContext currentContext); 1537 void enterWhenStatement(GeneratedYangParser.WhenStatementContext currentContext);
1538 1538
...@@ -1540,7 +1540,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1540,7 +1540,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1540 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1540 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1541 * whenStatement. 1541 * whenStatement.
1542 * 1542 *
1543 - * @param currentContext current context in the parsed tree. 1543 + * @param currentContext current context in the parsed tree
1544 */ 1544 */
1545 void exitWhenStatement(GeneratedYangParser.WhenStatementContext currentContext); 1545 void exitWhenStatement(GeneratedYangParser.WhenStatementContext currentContext);
1546 1546
...@@ -1548,7 +1548,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1548,7 +1548,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1548 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1548 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1549 * rpcStatement. 1549 * rpcStatement.
1550 * 1550 *
1551 - * @param currentContext current context in the parsed tree. 1551 + * @param currentContext current context in the parsed tree
1552 */ 1552 */
1553 void enterRpcStatement(GeneratedYangParser.RpcStatementContext currentContext); 1553 void enterRpcStatement(GeneratedYangParser.RpcStatementContext currentContext);
1554 1554
...@@ -1556,7 +1556,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1556,7 +1556,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1556 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1556 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1557 * rpcStatement. 1557 * rpcStatement.
1558 * 1558 *
1559 - * @param currentContext current context in the parsed tree. 1559 + * @param currentContext current context in the parsed tree
1560 */ 1560 */
1561 void exitRpcStatement(GeneratedYangParser.RpcStatementContext currentContext); 1561 void exitRpcStatement(GeneratedYangParser.RpcStatementContext currentContext);
1562 1562
...@@ -1564,7 +1564,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1564,7 +1564,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1564 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1564 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1565 * inputStatement. 1565 * inputStatement.
1566 * 1566 *
1567 - * @param currentContext current context in the parsed tree. 1567 + * @param currentContext current context in the parsed tree
1568 */ 1568 */
1569 void enterInputStatement(GeneratedYangParser.InputStatementContext currentContext); 1569 void enterInputStatement(GeneratedYangParser.InputStatementContext currentContext);
1570 1570
...@@ -1572,7 +1572,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1572,7 +1572,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1572 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1572 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1573 * inputStatement. 1573 * inputStatement.
1574 * 1574 *
1575 - * @param currentContext current context in the parsed tree. 1575 + * @param currentContext current context in the parsed tree
1576 */ 1576 */
1577 void exitInputStatement(GeneratedYangParser.InputStatementContext currentContext); 1577 void exitInputStatement(GeneratedYangParser.InputStatementContext currentContext);
1578 1578
...@@ -1580,7 +1580,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1580,7 +1580,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1580 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1580 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1581 * outputStatement. 1581 * outputStatement.
1582 * 1582 *
1583 - * @param currentContext current context in the parsed tree. 1583 + * @param currentContext current context in the parsed tree
1584 */ 1584 */
1585 void enterOutputStatement(GeneratedYangParser.OutputStatementContext currentContext); 1585 void enterOutputStatement(GeneratedYangParser.OutputStatementContext currentContext);
1586 1586
...@@ -1588,7 +1588,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1588,7 +1588,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1588 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1588 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1589 * outputStatement. 1589 * outputStatement.
1590 * 1590 *
1591 - * @param currentContext current context in the parsed tree. 1591 + * @param currentContext current context in the parsed tree
1592 */ 1592 */
1593 void exitOutputStatement(GeneratedYangParser.OutputStatementContext currentContext); 1593 void exitOutputStatement(GeneratedYangParser.OutputStatementContext currentContext);
1594 1594
...@@ -1596,7 +1596,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1596,7 +1596,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1596 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1596 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1597 * notificationStatement. 1597 * notificationStatement.
1598 * 1598 *
1599 - * @param currentContext current context in the parsed tree. 1599 + * @param currentContext current context in the parsed tree
1600 */ 1600 */
1601 void enterNotificationStatement(GeneratedYangParser.NotificationStatementContext currentContext); 1601 void enterNotificationStatement(GeneratedYangParser.NotificationStatementContext currentContext);
1602 1602
...@@ -1604,7 +1604,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1604,7 +1604,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1604 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1604 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1605 * notificationStatement. 1605 * notificationStatement.
1606 * 1606 *
1607 - * @param currentContext current context in the parsed tree. 1607 + * @param currentContext current context in the parsed tree
1608 */ 1608 */
1609 void exitNotificationStatement(GeneratedYangParser.NotificationStatementContext currentContext); 1609 void exitNotificationStatement(GeneratedYangParser.NotificationStatementContext currentContext);
1610 1610
...@@ -1612,7 +1612,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1612,7 +1612,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1612 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1612 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1613 * deviationStatement. 1613 * deviationStatement.
1614 * 1614 *
1615 - * @param currentContext current context in the parsed tree. 1615 + * @param currentContext current context in the parsed tree
1616 */ 1616 */
1617 void enterDeviationStatement(GeneratedYangParser.DeviationStatementContext currentContext); 1617 void enterDeviationStatement(GeneratedYangParser.DeviationStatementContext currentContext);
1618 1618
...@@ -1620,7 +1620,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1620,7 +1620,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1620 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1620 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1621 * deviationStatement. 1621 * deviationStatement.
1622 * 1622 *
1623 - * @param currentContext current context in the parsed tree. 1623 + * @param currentContext current context in the parsed tree
1624 */ 1624 */
1625 void exitDeviationStatement(GeneratedYangParser.DeviationStatementContext currentContext); 1625 void exitDeviationStatement(GeneratedYangParser.DeviationStatementContext currentContext);
1626 1626
...@@ -1628,7 +1628,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1628,7 +1628,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1628 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1628 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1629 * deviateNotSupportedStatement. 1629 * deviateNotSupportedStatement.
1630 * 1630 *
1631 - * @param currentContext current context in the parsed tree. 1631 + * @param currentContext current context in the parsed tree
1632 */ 1632 */
1633 void enterDeviateNotSupportedStatement(GeneratedYangParser.DeviateNotSupportedStatementContext currentContext); 1633 void enterDeviateNotSupportedStatement(GeneratedYangParser.DeviateNotSupportedStatementContext currentContext);
1634 1634
...@@ -1636,7 +1636,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1636,7 +1636,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1636 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1636 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1637 * deviateNotSupportedStatement. 1637 * deviateNotSupportedStatement.
1638 * 1638 *
1639 - * @param currentContext current context in the parsed tree. 1639 + * @param currentContext current context in the parsed tree
1640 */ 1640 */
1641 void exitDeviateNotSupportedStatement(GeneratedYangParser.DeviateNotSupportedStatementContext currentContext); 1641 void exitDeviateNotSupportedStatement(GeneratedYangParser.DeviateNotSupportedStatementContext currentContext);
1642 1642
...@@ -1644,7 +1644,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1644,7 +1644,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1644 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1644 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1645 * deviateAddStatement. 1645 * deviateAddStatement.
1646 * 1646 *
1647 - * @param currentContext current context in the parsed tree. 1647 + * @param currentContext current context in the parsed tree
1648 */ 1648 */
1649 void enterDeviateAddStatement(GeneratedYangParser.DeviateAddStatementContext currentContext); 1649 void enterDeviateAddStatement(GeneratedYangParser.DeviateAddStatementContext currentContext);
1650 1650
...@@ -1652,7 +1652,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1652,7 +1652,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1652 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1652 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1653 * deviateAddStatement. 1653 * deviateAddStatement.
1654 * 1654 *
1655 - * @param currentContext current context in the parsed tree. 1655 + * @param currentContext current context in the parsed tree
1656 */ 1656 */
1657 void exitDeviateAddStatement(GeneratedYangParser.DeviateAddStatementContext currentContext); 1657 void exitDeviateAddStatement(GeneratedYangParser.DeviateAddStatementContext currentContext);
1658 1658
...@@ -1660,7 +1660,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1660,7 +1660,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1660 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1660 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1661 * deviateDeleteStatement. 1661 * deviateDeleteStatement.
1662 * 1662 *
1663 - * @param currentContext current context in the parsed tree. 1663 + * @param currentContext current context in the parsed tree
1664 */ 1664 */
1665 void enterDeviateDeleteStatement(GeneratedYangParser.DeviateDeleteStatementContext currentContext); 1665 void enterDeviateDeleteStatement(GeneratedYangParser.DeviateDeleteStatementContext currentContext);
1666 1666
...@@ -1668,7 +1668,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1668,7 +1668,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1668 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1668 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1669 * deviateDeleteStatement. 1669 * deviateDeleteStatement.
1670 * 1670 *
1671 - * @param currentContext current context in the parsed tree. 1671 + * @param currentContext current context in the parsed tree
1672 */ 1672 */
1673 void exitDeviateDeleteStatement(GeneratedYangParser.DeviateDeleteStatementContext currentContext); 1673 void exitDeviateDeleteStatement(GeneratedYangParser.DeviateDeleteStatementContext currentContext);
1674 1674
...@@ -1676,7 +1676,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1676,7 +1676,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1676 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1676 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1677 * deviateReplaceStatement. 1677 * deviateReplaceStatement.
1678 * 1678 *
1679 - * @param currentContext current context in the parsed tree. 1679 + * @param currentContext current context in the parsed tree
1680 */ 1680 */
1681 void enterDeviateReplaceStatement(GeneratedYangParser.DeviateReplaceStatementContext currentContext); 1681 void enterDeviateReplaceStatement(GeneratedYangParser.DeviateReplaceStatementContext currentContext);
1682 1682
...@@ -1684,7 +1684,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1684,7 +1684,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1684 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1684 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1685 * deviateReplaceStatement. 1685 * deviateReplaceStatement.
1686 * 1686 *
1687 - * @param currentContext current context in the parsed tree. 1687 + * @param currentContext current context in the parsed tree
1688 */ 1688 */
1689 void exitDeviateReplaceStatement(GeneratedYangParser.DeviateReplaceStatementContext currentContext); 1689 void exitDeviateReplaceStatement(GeneratedYangParser.DeviateReplaceStatementContext currentContext);
1690 1690
...@@ -1692,7 +1692,7 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1692,7 +1692,7 @@ public interface GeneratedYangListener extends ParseTreeListener {
1692 * Enter a parse tree produced by GeneratedYangParser for grammar rule 1692 * Enter a parse tree produced by GeneratedYangParser for grammar rule
1693 * string. 1693 * string.
1694 * 1694 *
1695 - * @param currentContext current context in the parsed tree. 1695 + * @param currentContext current context in the parsed tree
1696 */ 1696 */
1697 void enterString(GeneratedYangParser.StringContext currentContext); 1697 void enterString(GeneratedYangParser.StringContext currentContext);
1698 1698
...@@ -1700,7 +1700,40 @@ public interface GeneratedYangListener extends ParseTreeListener { ...@@ -1700,7 +1700,40 @@ public interface GeneratedYangListener extends ParseTreeListener {
1700 * Exit a parse tree produced by GeneratedYangParser for grammar rule 1700 * Exit a parse tree produced by GeneratedYangParser for grammar rule
1701 * string. 1701 * string.
1702 * 1702 *
1703 - * @param currentContext current context in the parsed tree. 1703 + * @param currentContext current context in the parsed tree
1704 */ 1704 */
1705 void exitString(GeneratedYangParser.StringContext currentContext); 1705 void exitString(GeneratedYangParser.StringContext currentContext);
1706 +
1707 + /**
1708 + * Enter a parse tree produced by GeneratedYangParser for grammar rule
1709 + * identifier.
1710 + *
1711 + * @param currentContext current context in the parsed tree
1712 + */
1713 + void enterIdentifier(GeneratedYangParser.IdentifierContext currentContext);
1714 +
1715 + /**
1716 + * Exit a parse tree produced by GeneratedYangParser for grammar rule
1717 + * identifier.
1718 + *
1719 + * @param currentContext current context in the parsed tree
1720 + */
1721 + void exitIdentifier(GeneratedYangParser.IdentifierContext currentContext);
1722 +
1723 +
1724 + /**
1725 + * Enter a parse tree produced by GeneratedYangParser for grammar rule
1726 + * dateArgumentString.
1727 + *
1728 + * @param currentContext current context in the parsed tree
1729 + */
1730 + void enterDateArgumentString(GeneratedYangParser.DateArgumentStringContext currentContext);
1731 +
1732 + /**
1733 + * Exit a parse tree produced by GeneratedYangParser for grammar rule
1734 + * dateArgumentString.
1735 + *
1736 + * @param currentContext current context in the parsed tree
1737 + */
1738 + void exitDateArgumentString(GeneratedYangParser.DateArgumentStringContext currentContext);
1706 } 1739 }
......
...@@ -1163,6 +1163,26 @@ public class TreeWalkListener implements GeneratedYangListener { ...@@ -1163,6 +1163,26 @@ public class TreeWalkListener implements GeneratedYangListener {
1163 } 1163 }
1164 1164
1165 @Override 1165 @Override
1166 + public void enterIdentifier(GeneratedYangParser.IdentifierContext ctx) {
1167 + // TODO: implement the method.
1168 + }
1169 +
1170 + @Override
1171 + public void exitIdentifier(GeneratedYangParser.IdentifierContext ctx) {
1172 + // TODO: implement the method.
1173 + }
1174 +
1175 + @Override
1176 + public void enterDateArgumentString(GeneratedYangParser.DateArgumentStringContext ctx) {
1177 + // TODO: implement the method.
1178 + }
1179 +
1180 + @Override
1181 + public void exitDateArgumentString(GeneratedYangParser.DateArgumentStringContext ctx) {
1182 + // TODO: implement the method.
1183 + }
1184 +
1185 + @Override
1166 public void visitTerminal(TerminalNode terminalNode) { 1186 public void visitTerminal(TerminalNode terminalNode) {
1167 // TODO: implement the method. 1187 // TODO: implement the method.
1168 } 1188 }
......
...@@ -22,6 +22,8 @@ import org.onosproject.yangutils.parser.Parsable; ...@@ -22,6 +22,8 @@ import org.onosproject.yangutils.parser.Parsable;
22 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; 22 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
23 import org.onosproject.yangutils.parser.exceptions.ParserException; 23 import org.onosproject.yangutils.parser.exceptions.ParserException;
24 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 24 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
25 +
26 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
25 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
26 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
...@@ -50,7 +52,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.BELONGS_TO_DATA; ...@@ -50,7 +52,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.BELONGS_TO_DATA;
50 * submodule_header_statement : yang_version_stmt? belongs_to_stmt 52 * submodule_header_statement : yang_version_stmt? belongs_to_stmt
51 * | belongs_to_stmt yang_version_stmt? 53 * | belongs_to_stmt yang_version_stmt?
52 * ; 54 * ;
53 - * belongs_to_stmt : BELONGS_TO_KEYWORD IDENTIFIER LEFT_CURLY_BRACE belongs_to_stmt_body RIGHT_CURLY_BRACE; 55 + * belongs_to_stmt : BELONGS_TO_KEYWORD identifier LEFT_CURLY_BRACE belongs_to_stmt_body RIGHT_CURLY_BRACE;
54 * belongs_to_stmt_body : prefix_stmt; 56 * belongs_to_stmt_body : prefix_stmt;
55 */ 57 */
56 58
...@@ -78,11 +80,13 @@ public final class BelongsToListener { ...@@ -78,11 +80,13 @@ public final class BelongsToListener {
78 GeneratedYangParser.BelongstoStatementContext ctx) { 80 GeneratedYangParser.BelongstoStatementContext ctx) {
79 81
80 // Check for stack to be non empty. 82 // Check for stack to be non empty.
81 - checkStackIsNotEmpty(listener, MISSING_HOLDER, BELONGS_TO_DATA, ctx.IDENTIFIER().getText(), 83 + checkStackIsNotEmpty(listener, MISSING_HOLDER, BELONGS_TO_DATA, ctx.identifier().getText(),
82 ENTRY); 84 ENTRY);
83 85
86 + String identifier = getValidIdentifier(ctx.identifier().getText(), BELONGS_TO_DATA, ctx);
87 +
84 YangBelongsTo belongstoNode = new YangBelongsTo(); 88 YangBelongsTo belongstoNode = new YangBelongsTo();
85 - belongstoNode.setBelongsToModuleName(ctx.IDENTIFIER().getText()); 89 + belongstoNode.setBelongsToModuleName(identifier);
86 90
87 // Push belongsto into the stack. 91 // Push belongsto into the stack.
88 listener.getParsedDataStack().push(belongstoNode); 92 listener.getParsedDataStack().push(belongstoNode);
...@@ -99,7 +103,7 @@ public final class BelongsToListener { ...@@ -99,7 +103,7 @@ public final class BelongsToListener {
99 GeneratedYangParser.BelongstoStatementContext ctx) { 103 GeneratedYangParser.BelongstoStatementContext ctx) {
100 104
101 // Check for stack to be non empty. 105 // Check for stack to be non empty.
102 - checkStackIsNotEmpty(listener, MISSING_HOLDER, BELONGS_TO_DATA, ctx.IDENTIFIER().getText(), 106 + checkStackIsNotEmpty(listener, MISSING_HOLDER, BELONGS_TO_DATA, ctx.identifier().getText(),
103 EXIT); 107 EXIT);
104 108
105 Parsable tmpBelongstoNode = listener.getParsedDataStack().peek(); 109 Parsable tmpBelongstoNode = listener.getParsedDataStack().peek();
...@@ -108,7 +112,7 @@ public final class BelongsToListener { ...@@ -108,7 +112,7 @@ public final class BelongsToListener {
108 112
109 // Check for stack to be empty. 113 // Check for stack to be empty.
110 checkStackIsNotEmpty(listener, MISSING_HOLDER, BELONGS_TO_DATA, 114 checkStackIsNotEmpty(listener, MISSING_HOLDER, BELONGS_TO_DATA,
111 - ctx.IDENTIFIER().getText(), EXIT); 115 + ctx.identifier().getText(), EXIT);
112 116
113 Parsable tmpNode = listener.getParsedDataStack().peek(); 117 Parsable tmpNode = listener.getParsedDataStack().peek();
114 switch (tmpNode.getYangConstructType()) { 118 switch (tmpNode.getYangConstructType()) {
...@@ -119,12 +123,12 @@ public final class BelongsToListener { ...@@ -119,12 +123,12 @@ public final class BelongsToListener {
119 } 123 }
120 default: 124 default:
121 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, BELONGS_TO_DATA, 125 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, BELONGS_TO_DATA,
122 - ctx.IDENTIFIER().getText(), 126 + ctx.identifier().getText(),
123 EXIT)); 127 EXIT));
124 } 128 }
125 } else { 129 } else {
126 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, BELONGS_TO_DATA, 130 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, BELONGS_TO_DATA,
127 - ctx.IDENTIFIER().getText(), EXIT)); 131 + ctx.identifier().getText(), EXIT));
128 } 132 }
129 } 133 }
130 } 134 }
......
...@@ -32,7 +32,7 @@ package org.onosproject.yangutils.parser.impl.listeners; ...@@ -32,7 +32,7 @@ package org.onosproject.yangutils.parser.impl.listeners;
32 * "}") 32 * "}")
33 * 33 *
34 * ANTLR grammar rule 34 * ANTLR grammar rule
35 - * bitStatement : BIT_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE bitBodyStatement RIGHT_CURLY_BRACE); 35 + * bitStatement : BIT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE bitBodyStatement RIGHT_CURLY_BRACE);
36 * 36 *
37 * bitBodyStatement : positionStatement? statusStatement? descriptionStatement? referenceStatement? 37 * bitBodyStatement : positionStatement? statusStatement? descriptionStatement? referenceStatement?
38 * | positionStatement? statusStatement? referenceStatement? descriptionStatement? 38 * | positionStatement? statusStatement? referenceStatement? descriptionStatement?
...@@ -65,10 +65,12 @@ import org.onosproject.yangutils.datamodel.YangBit; ...@@ -65,10 +65,12 @@ import org.onosproject.yangutils.datamodel.YangBit;
65 import org.onosproject.yangutils.datamodel.YangBits; 65 import org.onosproject.yangutils.datamodel.YangBits;
66 import org.onosproject.yangutils.datamodel.exceptions.DataModelException; 66 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
67 import org.onosproject.yangutils.parser.Parsable; 67 import org.onosproject.yangutils.parser.Parsable;
68 -import static org.onosproject.yangutils.utils.YangConstructType.BIT_DATA;
69 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; 68 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
70 import org.onosproject.yangutils.parser.exceptions.ParserException; 69 import org.onosproject.yangutils.parser.exceptions.ParserException;
71 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 70 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
71 +
72 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
73 +import static org.onosproject.yangutils.utils.YangConstructType.BIT_DATA;
72 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 74 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
73 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 75 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
74 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage; 76 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
...@@ -102,10 +104,12 @@ public final class BitListener { ...@@ -102,10 +104,12 @@ public final class BitListener {
102 GeneratedYangParser.BitStatementContext ctx) { 104 GeneratedYangParser.BitStatementContext ctx) {
103 105
104 // Check for stack to be non empty. 106 // Check for stack to be non empty.
105 - checkStackIsNotEmpty(listener, MISSING_HOLDER, BIT_DATA, ctx.IDENTIFIER().getText(), ENTRY); 107 + checkStackIsNotEmpty(listener, MISSING_HOLDER, BIT_DATA, ctx.identifier().getText(), ENTRY);
108 +
109 + String identifier = getValidIdentifier(ctx.identifier().getText(), BIT_DATA, ctx);
106 110
107 YangBit bitNode = new YangBit(); 111 YangBit bitNode = new YangBit();
108 - bitNode.setBitName(ctx.IDENTIFIER().getText()); 112 + bitNode.setBitName(identifier);
109 listener.getParsedDataStack().push(bitNode); 113 listener.getParsedDataStack().push(bitNode);
110 } 114 }
111 115
...@@ -120,14 +124,14 @@ public final class BitListener { ...@@ -120,14 +124,14 @@ public final class BitListener {
120 GeneratedYangParser.BitStatementContext ctx) { 124 GeneratedYangParser.BitStatementContext ctx) {
121 125
122 // Check for stack to be non empty. 126 // Check for stack to be non empty.
123 - checkStackIsNotEmpty(listener, MISSING_HOLDER, BIT_DATA, ctx.IDENTIFIER().getText(), EXIT); 127 + checkStackIsNotEmpty(listener, MISSING_HOLDER, BIT_DATA, ctx.identifier().getText(), EXIT);
124 128
125 Parsable tmpBitNode = listener.getParsedDataStack().peek(); 129 Parsable tmpBitNode = listener.getParsedDataStack().peek();
126 if (tmpBitNode instanceof YangBit) { 130 if (tmpBitNode instanceof YangBit) {
127 listener.getParsedDataStack().pop(); 131 listener.getParsedDataStack().pop();
128 132
129 // Check for stack to be non empty. 133 // Check for stack to be non empty.
130 - checkStackIsNotEmpty(listener, MISSING_HOLDER, BIT_DATA, ctx.IDENTIFIER().getText(), EXIT); 134 + checkStackIsNotEmpty(listener, MISSING_HOLDER, BIT_DATA, ctx.identifier().getText(), EXIT);
131 135
132 Parsable tmpNode = listener.getParsedDataStack().peek(); 136 Parsable tmpNode = listener.getParsedDataStack().peek();
133 switch (tmpNode.getYangConstructType()) { 137 switch (tmpNode.getYangConstructType()) {
...@@ -152,20 +156,20 @@ public final class BitListener { ...@@ -152,20 +156,20 @@ public final class BitListener {
152 yangBits.addBitInfo((YangBit) tmpBitNode); 156 yangBits.addBitInfo((YangBit) tmpBitNode);
153 } catch (DataModelException e) { 157 } catch (DataModelException e) {
154 ParserException parserException = new ParserException(constructExtendedListenerErrorMessage( 158 ParserException parserException = new ParserException(constructExtendedListenerErrorMessage(
155 - INVALID_CONTENT, BIT_DATA, ctx.IDENTIFIER().getText(), EXIT, e.getMessage())); 159 + INVALID_CONTENT, BIT_DATA, ctx.identifier().getText(), EXIT, e.getMessage()));
156 - parserException.setLine(ctx.IDENTIFIER().getSymbol().getLine()); 160 + parserException.setLine(ctx.getStart().getLine());
157 - parserException.setCharPosition(ctx.IDENTIFIER().getSymbol().getCharPositionInLine()); 161 + parserException.setCharPosition(ctx.getStart().getCharPositionInLine());
158 throw parserException; 162 throw parserException;
159 } 163 }
160 break; 164 break;
161 } 165 }
162 default: 166 default:
163 throw new ParserException( 167 throw new ParserException(
164 - constructListenerErrorMessage(INVALID_HOLDER, BIT_DATA, ctx.IDENTIFIER().getText(), EXIT)); 168 + constructListenerErrorMessage(INVALID_HOLDER, BIT_DATA, ctx.identifier().getText(), EXIT));
165 } 169 }
166 } else { 170 } else {
167 throw new ParserException( 171 throw new ParserException(
168 - constructListenerErrorMessage(MISSING_CURRENT_HOLDER, BIT_DATA, ctx.IDENTIFIER().getText(), EXIT)); 172 + constructListenerErrorMessage(MISSING_CURRENT_HOLDER, BIT_DATA, ctx.identifier().getText(), EXIT));
169 } 173 }
170 } 174 }
171 } 175 }
......
...@@ -25,6 +25,9 @@ import org.onosproject.yangutils.parser.Parsable; ...@@ -25,6 +25,9 @@ import org.onosproject.yangutils.parser.Parsable;
25 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; 25 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
26 import org.onosproject.yangutils.parser.exceptions.ParserException; 26 import org.onosproject.yangutils.parser.exceptions.ParserException;
27 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 27 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
28 +import org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation;
29 +
30 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil; 31 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil;
29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 32 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
30 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 33 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
...@@ -34,7 +37,6 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorTyp ...@@ -34,7 +37,6 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorTyp
34 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; 37 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
35 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; 38 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
36 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA; 39 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA;
37 -import org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation;
38 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; 40 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
39 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinality; 41 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinality;
40 import static org.onosproject.yangutils.utils.YangConstructType.CONFIG_DATA; 42 import static org.onosproject.yangutils.utils.YangConstructType.CONFIG_DATA;
...@@ -66,7 +68,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; ...@@ -66,7 +68,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA;
66 * "}") 68 * "}")
67 * 69 *
68 * ANTLR grammar rule 70 * ANTLR grammar rule
69 - * containerStatement : CONTAINER_KEYWORD IDENTIFIER 71 + * containerStatement : CONTAINER_KEYWORD identifier
70 * (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | 72 * (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement |
71 * presenceStatement | configStatement | statusStatement | descriptionStatement | 73 * presenceStatement | configStatement | statusStatement | descriptionStatement |
72 * referenceStatement | typedefStatement | groupingStatement 74 * referenceStatement | typedefStatement | groupingStatement
...@@ -96,19 +98,20 @@ public final class ContainerListener { ...@@ -96,19 +98,20 @@ public final class ContainerListener {
96 GeneratedYangParser.ContainerStatementContext ctx) { 98 GeneratedYangParser.ContainerStatementContext ctx) {
97 99
98 // Check for stack to be non empty. 100 // Check for stack to be non empty.
99 - checkStackIsNotEmpty(listener, MISSING_HOLDER, CONTAINER_DATA, ctx.IDENTIFIER().getText(), ENTRY); 101 + checkStackIsNotEmpty(listener, MISSING_HOLDER, CONTAINER_DATA, ctx.identifier().getText(), ENTRY);
102 +
103 + String identifier = getValidIdentifier(ctx.identifier().getText(), CONTAINER_DATA, ctx);
100 104
101 // Validate sub statement cardinality. 105 // Validate sub statement cardinality.
102 validateSubStatementsCardinality(ctx); 106 validateSubStatementsCardinality(ctx);
103 107
104 // Check for identifier collision 108 // Check for identifier collision
105 - int line = ctx.IDENTIFIER().getSymbol().getLine(); 109 + int line = ctx.getStart().getLine();
106 - int charPositionInLine = ctx.IDENTIFIER().getSymbol().getCharPositionInLine(); 110 + int charPositionInLine = ctx.getStart().getCharPositionInLine();
107 - String identifierName = ctx.IDENTIFIER().getText(); 111 + detectCollidingChildUtil(listener, line, charPositionInLine, identifier, CONTAINER_DATA);
108 - detectCollidingChildUtil(listener, line, charPositionInLine, identifierName, CONTAINER_DATA);
109 112
110 YangContainer container = new YangContainer(); 113 YangContainer container = new YangContainer();
111 - container.setName(ctx.IDENTIFIER().getText()); 114 + container.setName(identifier);
112 115
113 /* 116 /*
114 * If "config" is not specified, the default is the same as the parent 117 * If "config" is not specified, the default is the same as the parent
...@@ -127,12 +130,12 @@ public final class ContainerListener { ...@@ -127,12 +130,12 @@ public final class ContainerListener {
127 curNode.addChild(container); 130 curNode.addChild(container);
128 } catch (DataModelException e) { 131 } catch (DataModelException e) {
129 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA, 132 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA,
130 - CONTAINER_DATA, ctx.IDENTIFIER().getText(), ENTRY, e.getMessage())); 133 + CONTAINER_DATA, ctx.identifier().getText(), ENTRY, e.getMessage()));
131 } 134 }
132 listener.getParsedDataStack().push(container); 135 listener.getParsedDataStack().push(container);
133 } else { 136 } else {
134 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, CONTAINER_DATA, 137 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, CONTAINER_DATA,
135 - ctx.IDENTIFIER().getText(), ENTRY)); 138 + ctx.identifier().getText(), ENTRY));
136 } 139 }
137 } 140 }
138 141
...@@ -147,7 +150,7 @@ public final class ContainerListener { ...@@ -147,7 +150,7 @@ public final class ContainerListener {
147 GeneratedYangParser.ContainerStatementContext ctx) { 150 GeneratedYangParser.ContainerStatementContext ctx) {
148 151
149 // Check for stack to be non empty. 152 // Check for stack to be non empty.
150 - checkStackIsNotEmpty(listener, MISSING_HOLDER, CONTAINER_DATA, ctx.IDENTIFIER().getText(), EXIT); 153 + checkStackIsNotEmpty(listener, MISSING_HOLDER, CONTAINER_DATA, ctx.identifier().getText(), EXIT);
151 154
152 if (listener.getParsedDataStack().peek() instanceof YangContainer) { 155 if (listener.getParsedDataStack().peek() instanceof YangContainer) {
153 YangContainer yangContainer = (YangContainer) listener.getParsedDataStack().peek(); 156 YangContainer yangContainer = (YangContainer) listener.getParsedDataStack().peek();
...@@ -155,12 +158,12 @@ public final class ContainerListener { ...@@ -155,12 +158,12 @@ public final class ContainerListener {
155 yangContainer.validateDataOnExit(); 158 yangContainer.validateDataOnExit();
156 } catch (DataModelException e) { 159 } catch (DataModelException e) {
157 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA, 160 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA,
158 - CONTAINER_DATA, ctx.IDENTIFIER().getText(), EXIT, e.getMessage())); 161 + CONTAINER_DATA, ctx.identifier().getText(), EXIT, e.getMessage()));
159 } 162 }
160 listener.getParsedDataStack().pop(); 163 listener.getParsedDataStack().pop();
161 } else { 164 } else {
162 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, CONTAINER_DATA, 165 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, CONTAINER_DATA,
163 - ctx.IDENTIFIER().getText(), EXIT)); 166 + ctx.identifier().getText(), EXIT));
164 } 167 }
165 } 168 }
166 169
...@@ -171,11 +174,11 @@ public final class ContainerListener { ...@@ -171,11 +174,11 @@ public final class ContainerListener {
171 */ 174 */
172 private static void validateSubStatementsCardinality(GeneratedYangParser.ContainerStatementContext ctx) { 175 private static void validateSubStatementsCardinality(GeneratedYangParser.ContainerStatementContext ctx) {
173 176
174 - validateCardinality(ctx.presenceStatement(), PRESENCE_DATA, CONTAINER_DATA, ctx.IDENTIFIER().getText()); 177 + validateCardinality(ctx.presenceStatement(), PRESENCE_DATA, CONTAINER_DATA, ctx.identifier().getText());
175 - validateCardinality(ctx.configStatement(), CONFIG_DATA, CONTAINER_DATA, ctx.IDENTIFIER().getText()); 178 + validateCardinality(ctx.configStatement(), CONFIG_DATA, CONTAINER_DATA, ctx.identifier().getText());
176 - validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, CONTAINER_DATA, ctx.IDENTIFIER().getText()); 179 + validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, CONTAINER_DATA, ctx.identifier().getText());
177 - validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, CONTAINER_DATA, ctx.IDENTIFIER().getText()); 180 + validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, CONTAINER_DATA, ctx.identifier().getText());
178 - validateCardinality(ctx.statusStatement(), STATUS_DATA, CONTAINER_DATA, ctx.IDENTIFIER().getText()); 181 + validateCardinality(ctx.statusStatement(), STATUS_DATA, CONTAINER_DATA, ctx.identifier().getText());
179 // TODO when, grouping, typedef. 182 // TODO when, grouping, typedef.
180 } 183 }
181 } 184 }
......
...@@ -23,6 +23,8 @@ import org.onosproject.yangutils.parser.Parsable; ...@@ -23,6 +23,8 @@ import org.onosproject.yangutils.parser.Parsable;
23 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; 23 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
24 import org.onosproject.yangutils.parser.exceptions.ParserException; 24 import org.onosproject.yangutils.parser.exceptions.ParserException;
25 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 25 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
26 +
27 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
26 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 30 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
...@@ -49,7 +51,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.IMPORT_DATA; ...@@ -49,7 +51,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.IMPORT_DATA;
49 * ANTLR grammar rule 51 * ANTLR grammar rule
50 * linkage_stmts : (import_stmt 52 * linkage_stmts : (import_stmt
51 * | include_stmt)*; 53 * | include_stmt)*;
52 - * import_stmt : IMPORT_KEYWORD IDENTIFIER LEFT_CURLY_BRACE import_stmt_body 54 + * import_stmt : IMPORT_KEYWORD identifier LEFT_CURLY_BRACE import_stmt_body
53 * RIGHT_CURLY_BRACE; 55 * RIGHT_CURLY_BRACE;
54 * import_stmt_body : prefix_stmt revision_date_stmt?; 56 * import_stmt_body : prefix_stmt revision_date_stmt?;
55 */ 57 */
...@@ -76,10 +78,12 @@ public final class ImportListener { ...@@ -76,10 +78,12 @@ public final class ImportListener {
76 public static void processImportEntry(TreeWalkListener listener, GeneratedYangParser.ImportStatementContext ctx) { 78 public static void processImportEntry(TreeWalkListener listener, GeneratedYangParser.ImportStatementContext ctx) {
77 79
78 // Check for stack to be non empty. 80 // Check for stack to be non empty.
79 - checkStackIsNotEmpty(listener, MISSING_HOLDER, IMPORT_DATA, ctx.IDENTIFIER().getText(), ENTRY); 81 + checkStackIsNotEmpty(listener, MISSING_HOLDER, IMPORT_DATA, ctx.identifier().getText(), ENTRY);
82 +
83 + String identifier = getValidIdentifier(ctx.identifier().getText(), IMPORT_DATA, ctx);
80 84
81 YangImport importNode = new YangImport(); 85 YangImport importNode = new YangImport();
82 - importNode.setModuleName(ctx.IDENTIFIER().getText()); 86 + importNode.setModuleName(identifier);
83 87
84 // Push import node to the stack. 88 // Push import node to the stack.
85 listener.getParsedDataStack().push(importNode); 89 listener.getParsedDataStack().push(importNode);
...@@ -95,14 +99,14 @@ public final class ImportListener { ...@@ -95,14 +99,14 @@ public final class ImportListener {
95 public static void processImportExit(TreeWalkListener listener, GeneratedYangParser.ImportStatementContext ctx) { 99 public static void processImportExit(TreeWalkListener listener, GeneratedYangParser.ImportStatementContext ctx) {
96 100
97 // Check for stack to be non empty. 101 // Check for stack to be non empty.
98 - checkStackIsNotEmpty(listener, MISSING_HOLDER, IMPORT_DATA, ctx.IDENTIFIER().getText(), EXIT); 102 + checkStackIsNotEmpty(listener, MISSING_HOLDER, IMPORT_DATA, ctx.identifier().getText(), EXIT);
99 103
100 Parsable tmpImportNode = listener.getParsedDataStack().peek(); 104 Parsable tmpImportNode = listener.getParsedDataStack().peek();
101 if (tmpImportNode instanceof YangImport) { 105 if (tmpImportNode instanceof YangImport) {
102 listener.getParsedDataStack().pop(); 106 listener.getParsedDataStack().pop();
103 107
104 // Check for stack to be non empty. 108 // Check for stack to be non empty.
105 - checkStackIsNotEmpty(listener, MISSING_HOLDER, IMPORT_DATA, ctx.IDENTIFIER().getText(), 109 + checkStackIsNotEmpty(listener, MISSING_HOLDER, IMPORT_DATA, ctx.identifier().getText(),
106 EXIT); 110 EXIT);
107 111
108 Parsable tmpNode = listener.getParsedDataStack().peek(); 112 Parsable tmpNode = listener.getParsedDataStack().peek();
...@@ -119,12 +123,12 @@ public final class ImportListener { ...@@ -119,12 +123,12 @@ public final class ImportListener {
119 } 123 }
120 default: 124 default:
121 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IMPORT_DATA, 125 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IMPORT_DATA,
122 - ctx.IDENTIFIER().getText(), 126 + ctx.identifier().getText(),
123 EXIT)); 127 EXIT));
124 } 128 }
125 } else { 129 } else {
126 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, IMPORT_DATA, 130 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, IMPORT_DATA,
127 - ctx.IDENTIFIER().getText(), EXIT)); 131 + ctx.identifier().getText(), EXIT));
128 } 132 }
129 } 133 }
130 } 134 }
......
...@@ -23,6 +23,8 @@ import org.onosproject.yangutils.parser.Parsable; ...@@ -23,6 +23,8 @@ import org.onosproject.yangutils.parser.Parsable;
23 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; 23 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
24 import org.onosproject.yangutils.parser.exceptions.ParserException; 24 import org.onosproject.yangutils.parser.exceptions.ParserException;
25 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 25 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
26 +
27 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
26 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 30 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
...@@ -49,7 +51,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.INCLUDE_DATA; ...@@ -49,7 +51,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.INCLUDE_DATA;
49 * ANTLR grammar rule 51 * ANTLR grammar rule
50 * linkage_stmts : (import_stmt 52 * linkage_stmts : (import_stmt
51 * | include_stmt)*; 53 * | include_stmt)*;
52 - * include_stmt : INCLUDE_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE 54 + * include_stmt : INCLUDE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
53 * revision_date_stmt? RIGHT_CURLY_BRACE); 55 * revision_date_stmt? RIGHT_CURLY_BRACE);
54 */ 56 */
55 57
...@@ -75,11 +77,13 @@ public final class IncludeListener { ...@@ -75,11 +77,13 @@ public final class IncludeListener {
75 public static void processIncludeEntry(TreeWalkListener listener, GeneratedYangParser.IncludeStatementContext ctx) { 77 public static void processIncludeEntry(TreeWalkListener listener, GeneratedYangParser.IncludeStatementContext ctx) {
76 78
77 // Check for stack to be non empty. 79 // Check for stack to be non empty.
78 - checkStackIsNotEmpty(listener, MISSING_HOLDER, INCLUDE_DATA, ctx.IDENTIFIER().getText(), 80 + checkStackIsNotEmpty(listener, MISSING_HOLDER, INCLUDE_DATA, ctx.identifier().getText(),
79 ENTRY); 81 ENTRY);
80 82
83 + String identifier = getValidIdentifier(ctx.identifier().getText(), INCLUDE_DATA, ctx);
84 +
81 YangInclude includeNode = new YangInclude(); 85 YangInclude includeNode = new YangInclude();
82 - includeNode.setSubModuleName(ctx.IDENTIFIER().getText()); 86 + includeNode.setSubModuleName(identifier);
83 87
84 listener.getParsedDataStack().push(includeNode); 88 listener.getParsedDataStack().push(includeNode);
85 } 89 }
...@@ -94,14 +98,14 @@ public final class IncludeListener { ...@@ -94,14 +98,14 @@ public final class IncludeListener {
94 public static void processIncludeExit(TreeWalkListener listener, GeneratedYangParser.IncludeStatementContext ctx) { 98 public static void processIncludeExit(TreeWalkListener listener, GeneratedYangParser.IncludeStatementContext ctx) {
95 99
96 // Check for stack to be non empty. 100 // Check for stack to be non empty.
97 - checkStackIsNotEmpty(listener, MISSING_HOLDER, INCLUDE_DATA, ctx.IDENTIFIER().getText(), EXIT); 101 + checkStackIsNotEmpty(listener, MISSING_HOLDER, INCLUDE_DATA, ctx.identifier().getText(), EXIT);
98 102
99 Parsable tmpIncludeNode = listener.getParsedDataStack().peek(); 103 Parsable tmpIncludeNode = listener.getParsedDataStack().peek();
100 if (tmpIncludeNode instanceof YangInclude) { 104 if (tmpIncludeNode instanceof YangInclude) {
101 listener.getParsedDataStack().pop(); 105 listener.getParsedDataStack().pop();
102 106
103 // Check for stack to be non empty. 107 // Check for stack to be non empty.
104 - checkStackIsNotEmpty(listener, MISSING_HOLDER, INCLUDE_DATA, ctx.IDENTIFIER().getText(), 108 + checkStackIsNotEmpty(listener, MISSING_HOLDER, INCLUDE_DATA, ctx.identifier().getText(),
105 EXIT); 109 EXIT);
106 110
107 Parsable tmpNode = listener.getParsedDataStack().peek(); 111 Parsable tmpNode = listener.getParsedDataStack().peek();
...@@ -118,12 +122,12 @@ public final class IncludeListener { ...@@ -118,12 +122,12 @@ public final class IncludeListener {
118 } 122 }
119 default: 123 default:
120 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, INCLUDE_DATA, 124 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, INCLUDE_DATA,
121 - ctx.IDENTIFIER().getText(), 125 + ctx.identifier().getText(),
122 EXIT)); 126 EXIT));
123 } 127 }
124 } else { 128 } else {
125 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, INCLUDE_DATA, 129 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, INCLUDE_DATA,
126 - ctx.IDENTIFIER().getText(), EXIT)); 130 + ctx.identifier().getText(), EXIT));
127 } 131 }
128 } 132 }
129 } 133 }
......
...@@ -22,6 +22,8 @@ import org.onosproject.yangutils.parser.Parsable; ...@@ -22,6 +22,8 @@ import org.onosproject.yangutils.parser.Parsable;
22 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; 22 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
23 import org.onosproject.yangutils.parser.exceptions.ParserException; 23 import org.onosproject.yangutils.parser.exceptions.ParserException;
24 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 24 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
25 +
26 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
25 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil; 27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil;
26 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
...@@ -64,7 +66,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; ...@@ -64,7 +66,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA;
64 * "}" 66 * "}"
65 * 67 *
66 * ANTLR grammar rule 68 * ANTLR grammar rule
67 - * leafListStatement : LEAF_LIST_KEYWORD IDENTIFIER LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | 69 + * leafListStatement : LEAF_LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement |
68 * typeStatement | unitsStatement | mustStatement | configStatement | minElementsStatement | maxElementsStatement | 70 * typeStatement | unitsStatement | mustStatement | configStatement | minElementsStatement | maxElementsStatement |
69 * orderedByStatement | statusStatement | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE; 71 * orderedByStatement | statusStatement | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE;
70 */ 72 */
...@@ -92,19 +94,20 @@ public final class LeafListListener { ...@@ -92,19 +94,20 @@ public final class LeafListListener {
92 GeneratedYangParser.LeafListStatementContext ctx) { 94 GeneratedYangParser.LeafListStatementContext ctx) {
93 95
94 // Check for stack to be non empty. 96 // Check for stack to be non empty.
95 - checkStackIsNotEmpty(listener, MISSING_HOLDER, LEAF_LIST_DATA, ctx.IDENTIFIER().getText(), ENTRY); 97 + checkStackIsNotEmpty(listener, MISSING_HOLDER, LEAF_LIST_DATA, ctx.identifier().getText(), ENTRY);
98 +
99 + String identifier = getValidIdentifier(ctx.identifier().getText(), LEAF_LIST_DATA, ctx);
96 100
97 // Validate sub statement cardinality. 101 // Validate sub statement cardinality.
98 validateSubStatementsCardinality(ctx); 102 validateSubStatementsCardinality(ctx);
99 103
100 // Check for identifier collision 104 // Check for identifier collision
101 - int line = ctx.IDENTIFIER().getSymbol().getLine(); 105 + int line = ctx.getStart().getLine();
102 - int charPositionInLine = ctx.IDENTIFIER().getSymbol().getCharPositionInLine(); 106 + int charPositionInLine = ctx.getStart().getCharPositionInLine();
103 - String identifierName = ctx.IDENTIFIER().getText(); 107 + detectCollidingChildUtil(listener, line, charPositionInLine, identifier, LEAF_LIST_DATA);
104 - detectCollidingChildUtil(listener, line, charPositionInLine, identifierName, LEAF_LIST_DATA);
105 108
106 YangLeafList leafList = new YangLeafList(); 109 YangLeafList leafList = new YangLeafList();
107 - leafList.setLeafName(ctx.IDENTIFIER().getText()); 110 + leafList.setLeafName(identifier);
108 111
109 Parsable tmpData = listener.getParsedDataStack().peek(); 112 Parsable tmpData = listener.getParsedDataStack().peek();
110 YangLeavesHolder leaves; 113 YangLeavesHolder leaves;
...@@ -114,7 +117,7 @@ public final class LeafListListener { ...@@ -114,7 +117,7 @@ public final class LeafListListener {
114 leaves.addLeafList(leafList); 117 leaves.addLeafList(leafList);
115 } else { 118 } else {
116 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, LEAF_LIST_DATA, 119 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, LEAF_LIST_DATA,
117 - ctx.IDENTIFIER().getText(), ENTRY)); 120 + ctx.identifier().getText(), ENTRY));
118 } 121 }
119 listener.getParsedDataStack().push(leafList); 122 listener.getParsedDataStack().push(leafList);
120 } 123 }
...@@ -130,31 +133,31 @@ public final class LeafListListener { ...@@ -130,31 +133,31 @@ public final class LeafListListener {
130 GeneratedYangParser.LeafListStatementContext ctx) { 133 GeneratedYangParser.LeafListStatementContext ctx) {
131 134
132 // Check for stack to be non empty. 135 // Check for stack to be non empty.
133 - checkStackIsNotEmpty(listener, MISSING_HOLDER, LEAF_LIST_DATA, ctx.IDENTIFIER().getText(), EXIT); 136 + checkStackIsNotEmpty(listener, MISSING_HOLDER, LEAF_LIST_DATA, ctx.identifier().getText(), EXIT);
134 137
135 if (listener.getParsedDataStack().peek() instanceof YangLeafList) { 138 if (listener.getParsedDataStack().peek() instanceof YangLeafList) {
136 listener.getParsedDataStack().pop(); 139 listener.getParsedDataStack().pop();
137 } else { 140 } else {
138 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, LEAF_LIST_DATA, 141 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, LEAF_LIST_DATA,
139 - ctx.IDENTIFIER().getText(), EXIT)); 142 + ctx.identifier().getText(), EXIT));
140 } 143 }
141 } 144 }
142 145
143 /** 146 /**
144 * Validates the cardinality of leaf-list sub-statements as per grammar. 147 * Validates the cardinality of leaf-list sub-statements as per grammar.
145 * 148 *
146 - * @param ctx context object of the grammar rule. 149 + * @param ctx context object of the grammar rule
147 */ 150 */
148 private static void validateSubStatementsCardinality(GeneratedYangParser.LeafListStatementContext ctx) { 151 private static void validateSubStatementsCardinality(GeneratedYangParser.LeafListStatementContext ctx) {
149 152
150 - validateCardinalityEqualsOne(ctx.typeStatement(), TYPE_DATA, LEAF_LIST_DATA, ctx.IDENTIFIER().getText()); 153 + validateCardinalityEqualsOne(ctx.typeStatement(), TYPE_DATA, LEAF_LIST_DATA, ctx.identifier().getText());
151 - validateCardinality(ctx.unitsStatement(), UNITS_DATA, LEAF_LIST_DATA, ctx.IDENTIFIER().getText()); 154 + validateCardinality(ctx.unitsStatement(), UNITS_DATA, LEAF_LIST_DATA, ctx.identifier().getText());
152 - validateCardinality(ctx.configStatement(), CONFIG_DATA, LEAF_LIST_DATA, ctx.IDENTIFIER().getText()); 155 + validateCardinality(ctx.configStatement(), CONFIG_DATA, LEAF_LIST_DATA, ctx.identifier().getText());
153 - validateCardinality(ctx.maxElementsStatement(), MAX_ELEMENT_DATA, LEAF_LIST_DATA, ctx.IDENTIFIER().getText()); 156 + validateCardinality(ctx.maxElementsStatement(), MAX_ELEMENT_DATA, LEAF_LIST_DATA, ctx.identifier().getText());
154 - validateCardinality(ctx.minElementsStatement(), MIN_ELEMENT_DATA, LEAF_LIST_DATA, ctx.IDENTIFIER().getText()); 157 + validateCardinality(ctx.minElementsStatement(), MIN_ELEMENT_DATA, LEAF_LIST_DATA, ctx.identifier().getText());
155 - validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, LEAF_LIST_DATA, ctx.IDENTIFIER().getText()); 158 + validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, LEAF_LIST_DATA, ctx.identifier().getText());
156 - validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, LEAF_LIST_DATA, ctx.IDENTIFIER().getText()); 159 + validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, LEAF_LIST_DATA, ctx.identifier().getText());
157 - validateCardinality(ctx.statusStatement(), STATUS_DATA, LEAF_LIST_DATA, ctx.IDENTIFIER().getText()); 160 + validateCardinality(ctx.statusStatement(), STATUS_DATA, LEAF_LIST_DATA, ctx.identifier().getText());
158 //TODO ordered by 161 //TODO ordered by
159 } 162 }
160 } 163 }
......
...@@ -26,6 +26,8 @@ import org.onosproject.yangutils.parser.Parsable; ...@@ -26,6 +26,8 @@ import org.onosproject.yangutils.parser.Parsable;
26 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; 26 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
27 import org.onosproject.yangutils.parser.exceptions.ParserException; 27 import org.onosproject.yangutils.parser.exceptions.ParserException;
28 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 28 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
29 +
30 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil; 31 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil;
30 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 32 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
31 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 33 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
...@@ -66,7 +68,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA; ...@@ -66,7 +68,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA;
66 * "}" 68 * "}"
67 * 69 *
68 * ANTLR grammar rule 70 * ANTLR grammar rule
69 - * leafStatement : LEAF_KEYWORD IDENTIFIER LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement | 71 + * leafStatement : LEAF_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement |
70 * unitsStatement | mustStatement | defaultStatement | configStatement | mandatoryStatement | statusStatement | 72 * unitsStatement | mustStatement | defaultStatement | configStatement | mandatoryStatement | statusStatement |
71 * descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE; 73 * descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE;
72 */ 74 */
...@@ -94,19 +96,20 @@ public final class LeafListener { ...@@ -94,19 +96,20 @@ public final class LeafListener {
94 GeneratedYangParser.LeafStatementContext ctx) { 96 GeneratedYangParser.LeafStatementContext ctx) {
95 97
96 // Check for stack to be non empty. 98 // Check for stack to be non empty.
97 - checkStackIsNotEmpty(listener, MISSING_HOLDER, LEAF_DATA, ctx.IDENTIFIER().getText(), ENTRY); 99 + checkStackIsNotEmpty(listener, MISSING_HOLDER, LEAF_DATA, ctx.identifier().getText(), ENTRY);
100 +
101 + String identifier = getValidIdentifier(ctx.identifier().getText(), LEAF_DATA, ctx);
98 102
99 // Validate sub statement cardinality. 103 // Validate sub statement cardinality.
100 validateSubStatementsCardinality(ctx); 104 validateSubStatementsCardinality(ctx);
101 105
102 // Check for identifier collision 106 // Check for identifier collision
103 - int line = ctx.IDENTIFIER().getSymbol().getLine(); 107 + int line = ctx.getStart().getLine();
104 - int charPositionInLine = ctx.IDENTIFIER().getSymbol().getCharPositionInLine(); 108 + int charPositionInLine = ctx.getStart().getCharPositionInLine();
105 - String identifierName = ctx.IDENTIFIER().getText(); 109 + detectCollidingChildUtil(listener, line, charPositionInLine, identifier, LEAF_DATA);
106 - detectCollidingChildUtil(listener, line, charPositionInLine, identifierName, LEAF_DATA);
107 110
108 YangLeaf leaf = new YangLeaf(); 111 YangLeaf leaf = new YangLeaf();
109 - leaf.setLeafName(ctx.IDENTIFIER().getText()); 112 + leaf.setLeafName(identifier);
110 113
111 Parsable tmpData = listener.getParsedDataStack().peek(); 114 Parsable tmpData = listener.getParsedDataStack().peek();
112 YangLeavesHolder leaves; 115 YangLeavesHolder leaves;
...@@ -116,7 +119,7 @@ public final class LeafListener { ...@@ -116,7 +119,7 @@ public final class LeafListener {
116 leaves.addLeaf(leaf); 119 leaves.addLeaf(leaf);
117 } else { 120 } else {
118 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, LEAF_DATA, 121 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, LEAF_DATA,
119 - ctx.IDENTIFIER().getText(), ENTRY)); 122 + ctx.identifier().getText(), ENTRY));
120 } 123 }
121 124
122 listener.getParsedDataStack().push(leaf); 125 listener.getParsedDataStack().push(leaf);
...@@ -126,37 +129,37 @@ public final class LeafListener { ...@@ -126,37 +129,37 @@ public final class LeafListener {
126 * It is called when parser exits from grammar rule (leaf), performs 129 * It is called when parser exits from grammar rule (leaf), performs
127 * validation and updates the data model tree. 130 * validation and updates the data model tree.
128 * 131 *
129 - * @param listener listener's object. 132 + * @param listener listener's object
130 - * @param ctx context object of the grammar rule. 133 + * @param ctx context object of the grammar rule
131 */ 134 */
132 public static void processLeafExit(TreeWalkListener listener, 135 public static void processLeafExit(TreeWalkListener listener,
133 GeneratedYangParser.LeafStatementContext ctx) { 136 GeneratedYangParser.LeafStatementContext ctx) {
134 137
135 // Check for stack to be non empty. 138 // Check for stack to be non empty.
136 - checkStackIsNotEmpty(listener, MISSING_HOLDER, LEAF_DATA, ctx.IDENTIFIER().getText(), EXIT); 139 + checkStackIsNotEmpty(listener, MISSING_HOLDER, LEAF_DATA, ctx.identifier().getText(), EXIT);
137 140
138 if (listener.getParsedDataStack().peek() instanceof YangLeaf) { 141 if (listener.getParsedDataStack().peek() instanceof YangLeaf) {
139 listener.getParsedDataStack().pop(); 142 listener.getParsedDataStack().pop();
140 } else { 143 } else {
141 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, LEAF_DATA, 144 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, LEAF_DATA,
142 - ctx.IDENTIFIER().getText(), EXIT)); 145 + ctx.identifier().getText(), EXIT));
143 } 146 }
144 } 147 }
145 148
146 /** 149 /**
147 * Validates the cardinality of leaf sub-statements as per grammar. 150 * Validates the cardinality of leaf sub-statements as per grammar.
148 * 151 *
149 - * @param ctx context object of the grammar rule. 152 + * @param ctx context object of the grammar rule
150 */ 153 */
151 private static void validateSubStatementsCardinality(GeneratedYangParser.LeafStatementContext ctx) { 154 private static void validateSubStatementsCardinality(GeneratedYangParser.LeafStatementContext ctx) {
152 155
153 - validateCardinalityEqualsOne(ctx.typeStatement(), TYPE_DATA, LEAF_DATA, ctx.IDENTIFIER().getText()); 156 + validateCardinalityEqualsOne(ctx.typeStatement(), TYPE_DATA, LEAF_DATA, ctx.identifier().getText());
154 - validateCardinality(ctx.unitsStatement(), UNITS_DATA, LEAF_DATA, ctx.IDENTIFIER().getText()); 157 + validateCardinality(ctx.unitsStatement(), UNITS_DATA, LEAF_DATA, ctx.identifier().getText());
155 - validateCardinality(ctx.configStatement(), CONFIG_DATA, LEAF_DATA, ctx.IDENTIFIER().getText()); 158 + validateCardinality(ctx.configStatement(), CONFIG_DATA, LEAF_DATA, ctx.identifier().getText());
156 - validateCardinality(ctx.mandatoryStatement(), MANDATORY_DATA, LEAF_DATA, ctx.IDENTIFIER().getText()); 159 + validateCardinality(ctx.mandatoryStatement(), MANDATORY_DATA, LEAF_DATA, ctx.identifier().getText());
157 - validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, LEAF_DATA, ctx.IDENTIFIER().getText()); 160 + validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, LEAF_DATA, ctx.identifier().getText());
158 - validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, LEAF_DATA, ctx.IDENTIFIER().getText()); 161 + validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, LEAF_DATA, ctx.identifier().getText());
159 - validateCardinality(ctx.statusStatement(), STATUS_DATA, LEAF_DATA, ctx.IDENTIFIER().getText()); 162 + validateCardinality(ctx.statusStatement(), STATUS_DATA, LEAF_DATA, ctx.identifier().getText());
160 //TODO when. 163 //TODO when.
161 } 164 }
162 } 165 }
......
...@@ -27,6 +27,7 @@ import org.onosproject.yangutils.parser.exceptions.ParserException; ...@@ -27,6 +27,7 @@ import org.onosproject.yangutils.parser.exceptions.ParserException;
27 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 27 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
28 import org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation; 28 import org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation;
29 29
30 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
30 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil; 31 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil;
31 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 32 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
32 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 33 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
...@@ -74,7 +75,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA; ...@@ -74,7 +75,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA;
74 * "}" 75 * "}"
75 * 76 *
76 * ANTLR grammar rule 77 * ANTLR grammar rule
77 - * listStatement : LIST_KEYWORD IDENTIFIER LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | 78 + * listStatement : LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement |
78 * keyStatement | uniqueStatement | configStatement | minElementsStatement | maxElementsStatement | 79 * keyStatement | uniqueStatement | configStatement | minElementsStatement | maxElementsStatement |
79 * orderedByStatement | statusStatement | descriptionStatement | referenceStatement | typedefStatement | 80 * orderedByStatement | statusStatement | descriptionStatement | referenceStatement | typedefStatement |
80 * groupingStatement| dataDefStatement)* RIGHT_CURLY_BRACE; 81 * groupingStatement| dataDefStatement)* RIGHT_CURLY_BRACE;
...@@ -104,19 +105,20 @@ public final class ListListener { ...@@ -104,19 +105,20 @@ public final class ListListener {
104 105
105 YangNode curNode; 106 YangNode curNode;
106 107
107 - checkStackIsNotEmpty(listener, MISSING_HOLDER, LIST_DATA, ctx.IDENTIFIER().getText(), ENTRY); 108 + checkStackIsNotEmpty(listener, MISSING_HOLDER, LIST_DATA, ctx.identifier().getText(), ENTRY);
109 +
110 + String identifier = getValidIdentifier(ctx.identifier().getText(), LIST_DATA, ctx);
108 111
109 // Validate sub statement cardinality. 112 // Validate sub statement cardinality.
110 validateSubStatementsCardinality(ctx); 113 validateSubStatementsCardinality(ctx);
111 114
112 // Check for identifier collision 115 // Check for identifier collision
113 - int line = ctx.IDENTIFIER().getSymbol().getLine(); 116 + int line = ctx.getStart().getLine();
114 - int charPositionInLine = ctx.IDENTIFIER().getSymbol().getCharPositionInLine(); 117 + int charPositionInLine = ctx.getStart().getCharPositionInLine();
115 - String identifierName = ctx.IDENTIFIER().getText(); 118 + detectCollidingChildUtil(listener, line, charPositionInLine, identifier, LIST_DATA);
116 - detectCollidingChildUtil(listener, line, charPositionInLine, identifierName, LIST_DATA);
117 119
118 YangList yangList = new YangList(); 120 YangList yangList = new YangList();
119 - yangList.setName(ctx.IDENTIFIER().getText()); 121 + yangList.setName(identifier);
120 122
121 /* 123 /*
122 * If "config" is not specified, the default is the same as the parent 124 * If "config" is not specified, the default is the same as the parent
...@@ -135,12 +137,12 @@ public final class ListListener { ...@@ -135,12 +137,12 @@ public final class ListListener {
135 curNode.addChild(yangList); 137 curNode.addChild(yangList);
136 } catch (DataModelException e) { 138 } catch (DataModelException e) {
137 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA, 139 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA,
138 - LIST_DATA, ctx.IDENTIFIER().getText(), ENTRY, e.getMessage())); 140 + LIST_DATA, ctx.identifier().getText(), ENTRY, e.getMessage()));
139 } 141 }
140 listener.getParsedDataStack().push(yangList); 142 listener.getParsedDataStack().push(yangList);
141 } else { 143 } else {
142 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, LIST_DATA, 144 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, LIST_DATA,
143 - ctx.IDENTIFIER().getText(), ENTRY)); 145 + ctx.identifier().getText(), ENTRY));
144 } 146 }
145 } 147 }
146 148
...@@ -154,7 +156,7 @@ public final class ListListener { ...@@ -154,7 +156,7 @@ public final class ListListener {
154 public static void processListExit(TreeWalkListener listener, 156 public static void processListExit(TreeWalkListener listener,
155 GeneratedYangParser.ListStatementContext ctx) { 157 GeneratedYangParser.ListStatementContext ctx) {
156 158
157 - checkStackIsNotEmpty(listener, MISSING_HOLDER, LIST_DATA, ctx.IDENTIFIER().getText(), EXIT); 159 + checkStackIsNotEmpty(listener, MISSING_HOLDER, LIST_DATA, ctx.identifier().getText(), EXIT);
158 160
159 if (listener.getParsedDataStack().peek() instanceof YangList) { 161 if (listener.getParsedDataStack().peek() instanceof YangList) {
160 YangList yangList = (YangList) listener.getParsedDataStack().peek(); 162 YangList yangList = (YangList) listener.getParsedDataStack().peek();
...@@ -162,12 +164,12 @@ public final class ListListener { ...@@ -162,12 +164,12 @@ public final class ListListener {
162 yangList.validateDataOnExit(); 164 yangList.validateDataOnExit();
163 } catch (DataModelException e) { 165 } catch (DataModelException e) {
164 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA, 166 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA,
165 - LIST_DATA, ctx.IDENTIFIER().getText(), EXIT, e.getMessage())); 167 + LIST_DATA, ctx.identifier().getText(), EXIT, e.getMessage()));
166 } 168 }
167 listener.getParsedDataStack().pop(); 169 listener.getParsedDataStack().pop();
168 } else { 170 } else {
169 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, LIST_DATA, 171 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, LIST_DATA,
170 - ctx.IDENTIFIER().getText(), EXIT)); 172 + ctx.identifier().getText(), EXIT));
171 } 173 }
172 } 174 }
173 175
...@@ -178,14 +180,14 @@ public final class ListListener { ...@@ -178,14 +180,14 @@ public final class ListListener {
178 */ 180 */
179 private static void validateSubStatementsCardinality(GeneratedYangParser.ListStatementContext ctx) { 181 private static void validateSubStatementsCardinality(GeneratedYangParser.ListStatementContext ctx) {
180 182
181 - validateCardinality(ctx.keyStatement(), KEY_DATA, LIST_DATA, ctx.IDENTIFIER().getText()); 183 + validateCardinality(ctx.keyStatement(), KEY_DATA, LIST_DATA, ctx.identifier().getText());
182 - validateCardinality(ctx.configStatement(), CONFIG_DATA, LIST_DATA, ctx.IDENTIFIER().getText()); 184 + validateCardinality(ctx.configStatement(), CONFIG_DATA, LIST_DATA, ctx.identifier().getText());
183 - validateCardinality(ctx.maxElementsStatement(), MAX_ELEMENT_DATA, LIST_DATA, ctx.IDENTIFIER().getText()); 185 + validateCardinality(ctx.maxElementsStatement(), MAX_ELEMENT_DATA, LIST_DATA, ctx.identifier().getText());
184 - validateCardinality(ctx.minElementsStatement(), MIN_ELEMENT_DATA, LIST_DATA, ctx.IDENTIFIER().getText()); 186 + validateCardinality(ctx.minElementsStatement(), MIN_ELEMENT_DATA, LIST_DATA, ctx.identifier().getText());
185 - validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, LIST_DATA, ctx.IDENTIFIER().getText()); 187 + validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, LIST_DATA, ctx.identifier().getText());
186 - validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, LIST_DATA, ctx.IDENTIFIER().getText()); 188 + validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, LIST_DATA, ctx.identifier().getText());
187 - validateCardinality(ctx.statusStatement(), STATUS_DATA, LIST_DATA, ctx.IDENTIFIER().getText()); 189 + validateCardinality(ctx.statusStatement(), STATUS_DATA, LIST_DATA, ctx.identifier().getText());
188 - validateCardinalityNonNull(ctx.dataDefStatement(), DATA_DEF_DATA, LIST_DATA, ctx.IDENTIFIER().getText()); 190 + validateCardinalityNonNull(ctx.dataDefStatement(), DATA_DEF_DATA, LIST_DATA, ctx.identifier().getText());
189 //TODO when, typedef, grouping, unique 191 //TODO when, typedef, grouping, unique
190 } 192 }
191 } 193 }
......
...@@ -20,6 +20,8 @@ import org.onosproject.yangutils.datamodel.YangModule; ...@@ -20,6 +20,8 @@ import org.onosproject.yangutils.datamodel.YangModule;
20 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; 20 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
21 import org.onosproject.yangutils.parser.exceptions.ParserException; 21 import org.onosproject.yangutils.parser.exceptions.ParserException;
22 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 22 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
23 +
24 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
23 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 25 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
24 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 26 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
25 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
...@@ -45,7 +47,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.MODULE_DATA; ...@@ -45,7 +47,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.MODULE_DATA;
45 * "}" optsep 47 * "}" optsep
46 * 48 *
47 * ANTLR grammar rule 49 * ANTLR grammar rule
48 - * module_stmt : MODULE_KEYWORD IDENTIFIER LEFT_CURLY_BRACE module_body* RIGHT_CURLY_BRACE; 50 + * module_stmt : MODULE_KEYWORD identifier LEFT_CURLY_BRACE module_body* RIGHT_CURLY_BRACE;
49 */ 51 */
50 52
51 /** 53 /**
...@@ -70,10 +72,12 @@ public final class ModuleListener { ...@@ -70,10 +72,12 @@ public final class ModuleListener {
70 public static void processModuleEntry(TreeWalkListener listener, GeneratedYangParser.ModuleStatementContext ctx) { 72 public static void processModuleEntry(TreeWalkListener listener, GeneratedYangParser.ModuleStatementContext ctx) {
71 73
72 // Check if stack is empty. 74 // Check if stack is empty.
73 - checkStackIsEmpty(listener, INVALID_HOLDER, MODULE_DATA, ctx.IDENTIFIER().getText(), ENTRY); 75 + checkStackIsEmpty(listener, INVALID_HOLDER, MODULE_DATA, ctx.identifier().getText(), ENTRY);
76 +
77 + String identifier = getValidIdentifier(ctx.identifier().getText(), MODULE_DATA, ctx);
74 78
75 YangModule yangModule = new YangModule(); 79 YangModule yangModule = new YangModule();
76 - yangModule.setName(ctx.IDENTIFIER().getText()); 80 + yangModule.setName(identifier);
77 81
78 if (ctx.moduleBody(0).moduleHeaderStatement().yangVersionStatement() == null) { 82 if (ctx.moduleBody(0).moduleHeaderStatement().yangVersionStatement() == null) {
79 yangModule.setVersion((byte) 1); 83 yangModule.setVersion((byte) 1);
...@@ -92,11 +96,11 @@ public final class ModuleListener { ...@@ -92,11 +96,11 @@ public final class ModuleListener {
92 public static void processModuleExit(TreeWalkListener listener, GeneratedYangParser.ModuleStatementContext ctx) { 96 public static void processModuleExit(TreeWalkListener listener, GeneratedYangParser.ModuleStatementContext ctx) {
93 97
94 // Check for stack to be non empty. 98 // Check for stack to be non empty.
95 - checkStackIsNotEmpty(listener, MISSING_HOLDER, MODULE_DATA, ctx.IDENTIFIER().getText(), EXIT); 99 + checkStackIsNotEmpty(listener, MISSING_HOLDER, MODULE_DATA, ctx.identifier().getText(), EXIT);
96 100
97 if (!(listener.getParsedDataStack().peek() instanceof YangModule)) { 101 if (!(listener.getParsedDataStack().peek() instanceof YangModule)) {
98 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, MODULE_DATA, 102 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, MODULE_DATA,
99 - ctx.IDENTIFIER().getText(), EXIT)); 103 + ctx.identifier().getText(), EXIT));
100 } 104 }
101 } 105 }
102 } 106 }
......
...@@ -30,7 +30,7 @@ package org.onosproject.yangutils.parser.impl.listeners; ...@@ -30,7 +30,7 @@ package org.onosproject.yangutils.parser.impl.listeners;
30 * zero-integer-value = 1*DIGIT 30 * zero-integer-value = 1*DIGIT
31 * 31 *
32 * ANTLR grammar rule 32 * ANTLR grammar rule
33 - * positionStatement : POSITION_KEYWORD INTEGER STMTEND; 33 + * positionStatement : POSITION_KEYWORD string STMTEND;
34 */ 34 */
35 35
36 import org.onosproject.yangutils.datamodel.YangBit; 36 import org.onosproject.yangutils.datamodel.YangBit;
...@@ -44,6 +44,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLoc ...@@ -44,6 +44,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLoc
44 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 44 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
45 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; 45 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
46 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; 46 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
47 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
47 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; 48 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
48 import static org.onosproject.yangutils.utils.YangConstructType.POSITION_DATA; 49 import static org.onosproject.yangutils.utils.YangConstructType.POSITION_DATA;
49 50
...@@ -73,25 +74,27 @@ public final class PositionListener { ...@@ -73,25 +74,27 @@ public final class PositionListener {
73 GeneratedYangParser.PositionStatementContext ctx) { 74 GeneratedYangParser.PositionStatementContext ctx) {
74 75
75 // Check for stack to be non empty. 76 // Check for stack to be non empty.
76 - checkStackIsNotEmpty(listener, MISSING_HOLDER, POSITION_DATA, ctx.INTEGER().getText(), ENTRY); 77 + checkStackIsNotEmpty(listener, MISSING_HOLDER, POSITION_DATA, ctx.string().getText(), ENTRY);
78 +
79 + String position = removeQuotesAndHandleConcat(ctx.string().getText());
77 80
78 // Obtain the node of the stack. 81 // Obtain the node of the stack.
79 Parsable tmpNode = listener.getParsedDataStack().peek(); 82 Parsable tmpNode = listener.getParsedDataStack().peek();
80 switch (tmpNode.getYangConstructType()) { 83 switch (tmpNode.getYangConstructType()) {
81 case BIT_DATA: { 84 case BIT_DATA: {
82 YangBit bitNode = (YangBit) tmpNode; 85 YangBit bitNode = (YangBit) tmpNode;
83 - if (!isBitPositionValid(listener, ctx)) { 86 + if (!isBitPositionValid(listener, ctx, position)) {
84 ParserException parserException = new ParserException(errMsg); 87 ParserException parserException = new ParserException(errMsg);
85 - parserException.setLine(ctx.INTEGER().getSymbol().getLine()); 88 + parserException.setLine(ctx.getStart().getLine());
86 - parserException.setCharPosition(ctx.INTEGER().getSymbol().getCharPositionInLine()); 89 + parserException.setCharPosition(ctx.getStart().getCharPositionInLine());
87 throw parserException; 90 throw parserException;
88 } 91 }
89 - bitNode.setPosition(Integer.valueOf(ctx.INTEGER().getText())); 92 + bitNode.setPosition(Integer.valueOf(position));
90 break; 93 break;
91 } 94 }
92 default: 95 default:
93 throw new ParserException( 96 throw new ParserException(
94 - constructListenerErrorMessage(INVALID_HOLDER, POSITION_DATA, ctx.INTEGER().getText(), ENTRY)); 97 + constructListenerErrorMessage(INVALID_HOLDER, POSITION_DATA, ctx.string().getText(), ENTRY));
95 } 98 }
96 } 99 }
97 100
...@@ -103,13 +106,13 @@ public final class PositionListener { ...@@ -103,13 +106,13 @@ public final class PositionListener {
103 * @return validation result 106 * @return validation result
104 */ 107 */
105 private static boolean isBitPositionValid(TreeWalkListener listener, 108 private static boolean isBitPositionValid(TreeWalkListener listener,
106 - GeneratedYangParser.PositionStatementContext ctx) { 109 + GeneratedYangParser.PositionStatementContext ctx, String position) {
107 Parsable bitNode = listener.getParsedDataStack().pop(); 110 Parsable bitNode = listener.getParsedDataStack().pop();
108 111
109 // Check for stack to be non empty. 112 // Check for stack to be non empty.
110 - checkStackIsNotEmpty(listener, MISSING_HOLDER, POSITION_DATA, ctx.INTEGER().getText(), ENTRY); 113 + checkStackIsNotEmpty(listener, MISSING_HOLDER, POSITION_DATA, ctx.string().getText(), ENTRY);
111 114
112 - if (Integer.valueOf(ctx.INTEGER().getText()) < 0) { 115 + if (Integer.valueOf(position) < 0) {
113 errMsg = "YANG file error: Negative value of position is invalid."; 116 errMsg = "YANG file error: Negative value of position is invalid.";
114 listener.getParsedDataStack().push(bitNode); 117 listener.getParsedDataStack().push(bitNode);
115 return false; 118 return false;
...@@ -120,7 +123,7 @@ public final class PositionListener { ...@@ -120,7 +123,7 @@ public final class PositionListener {
120 case BITS_DATA: { 123 case BITS_DATA: {
121 YangBits yangBits = (YangBits) tmpNode; 124 YangBits yangBits = (YangBits) tmpNode;
122 for (YangBit curBit : yangBits.getBitSet()) { 125 for (YangBit curBit : yangBits.getBitSet()) {
123 - if (Integer.valueOf(ctx.INTEGER().getText()) == curBit.getPosition()) { 126 + if (Integer.valueOf(position) == curBit.getPosition()) {
124 errMsg = "YANG file error: Duplicate value of position is invalid."; 127 errMsg = "YANG file error: Duplicate value of position is invalid.";
125 listener.getParsedDataStack().push(bitNode); 128 listener.getParsedDataStack().push(bitNode);
126 return false; 129 return false;
...@@ -132,7 +135,7 @@ public final class PositionListener { ...@@ -132,7 +135,7 @@ public final class PositionListener {
132 default: 135 default:
133 listener.getParsedDataStack().push(bitNode); 136 listener.getParsedDataStack().push(bitNode);
134 throw new ParserException( 137 throw new ParserException(
135 - constructListenerErrorMessage(INVALID_HOLDER, POSITION_DATA, ctx.INTEGER().getText(), ENTRY)); 138 + constructListenerErrorMessage(INVALID_HOLDER, POSITION_DATA, ctx.string().getText(), ENTRY));
136 } 139 }
137 } 140 }
138 } 141 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -24,6 +24,7 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; ...@@ -24,6 +24,7 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
24 import org.onosproject.yangutils.parser.exceptions.ParserException; 24 import org.onosproject.yangutils.parser.exceptions.ParserException;
25 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 25 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
26 26
27 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
27 import static org.onosproject.yangutils.utils.YangConstructType.PREFIX_DATA; 28 import static org.onosproject.yangutils.utils.YangConstructType.PREFIX_DATA;
28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 30 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
...@@ -51,7 +52,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati ...@@ -51,7 +52,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati
51 * | prefix_stmt namespace_stmt yang_version_stmt? 52 * | prefix_stmt namespace_stmt yang_version_stmt?
52 * | prefix_stmt yang_version_stmt? namespace_stmt 53 * | prefix_stmt yang_version_stmt? namespace_stmt
53 * ; 54 * ;
54 - * prefix_stmt : PREFIX_KEYWORD IDENTIFIER STMTEND; 55 + * prefix_stmt : PREFIX_KEYWORD identifier STMTEND;
55 */ 56 */
56 57
57 /** 58 /**
...@@ -76,29 +77,31 @@ public final class PrefixListener { ...@@ -76,29 +77,31 @@ public final class PrefixListener {
76 public static void processPrefixEntry(TreeWalkListener listener, GeneratedYangParser.PrefixStatementContext ctx) { 77 public static void processPrefixEntry(TreeWalkListener listener, GeneratedYangParser.PrefixStatementContext ctx) {
77 78
78 // Check for stack to be non empty. 79 // Check for stack to be non empty.
79 - checkStackIsNotEmpty(listener, MISSING_HOLDER, PREFIX_DATA, ctx.IDENTIFIER().getText(), ENTRY); 80 + checkStackIsNotEmpty(listener, MISSING_HOLDER, PREFIX_DATA, ctx.identifier().getText(), ENTRY);
81 +
82 + String identifier = getValidIdentifier(ctx.identifier().getText(), PREFIX_DATA, ctx);
80 83
81 // Obtain the node of the stack. 84 // Obtain the node of the stack.
82 Parsable tmpNode = listener.getParsedDataStack().peek(); 85 Parsable tmpNode = listener.getParsedDataStack().peek();
83 switch (tmpNode.getYangConstructType()) { 86 switch (tmpNode.getYangConstructType()) {
84 case MODULE_DATA: { 87 case MODULE_DATA: {
85 YangModule module = (YangModule) tmpNode; 88 YangModule module = (YangModule) tmpNode;
86 - module.setPrefix(ctx.IDENTIFIER().getText()); 89 + module.setPrefix(identifier);
87 break; 90 break;
88 } 91 }
89 case IMPORT_DATA: { 92 case IMPORT_DATA: {
90 YangImport importNode = (YangImport) tmpNode; 93 YangImport importNode = (YangImport) tmpNode;
91 - importNode.setPrefixId(ctx.IDENTIFIER().getText()); 94 + importNode.setPrefixId(identifier);
92 break; 95 break;
93 } 96 }
94 case BELONGS_TO_DATA: { 97 case BELONGS_TO_DATA: {
95 YangBelongsTo belongstoNode = (YangBelongsTo) tmpNode; 98 YangBelongsTo belongstoNode = (YangBelongsTo) tmpNode;
96 - belongstoNode.setPrefix(ctx.IDENTIFIER().getText()); 99 + belongstoNode.setPrefix(identifier);
97 break; 100 break;
98 } 101 }
99 default: 102 default:
100 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, PREFIX_DATA, 103 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, PREFIX_DATA,
101 - ctx.IDENTIFIER().getText(), ENTRY)); 104 + ctx.identifier().getText(), ENTRY));
102 } 105 }
103 } 106 }
104 } 107 }
......
...@@ -16,10 +16,6 @@ ...@@ -16,10 +16,6 @@
16 16
17 package org.onosproject.yangutils.parser.impl.listeners; 17 package org.onosproject.yangutils.parser.impl.listeners;
18 18
19 -import java.text.ParseException;
20 -import java.text.SimpleDateFormat;
21 -import java.util.Date;
22 -
23 import org.onosproject.yangutils.datamodel.YangImport; 19 import org.onosproject.yangutils.datamodel.YangImport;
24 import org.onosproject.yangutils.datamodel.YangInclude; 20 import org.onosproject.yangutils.datamodel.YangInclude;
25 import org.onosproject.yangutils.parser.Parsable; 21 import org.onosproject.yangutils.parser.Parsable;
...@@ -27,6 +23,8 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; ...@@ -27,6 +23,8 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
27 import org.onosproject.yangutils.parser.exceptions.ParserException; 23 import org.onosproject.yangutils.parser.exceptions.ParserException;
28 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 24 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
29 25
26 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
27 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid;
30 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
31 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
32 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; 30 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
...@@ -86,13 +84,14 @@ public final class RevisionDateListener { ...@@ -86,13 +84,14 @@ public final class RevisionDateListener {
86 GeneratedYangParser.RevisionDateStatementContext ctx) { 84 GeneratedYangParser.RevisionDateStatementContext ctx) {
87 85
88 // Check for stack to be non empty. 86 // Check for stack to be non empty.
89 - checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATE_DATA, ctx.DATE_ARG().getText(), 87 + checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATE_DATA, ctx.dateArgumentString().getText(),
90 ENTRY); 88 ENTRY);
91 89
92 - if (!isDateValid(ctx.DATE_ARG().getText())) { 90 + String date = removeQuotesAndHandleConcat(ctx.dateArgumentString().getText());
91 + if (!isDateValid(date)) {
93 ParserException parserException = new ParserException("YANG file error: Input date is not correct"); 92 ParserException parserException = new ParserException("YANG file error: Input date is not correct");
94 - parserException.setLine(ctx.DATE_ARG().getSymbol().getLine()); 93 + parserException.setLine(ctx.getStart().getLine());
95 - parserException.setCharPosition(ctx.DATE_ARG().getSymbol().getCharPositionInLine()); 94 + parserException.setCharPosition(ctx.getStart().getCharPositionInLine());
96 throw parserException; 95 throw parserException;
97 } 96 }
98 97
...@@ -101,42 +100,17 @@ public final class RevisionDateListener { ...@@ -101,42 +100,17 @@ public final class RevisionDateListener {
101 switch (tmpNode.getYangConstructType()) { 100 switch (tmpNode.getYangConstructType()) {
102 case IMPORT_DATA: { 101 case IMPORT_DATA: {
103 YangImport importNode = (YangImport) tmpNode; 102 YangImport importNode = (YangImport) tmpNode;
104 - importNode.setRevision(ctx.DATE_ARG().getText()); 103 + importNode.setRevision(date);
105 break; 104 break;
106 } 105 }
107 case INCLUDE_DATA: { 106 case INCLUDE_DATA: {
108 YangInclude includeNode = (YangInclude) tmpNode; 107 YangInclude includeNode = (YangInclude) tmpNode;
109 - includeNode.setRevision(ctx.DATE_ARG().getText()); 108 + includeNode.setRevision(date);
110 break; 109 break;
111 } 110 }
112 default: 111 default:
113 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, REVISION_DATE_DATA, 112 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, REVISION_DATE_DATA,
114 - ctx.DATE_ARG().getText(), ENTRY)); 113 + ctx.dateArgumentString().getText(), ENTRY));
115 - }
116 - }
117 -
118 - /**
119 - * Validates the revision date.
120 - *
121 - * @param dateToValidate input revision date
122 - * @return validation result, true for success, false for failure
123 - */
124 - private static boolean isDateValid(String dateToValidate) {
125 -
126 - if (dateToValidate == null) {
127 - return false;
128 - }
129 -
130 - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
131 - sdf.setLenient(false);
132 -
133 - try {
134 - //if not valid, it will throw ParseException
135 - Date date = sdf.parse(dateToValidate);
136 - System.out.println(date);
137 - } catch (ParseException e) {
138 - return false;
139 } 114 }
140 - return true;
141 } 115 }
142 } 116 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -24,6 +24,8 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; ...@@ -24,6 +24,8 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
24 import org.onosproject.yangutils.parser.exceptions.ParserException; 24 import org.onosproject.yangutils.parser.exceptions.ParserException;
25 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 25 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
26 26
27 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
28 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid;
27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; 29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; 30 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; 31 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
...@@ -33,10 +35,6 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLoc ...@@ -33,10 +35,6 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLoc
33 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 35 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
34 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; 36 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
35 37
36 -import java.text.ParseException;
37 -import java.text.SimpleDateFormat;
38 -import java.util.Date;
39 -
40 /* 38 /*
41 * Reference: RFC6020 and YANG ANTLR Grammar 39 * Reference: RFC6020 and YANG ANTLR Grammar
42 * 40 *
...@@ -88,7 +86,7 @@ public final class RevisionListener { ...@@ -88,7 +86,7 @@ public final class RevisionListener {
88 GeneratedYangParser.RevisionStatementContext ctx) { 86 GeneratedYangParser.RevisionStatementContext ctx) {
89 87
90 // Check for stack to be non empty. 88 // Check for stack to be non empty.
91 - checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.DATE_ARG().getText(), ENTRY); 89 + checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.dateArgumentString().getText(), ENTRY);
92 90
93 // Validate for reverse chronological order of revision & for revision 91 // Validate for reverse chronological order of revision & for revision
94 // value. 92 // value.
...@@ -97,15 +95,16 @@ public final class RevisionListener { ...@@ -97,15 +95,16 @@ public final class RevisionListener {
97 // TODO to be implemented. 95 // TODO to be implemented.
98 } 96 }
99 97
100 - if (!isDateValid(ctx.DATE_ARG().getText())) { 98 + String date = removeQuotesAndHandleConcat(ctx.dateArgumentString().getText());
99 + if (!isDateValid(date)) {
101 ParserException parserException = new ParserException("YANG file error: Input date is not correct"); 100 ParserException parserException = new ParserException("YANG file error: Input date is not correct");
102 - parserException.setLine(ctx.DATE_ARG().getSymbol().getLine()); 101 + parserException.setLine(ctx.getStart().getLine());
103 - parserException.setCharPosition(ctx.DATE_ARG().getSymbol().getCharPositionInLine()); 102 + parserException.setCharPosition(ctx.getStart().getCharPositionInLine());
104 throw parserException; 103 throw parserException;
105 } 104 }
106 105
107 YangRevision revisionNode = new YangRevision(); 106 YangRevision revisionNode = new YangRevision();
108 - revisionNode.setRevDate(ctx.DATE_ARG().getText()); 107 + revisionNode.setRevDate(date);
109 108
110 listener.getParsedDataStack().push(revisionNode); 109 listener.getParsedDataStack().push(revisionNode);
111 } 110 }
...@@ -121,14 +120,14 @@ public final class RevisionListener { ...@@ -121,14 +120,14 @@ public final class RevisionListener {
121 ctx) { 120 ctx) {
122 121
123 // Check for stack to be non empty. 122 // Check for stack to be non empty.
124 - checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.DATE_ARG().getText(), EXIT); 123 + checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.dateArgumentString().getText(), EXIT);
125 124
126 Parsable tmpRevisionNode = listener.getParsedDataStack().peek(); 125 Parsable tmpRevisionNode = listener.getParsedDataStack().peek();
127 if (tmpRevisionNode instanceof YangRevision) { 126 if (tmpRevisionNode instanceof YangRevision) {
128 listener.getParsedDataStack().pop(); 127 listener.getParsedDataStack().pop();
129 128
130 // Check for stack to be non empty. 129 // Check for stack to be non empty.
131 - checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.DATE_ARG().getText(), 130 + checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.dateArgumentString().getText(),
132 EXIT); 131 EXIT);
133 132
134 Parsable tmpNode = listener.getParsedDataStack().peek(); 133 Parsable tmpNode = listener.getParsedDataStack().peek();
...@@ -145,12 +144,12 @@ public final class RevisionListener { ...@@ -145,12 +144,12 @@ public final class RevisionListener {
145 } 144 }
146 default: 145 default:
147 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, REVISION_DATA, 146 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, REVISION_DATA,
148 - ctx.DATE_ARG().getText(), 147 + ctx.dateArgumentString().getText(),
149 EXIT)); 148 EXIT));
150 } 149 }
151 } else { 150 } else {
152 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, REVISION_DATA, 151 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, REVISION_DATA,
153 - ctx.DATE_ARG().getText(), EXIT)); 152 + ctx.dateArgumentString().getText(), EXIT));
154 } 153 }
155 } 154 }
156 155
...@@ -166,29 +165,4 @@ public final class RevisionListener { ...@@ -166,29 +165,4 @@ public final class RevisionListener {
166 // TODO to be implemented 165 // TODO to be implemented
167 return true; 166 return true;
168 } 167 }
169 -
170 - /**
171 - * Validates the revision date.
172 - *
173 - * @param dateToValidate input revision date
174 - * @return validation result, true for success, false for failure
175 - */
176 - private static boolean isDateValid(String dateToValidate) {
177 -
178 - if (dateToValidate == null) {
179 - return false;
180 - }
181 -
182 - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
183 - sdf.setLenient(false);
184 -
185 - try {
186 - //if not valid, it will throw ParseException
187 - Date date = sdf.parse(dateToValidate);
188 - System.out.println(date);
189 - } catch (ParseException e) {
190 - return false;
191 - }
192 - return true;
193 - }
194 } 168 }
......
...@@ -20,6 +20,8 @@ import org.onosproject.yangutils.datamodel.YangSubModule; ...@@ -20,6 +20,8 @@ import org.onosproject.yangutils.datamodel.YangSubModule;
20 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; 20 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
21 import org.onosproject.yangutils.parser.exceptions.ParserException; 21 import org.onosproject.yangutils.parser.exceptions.ParserException;
22 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 22 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
23 +
24 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
23 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 25 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
24 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 26 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
25 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
...@@ -45,7 +47,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.SUB_MODULE_DATA; ...@@ -45,7 +47,7 @@ import static org.onosproject.yangutils.utils.YangConstructType.SUB_MODULE_DATA;
45 * "}" optsep 47 * "}" optsep
46 * 48 *
47 * ANTLR grammar rule 49 * ANTLR grammar rule
48 - * submodule_stmt : SUBMODULE_KEYWORD IDENTIFIER LEFT_CURLY_BRACE submodule_body* RIGHT_CURLY_BRACE; 50 + * submodule_stmt : SUBMODULE_KEYWORD identifier LEFT_CURLY_BRACE submodule_body* RIGHT_CURLY_BRACE;
49 * submodule_body : submodule_header_statement linkage_stmts meta_stmts revision_stmts body_stmts; 51 * submodule_body : submodule_header_statement linkage_stmts meta_stmts revision_stmts body_stmts;
50 */ 52 */
51 53
...@@ -72,11 +74,13 @@ public final class SubModuleListener { ...@@ -72,11 +74,13 @@ public final class SubModuleListener {
72 GeneratedYangParser.SubModuleStatementContext ctx) { 74 GeneratedYangParser.SubModuleStatementContext ctx) {
73 75
74 // Check if stack is empty. 76 // Check if stack is empty.
75 - checkStackIsEmpty(listener, INVALID_HOLDER, SUB_MODULE_DATA, ctx.IDENTIFIER().getText(), 77 + checkStackIsEmpty(listener, INVALID_HOLDER, SUB_MODULE_DATA, ctx.identifier().getText(),
76 ENTRY); 78 ENTRY);
77 79
80 + String identifier = getValidIdentifier(ctx.identifier().getText(), SUB_MODULE_DATA, ctx);
81 +
78 YangSubModule yangSubModule = new YangSubModule(); 82 YangSubModule yangSubModule = new YangSubModule();
79 - yangSubModule.setName(ctx.IDENTIFIER().getText()); 83 + yangSubModule.setName(identifier);
80 84
81 if (ctx.submoduleBody(0).submoduleHeaderStatement().yangVersionStatement() == null) { 85 if (ctx.submoduleBody(0).submoduleHeaderStatement().yangVersionStatement() == null) {
82 yangSubModule.setVersion((byte) 1); 86 yangSubModule.setVersion((byte) 1);
...@@ -96,12 +100,12 @@ public final class SubModuleListener { ...@@ -96,12 +100,12 @@ public final class SubModuleListener {
96 GeneratedYangParser.SubModuleStatementContext ctx) { 100 GeneratedYangParser.SubModuleStatementContext ctx) {
97 101
98 // Check for stack to be non empty. 102 // Check for stack to be non empty.
99 - checkStackIsNotEmpty(listener, MISSING_HOLDER, SUB_MODULE_DATA, ctx.IDENTIFIER().getText(), 103 + checkStackIsNotEmpty(listener, MISSING_HOLDER, SUB_MODULE_DATA, ctx.identifier().getText(),
100 EXIT); 104 EXIT);
101 105
102 if (!(listener.getParsedDataStack().peek() instanceof YangSubModule)) { 106 if (!(listener.getParsedDataStack().peek() instanceof YangSubModule)) {
103 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, SUB_MODULE_DATA, 107 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, SUB_MODULE_DATA,
104 - ctx.IDENTIFIER().getText(), EXIT)); 108 + ctx.identifier().getText(), EXIT));
105 } 109 }
106 } 110 }
107 } 111 }
......
...@@ -42,7 +42,7 @@ package org.onosproject.yangutils.parser.impl.listeners; ...@@ -42,7 +42,7 @@ package org.onosproject.yangutils.parser.impl.listeners;
42 * "}" 42 * "}"
43 * 43 *
44 * ANTLR grammar rule 44 * ANTLR grammar rule
45 - * typedefStatement : TYPEDEF_KEYWORD IDENTIFIER LEFT_CURLY_BRACE 45 + * typedefStatement : TYPEDEF_KEYWORD identifier LEFT_CURLY_BRACE
46 * (typeStatement | unitsStatement | defaultStatement | statusStatement 46 * (typeStatement | unitsStatement | defaultStatement | statusStatement
47 * | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE; 47 * | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE;
48 */ 48 */
...@@ -62,6 +62,7 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; ...@@ -62,6 +62,7 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
62 import org.onosproject.yangutils.parser.exceptions.ParserException; 62 import org.onosproject.yangutils.parser.exceptions.ParserException;
63 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 63 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
64 64
65 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
65 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 66 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
66 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; 67 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
67 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage; 68 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
...@@ -105,7 +106,9 @@ public final class TypeDefListener { ...@@ -105,7 +106,9 @@ public final class TypeDefListener {
105 GeneratedYangParser.TypedefStatementContext ctx) { 106 GeneratedYangParser.TypedefStatementContext ctx) {
106 107
107 // Check for stack to be non empty. 108 // Check for stack to be non empty.
108 - checkStackIsNotEmpty(listener, MISSING_HOLDER, TYPEDEF_DATA, ctx.IDENTIFIER().getText(), ENTRY); 109 + checkStackIsNotEmpty(listener, MISSING_HOLDER, TYPEDEF_DATA, ctx.identifier().getText(), ENTRY);
110 +
111 + String identifier = getValidIdentifier(ctx.identifier().getText(), TYPEDEF_DATA, ctx);
109 112
110 // Validate sub statement cardinality. 113 // Validate sub statement cardinality.
111 validateSubStatementsCardinality(ctx); 114 validateSubStatementsCardinality(ctx);
...@@ -116,7 +119,7 @@ public final class TypeDefListener { ...@@ -116,7 +119,7 @@ public final class TypeDefListener {
116 */ 119 */
117 YangType<YangDerivedType> derivedType = new YangType<YangDerivedType>(); 120 YangType<YangDerivedType> derivedType = new YangType<YangDerivedType>();
118 derivedType.setDataType(YangDataTypes.DERIVED); 121 derivedType.setDataType(YangDataTypes.DERIVED);
119 - derivedType.setDataTypeName(ctx.IDENTIFIER().getText()); 122 + derivedType.setDataTypeName(identifier);
120 123
121 YangTypeDef typeDefNode = new YangTypeDef(); 124 YangTypeDef typeDefNode = new YangTypeDef();
122 typeDefNode.setDerivedType(derivedType); 125 typeDefNode.setDerivedType(derivedType);
...@@ -133,12 +136,12 @@ public final class TypeDefListener { ...@@ -133,12 +136,12 @@ public final class TypeDefListener {
133 curNode.addChild(typeDefNode); 136 curNode.addChild(typeDefNode);
134 } catch (DataModelException e) { 137 } catch (DataModelException e) {
135 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA, 138 throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA,
136 - TYPEDEF_DATA, ctx.IDENTIFIER().getText(), ENTRY, e.getMessage())); 139 + TYPEDEF_DATA, ctx.identifier().getText(), ENTRY, e.getMessage()));
137 } 140 }
138 listener.getParsedDataStack().push(typeDefNode); 141 listener.getParsedDataStack().push(typeDefNode);
139 } else { 142 } else {
140 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, 143 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER,
141 - TYPEDEF_DATA, ctx.IDENTIFIER().getText(), ENTRY)); 144 + TYPEDEF_DATA, ctx.identifier().getText(), ENTRY));
142 } 145 }
143 } 146 }
144 147
...@@ -153,7 +156,7 @@ public final class TypeDefListener { ...@@ -153,7 +156,7 @@ public final class TypeDefListener {
153 GeneratedYangParser.TypedefStatementContext ctx) { 156 GeneratedYangParser.TypedefStatementContext ctx) {
154 157
155 // Check for stack to be non empty. 158 // Check for stack to be non empty.
156 - checkStackIsNotEmpty(listener, MISSING_HOLDER, TYPEDEF_DATA, ctx.IDENTIFIER().getText(), EXIT); 159 + checkStackIsNotEmpty(listener, MISSING_HOLDER, TYPEDEF_DATA, ctx.identifier().getText(), EXIT);
157 160
158 if (listener.getParsedDataStack().peek() instanceof YangTypeDef) { 161 if (listener.getParsedDataStack().peek() instanceof YangTypeDef) {
159 YangTypeDef typeDefNode = (YangTypeDef) listener.getParsedDataStack().peek(); 162 YangTypeDef typeDefNode = (YangTypeDef) listener.getParsedDataStack().peek();
...@@ -161,13 +164,13 @@ public final class TypeDefListener { ...@@ -161,13 +164,13 @@ public final class TypeDefListener {
161 typeDefNode.validateDataOnExit(); 164 typeDefNode.validateDataOnExit();
162 } catch (DataModelException e) { 165 } catch (DataModelException e) {
163 throw new ParserException(constructListenerErrorMessage(INVALID_CONTENT, TYPEDEF_DATA, 166 throw new ParserException(constructListenerErrorMessage(INVALID_CONTENT, TYPEDEF_DATA,
164 - ctx.IDENTIFIER().getText(), EXIT)); 167 + ctx.identifier().getText(), EXIT));
165 } 168 }
166 169
167 listener.getParsedDataStack().pop(); 170 listener.getParsedDataStack().pop();
168 } else { 171 } else {
169 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, TYPEDEF_DATA, 172 throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, TYPEDEF_DATA,
170 - ctx.IDENTIFIER().getText(), EXIT)); 173 + ctx.identifier().getText(), EXIT));
171 } 174 }
172 } 175 }
173 176
...@@ -178,11 +181,11 @@ public final class TypeDefListener { ...@@ -178,11 +181,11 @@ public final class TypeDefListener {
178 */ 181 */
179 private static void validateSubStatementsCardinality(GeneratedYangParser.TypedefStatementContext ctx) { 182 private static void validateSubStatementsCardinality(GeneratedYangParser.TypedefStatementContext ctx) {
180 183
181 - validateCardinality(ctx.unitsStatement(), UNITS_DATA, TYPEDEF_DATA, ctx.IDENTIFIER().getText()); 184 + validateCardinality(ctx.unitsStatement(), UNITS_DATA, TYPEDEF_DATA, ctx.identifier().getText());
182 - validateCardinality(ctx.defaultStatement(), DEFAULT_DATA, TYPEDEF_DATA, ctx.IDENTIFIER().getText()); 185 + validateCardinality(ctx.defaultStatement(), DEFAULT_DATA, TYPEDEF_DATA, ctx.identifier().getText());
183 - validateCardinalityEqualsOne(ctx.typeStatement(), TYPE_DATA, TYPEDEF_DATA, ctx.IDENTIFIER().getText()); 186 + validateCardinalityEqualsOne(ctx.typeStatement(), TYPE_DATA, TYPEDEF_DATA, ctx.identifier().getText());
184 - validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, TYPEDEF_DATA, ctx.IDENTIFIER().getText()); 187 + validateCardinality(ctx.descriptionStatement(), DESCRIPTION_DATA, TYPEDEF_DATA, ctx.identifier().getText());
185 - validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, TYPEDEF_DATA, ctx.IDENTIFIER().getText()); 188 + validateCardinality(ctx.referenceStatement(), REFERENCE_DATA, TYPEDEF_DATA, ctx.identifier().getText());
186 - validateCardinality(ctx.statusStatement(), STATUS_DATA, TYPEDEF_DATA, ctx.IDENTIFIER().getText()); 189 + validateCardinality(ctx.statusStatement(), STATUS_DATA, TYPEDEF_DATA, ctx.identifier().getText());
187 } 190 }
188 } 191 }
......
...@@ -23,6 +23,7 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; ...@@ -23,6 +23,7 @@ import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
23 import org.onosproject.yangutils.parser.exceptions.ParserException; 23 import org.onosproject.yangutils.parser.exceptions.ParserException;
24 import org.onosproject.yangutils.parser.impl.TreeWalkListener; 24 import org.onosproject.yangutils.parser.impl.TreeWalkListener;
25 25
26 +import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
26 import static org.onosproject.yangutils.utils.YangConstructType.VERSION_DATA; 27 import static org.onosproject.yangutils.utils.YangConstructType.VERSION_DATA;
27 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; 28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
28 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage; 29 import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
...@@ -59,7 +60,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati ...@@ -59,7 +60,7 @@ import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidati
59 * submodule_header_statement : yang_version_stmt? belongs_to_stmt 60 * submodule_header_statement : yang_version_stmt? belongs_to_stmt
60 * | belongs_to_stmt yang_version_stmt? 61 * | belongs_to_stmt yang_version_stmt?
61 * ; 62 * ;
62 - * yang_version_stmt : YANG_VERSION_KEYWORD INTEGER STMTEND; 63 + * yang_version_stmt : YANG_VERSION_KEYWORD string STMTEND;
63 */ 64 */
64 65
65 /** 66 /**
...@@ -85,13 +86,13 @@ public final class VersionListener { ...@@ -85,13 +86,13 @@ public final class VersionListener {
85 GeneratedYangParser.YangVersionStatementContext ctx) { 86 GeneratedYangParser.YangVersionStatementContext ctx) {
86 87
87 // Check for stack to be non empty. 88 // Check for stack to be non empty.
88 - checkStackIsNotEmpty(listener, MISSING_HOLDER, VERSION_DATA, ctx.INTEGER().getText(), ENTRY); 89 + checkStackIsNotEmpty(listener, MISSING_HOLDER, VERSION_DATA, ctx.string().getText(), ENTRY);
89 90
90 - Integer version = Integer.valueOf(ctx.INTEGER().getText()); 91 + String version = removeQuotesAndHandleConcat(ctx.string().getText());
91 - if (!isVersionValid(version)) { 92 + if (!isVersionValid(Integer.valueOf(version))) {
92 ParserException parserException = new ParserException("YANG file error: Input version not supported"); 93 ParserException parserException = new ParserException("YANG file error: Input version not supported");
93 - parserException.setLine(ctx.INTEGER().getSymbol().getLine()); 94 + parserException.setLine(ctx.getStart().getLine());
94 - parserException.setCharPosition(ctx.INTEGER().getSymbol().getCharPositionInLine()); 95 + parserException.setCharPosition(ctx.getStart().getCharPositionInLine());
95 throw parserException; 96 throw parserException;
96 } 97 }
97 98
...@@ -110,7 +111,7 @@ public final class VersionListener { ...@@ -110,7 +111,7 @@ public final class VersionListener {
110 } 111 }
111 default: 112 default:
112 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, VERSION_DATA, 113 throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, VERSION_DATA,
113 - ctx.INTEGER().getText(), ENTRY)); 114 + ctx.string().getText(), ENTRY));
114 } 115 }
115 } 116 }
116 117
......
1 +/*
2 + * Copyright 2016 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +
17 +package org.onosproject.yangutils.parser.impl.parserutils;
18 +
19 +import org.antlr.v4.runtime.ParserRuleContext;
20 +
21 +import java.text.ParseException;
22 +import java.text.SimpleDateFormat;
23 +import java.util.regex.Pattern;
24 +import org.onosproject.yangutils.utils.YangConstructType;
25 +import org.onosproject.yangutils.parser.exceptions.ParserException;
26 +
27 +/**
28 + * It's a utility for listener.
29 + */
30 +public final class ListenerUtil {
31 + private static final Pattern IDENTIFIER_PATTERN = Pattern.compile("[a-zA-Z_][a-zA-Z0-9_.-]*");
32 + private static final String PLUS = "+";
33 + private static final int IDENTIFIER_LENGTH = 64;
34 +
35 + /**
36 + * Creates a new listener util.
37 + */
38 + private ListenerUtil() {
39 + }
40 +
41 + /**
42 + * Removes doubles quotes and concatenates if string has plus symbol.
43 + *
44 + * @param yangStringData string from yang file
45 + * @return concatenated string after removing double quotes
46 + */
47 + public static String removeQuotesAndHandleConcat(String yangStringData) {
48 +
49 + yangStringData = yangStringData.replace("\"", "");
50 + String[] tmpData = yangStringData.split(Pattern.quote(PLUS));
51 + StringBuilder builder = new StringBuilder();
52 + for (String yangString : tmpData) {
53 + builder.append(yangString);
54 + }
55 + return builder.toString();
56 + }
57 +
58 + /**
59 + * Validates identifier and returns concatenated string if string contains plus symbol.
60 + *
61 + * @param identifier string from yang file
62 + * @param yangConstruct yang construct for creating error message
63 + * @param ctx yang construct's context to get the line number and character position
64 + * @return concatenated string after removing double quotes
65 + */
66 + public static String getValidIdentifier(String identifier, YangConstructType yangConstruct, ParserRuleContext ctx) {
67 +
68 + String identifierString = removeQuotesAndHandleConcat(identifier);
69 + ParserException parserException;
70 +
71 + if (identifierString.length() > IDENTIFIER_LENGTH) {
72 + parserException = new ParserException("YANG file error : " +
73 + YangConstructType.getYangConstructType(yangConstruct) + " name " + identifierString + " is " +
74 + "greater than 64 characters.");
75 + } else if (!IDENTIFIER_PATTERN.matcher(identifierString).matches()) {
76 + parserException = new ParserException("YANG file error : " +
77 + YangConstructType.getYangConstructType(yangConstruct) + " name " + identifierString + " is not " +
78 + "valid.");
79 + } else {
80 + return identifierString;
81 + }
82 +
83 + parserException.setLine(ctx.getStart().getLine());
84 + parserException.setCharPosition(ctx.getStart().getCharPositionInLine());
85 + throw parserException;
86 + }
87 +
88 + /**
89 + * Validates the revision date.
90 + *
91 + * @param dateToValidate input revision date
92 + * @return validation result, true for success, false for failure
93 + */
94 + public static boolean isDateValid(String dateToValidate) {
95 +
96 + if (dateToValidate == null || !dateToValidate.matches("[0-9]{4}-[0-9]{2}-[0-9]{2}")) {
97 + return false;
98 + }
99 +
100 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
101 + sdf.setLenient(false);
102 +
103 + try {
104 + //if not valid, it will throw ParseException
105 + sdf.parse(dateToValidate);
106 + } catch (ParseException e) {
107 + return false;
108 + }
109 +
110 + return true;
111 + }
112 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -40,7 +40,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -40,7 +40,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
40 * "}" optsep 40 * "}" optsep
41 */ 41 */
42 42
43 - moduleStatement : MODULE_KEYWORD IDENTIFIER LEFT_CURLY_BRACE moduleBody* RIGHT_CURLY_BRACE; 43 + moduleStatement : MODULE_KEYWORD identifier LEFT_CURLY_BRACE moduleBody* RIGHT_CURLY_BRACE;
44 44
45 moduleBody : moduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements; 45 moduleBody : moduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements;
46 46
...@@ -135,7 +135,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -135,7 +135,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
135 * optsep stmtend 135 * optsep stmtend
136 */ 136 */
137 137
138 - yangVersionStatement : YANG_VERSION_KEYWORD INTEGER STMTEND; 138 + yangVersionStatement : YANG_VERSION_KEYWORD string STMTEND;
139 139
140 140
141 /** 141 /**
...@@ -148,7 +148,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -148,7 +148,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
148 * prefix-stmt = prefix-keyword sep prefix-arg-str 148 * prefix-stmt = prefix-keyword sep prefix-arg-str
149 * optsep stmtend 149 * optsep stmtend
150 */ 150 */
151 - prefixStatement : PREFIX_KEYWORD IDENTIFIER STMTEND; 151 + prefixStatement : PREFIX_KEYWORD identifier STMTEND;
152 152
153 /** 153 /**
154 * import-stmt = import-keyword sep identifier-arg-str optsep 154 * import-stmt = import-keyword sep identifier-arg-str optsep
...@@ -157,12 +157,12 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -157,12 +157,12 @@ package org.onosproject.yangutils.parser.antlrgencode;
157 * [revision-date-stmt stmtsep] 157 * [revision-date-stmt stmtsep]
158 * "}" 158 * "}"
159 */ 159 */
160 - importStatement : IMPORT_KEYWORD IDENTIFIER LEFT_CURLY_BRACE importStatementBody RIGHT_CURLY_BRACE; 160 + importStatement : IMPORT_KEYWORD identifier LEFT_CURLY_BRACE importStatementBody RIGHT_CURLY_BRACE;
161 161
162 importStatementBody : prefixStatement revisionDateStatement?; 162 importStatementBody : prefixStatement revisionDateStatement?;
163 163
164 // revision-date-stmt = revision-date-keyword sep revision-date stmtend 164 // revision-date-stmt = revision-date-keyword sep revision-date stmtend
165 - revisionDateStatement : REVISION_DATE_KEYWORD DATE_ARG STMTEND; 165 + revisionDateStatement : REVISION_DATE_KEYWORD dateArgumentString STMTEND;
166 166
167 /** 167 /**
168 * include-stmt = include-keyword sep identifier-arg-str optsep 168 * include-stmt = include-keyword sep identifier-arg-str optsep
...@@ -171,7 +171,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -171,7 +171,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
171 * [revision-date-stmt stmtsep] 171 * [revision-date-stmt stmtsep]
172 * "}") 172 * "}")
173 */ 173 */
174 - includeStatement : INCLUDE_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE revisionDateStatement? RIGHT_CURLY_BRACE); 174 + includeStatement : INCLUDE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE revisionDateStatement? RIGHT_CURLY_BRACE);
175 175
176 /** 176 /**
177 * organization-stmt = organization-keyword sep string 177 * organization-stmt = organization-keyword sep string
...@@ -196,7 +196,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -196,7 +196,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
196 * [reference-stmt stmtsep] 196 * [reference-stmt stmtsep]
197 * "}") 197 * "}")
198 */ 198 */
199 - revisionStatement : REVISION_KEYWORD DATE_ARG (STMTEND | LEFT_CURLY_BRACE revisionStatementBody RIGHT_CURLY_BRACE); 199 + revisionStatement : REVISION_KEYWORD dateArgumentString (STMTEND | LEFT_CURLY_BRACE revisionStatementBody RIGHT_CURLY_BRACE);
200 revisionStatementBody : descriptionStatement? referenceStatement?; 200 revisionStatementBody : descriptionStatement? referenceStatement?;
201 201
202 /** 202 /**
...@@ -210,7 +210,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -210,7 +210,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
210 * body-stmts 210 * body-stmts
211 * "}" optsep 211 * "}" optsep
212 */ 212 */
213 - subModuleStatement : SUBMODULE_KEYWORD IDENTIFIER LEFT_CURLY_BRACE submoduleBody* RIGHT_CURLY_BRACE; 213 + subModuleStatement : SUBMODULE_KEYWORD identifier LEFT_CURLY_BRACE submoduleBody* RIGHT_CURLY_BRACE;
214 submoduleBody : submoduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements; 214 submoduleBody : submoduleHeaderStatement linkageStatements metaStatements revisionStatements bodyStatements;
215 215
216 /** submodule-header-stmts = 216 /** submodule-header-stmts =
...@@ -229,7 +229,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -229,7 +229,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
229 * prefix-stmt stmtsep 229 * prefix-stmt stmtsep
230 * "}" 230 * "}"
231 */ 231 */
232 - belongstoStatement : BELONGS_TO_KEYWORD IDENTIFIER LEFT_CURLY_BRACE belongstoStatementBody RIGHT_CURLY_BRACE; 232 + belongstoStatement : BELONGS_TO_KEYWORD identifier LEFT_CURLY_BRACE belongstoStatementBody RIGHT_CURLY_BRACE;
233 belongstoStatementBody : prefixStatement; 233 belongstoStatementBody : prefixStatement;
234 234
235 /** 235 /**
...@@ -243,7 +243,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -243,7 +243,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
243 * [reference-stmt stmtsep] 243 * [reference-stmt stmtsep]
244 * "}") 244 * "}")
245 */ 245 */
246 - extensionStatement : EXTENSION_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE extensionBody RIGHT_CURLY_BRACE); 246 + extensionStatement : EXTENSION_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE extensionBody RIGHT_CURLY_BRACE);
247 extensionBody : argumentStatement? statusStatement? descriptionStatement? referenceStatement? 247 extensionBody : argumentStatement? statusStatement? descriptionStatement? referenceStatement?
248 | argumentStatement? statusStatement? referenceStatement? descriptionStatement? 248 | argumentStatement? statusStatement? referenceStatement? descriptionStatement?
249 | argumentStatement? descriptionStatement? statusStatement? referenceStatement? 249 | argumentStatement? descriptionStatement? statusStatement? referenceStatement?
...@@ -277,7 +277,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -277,7 +277,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
277 * [yin-element-stmt stmtsep] 277 * [yin-element-stmt stmtsep]
278 * "}") 278 * "}")
279 */ 279 */
280 - argumentStatement : ARGUMENT_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE argumentBody RIGHT_CURLY_BRACE); 280 + argumentStatement : ARGUMENT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE argumentBody RIGHT_CURLY_BRACE);
281 argumentBody : yinElementStatement?; 281 argumentBody : yinElementStatement?;
282 282
283 /** 283 /**
...@@ -297,7 +297,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -297,7 +297,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
297 * [reference-stmt stmtsep] 297 * [reference-stmt stmtsep]
298 * "}") 298 * "}")
299 */ 299 */
300 - identityStatement : IDENTITY_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE identityBody RIGHT_CURLY_BRACE); 300 + identityStatement : IDENTITY_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE identityBody RIGHT_CURLY_BRACE);
301 identityBody : baseStatement? statusStatement? descriptionStatement? referenceStatement? 301 identityBody : baseStatement? statusStatement? descriptionStatement? referenceStatement?
302 | baseStatement? statusStatement? referenceStatement? descriptionStatement? 302 | baseStatement? statusStatement? referenceStatement? descriptionStatement?
303 | baseStatement? descriptionStatement? statusStatement? referenceStatement? 303 | baseStatement? descriptionStatement? statusStatement? referenceStatement?
...@@ -410,7 +410,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -410,7 +410,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
410 * "}" 410 * "}"
411 * TODO : 0..1 occurance to be validated in listener 411 * TODO : 0..1 occurance to be validated in listener
412 */ 412 */
413 - typedefStatement : TYPEDEF_KEYWORD IDENTIFIER LEFT_CURLY_BRACE 413 + typedefStatement : TYPEDEF_KEYWORD identifier LEFT_CURLY_BRACE
414 (typeStatement | unitsStatement | defaultStatement | statusStatement | descriptionStatement | referenceStatement)* 414 (typeStatement | unitsStatement | defaultStatement | statusStatement | descriptionStatement | referenceStatement)*
415 RIGHT_CURLY_BRACE; 415 RIGHT_CURLY_BRACE;
416 416
...@@ -622,7 +622,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -622,7 +622,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
622 * "}" 622 * "}"
623 * "}") 623 * "}")
624 */ 624 */
625 - bitStatement : BIT_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE bitBodyStatement RIGHT_CURLY_BRACE); 625 + bitStatement : BIT_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE bitBodyStatement RIGHT_CURLY_BRACE);
626 626
627 bitBodyStatement : positionStatement? statusStatement? descriptionStatement? referenceStatement? 627 bitBodyStatement : positionStatement? statusStatement? descriptionStatement? referenceStatement?
628 | positionStatement? statusStatement? referenceStatement? descriptionStatement? 628 | positionStatement? statusStatement? referenceStatement? descriptionStatement?
...@@ -657,7 +657,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -657,7 +657,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
657 * position-value-arg > 657 * position-value-arg >
658 * position-value-arg = non-negative-integer-value 658 * position-value-arg = non-negative-integer-value
659 */ 659 */
660 - positionStatement : POSITION_KEYWORD INTEGER STMTEND; 660 + positionStatement : POSITION_KEYWORD string STMTEND;
661 661
662 /** 662 /**
663 * status-stmt = status-keyword sep status-arg-str stmtend 663 * status-stmt = status-keyword sep status-arg-str stmtend
...@@ -771,7 +771,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -771,7 +771,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
771 * "}") 771 * "}")
772 * TODO : 0..1 occurance to be checked in listener 772 * TODO : 0..1 occurance to be checked in listener
773 */ 773 */
774 - groupingStatement : GROUPING_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE 774 + groupingStatement : GROUPING_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE
775 (statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement 775 (statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement
776 | dataDefStatement)* RIGHT_CURLY_BRACE); 776 | dataDefStatement)* RIGHT_CURLY_BRACE);
777 777
...@@ -794,7 +794,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -794,7 +794,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
794 * "}") 794 * "}")
795 * TODO : 0..1 occurance to be checked in listener 795 * TODO : 0..1 occurance to be checked in listener
796 */ 796 */
797 - containerStatement : CONTAINER_KEYWORD IDENTIFIER 797 + containerStatement : CONTAINER_KEYWORD identifier
798 (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | presenceStatement | configStatement 798 (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | presenceStatement | configStatement
799 | statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement 799 | statusStatement | descriptionStatement | referenceStatement | typedefStatement | groupingStatement
800 | dataDefStatement)* RIGHT_CURLY_BRACE); 800 | dataDefStatement)* RIGHT_CURLY_BRACE);
...@@ -817,7 +817,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -817,7 +817,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
817 * "}" 817 * "}"
818 * TODO : 0..1 occurance to be checked in listener 818 * TODO : 0..1 occurance to be checked in listener
819 */ 819 */
820 - leafStatement : LEAF_KEYWORD IDENTIFIER LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement | unitsStatement 820 + leafStatement : LEAF_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement | unitsStatement
821 | mustStatement | defaultStatement | configStatement | mandatoryStatement | statusStatement | descriptionStatement 821 | mustStatement | defaultStatement | configStatement | mandatoryStatement | statusStatement | descriptionStatement
822 | referenceStatement)* RIGHT_CURLY_BRACE; 822 | referenceStatement)* RIGHT_CURLY_BRACE;
823 823
...@@ -840,7 +840,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -840,7 +840,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
840 * "}" 840 * "}"
841 * TODO : 0..1 occurance to be checked in listener 841 * TODO : 0..1 occurance to be checked in listener
842 */ 842 */
843 - leafListStatement : LEAF_LIST_KEYWORD IDENTIFIER LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement 843 + leafListStatement : LEAF_LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement
844 | unitsStatement | mustStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement 844 | unitsStatement | mustStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement
845 | statusStatement | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE; 845 | statusStatement | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE;
846 846
...@@ -866,7 +866,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -866,7 +866,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
866 * "}" 866 * "}"
867 * TODO : 0..1 occurance to be checked in listener 867 * TODO : 0..1 occurance to be checked in listener
868 */ 868 */
869 - listStatement : LIST_KEYWORD IDENTIFIER LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | keyStatement 869 + listStatement : LIST_KEYWORD identifier LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement | keyStatement
870 | uniqueStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement | statusStatement 870 | uniqueStatement | configStatement | minElementsStatement | maxElementsStatement | orderedByStatement | statusStatement
871 | descriptionStatement | referenceStatement | typedefStatement | groupingStatement| dataDefStatement)* RIGHT_CURLY_BRACE; 871 | descriptionStatement | referenceStatement | typedefStatement | groupingStatement| dataDefStatement)* RIGHT_CURLY_BRACE;
872 872
...@@ -897,7 +897,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -897,7 +897,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
897 * "}") 897 * "}")
898 * TODO : 0..1 occurance to be checked in listener 898 * TODO : 0..1 occurance to be checked in listener
899 */ 899 */
900 - choiceStatement : CHOICE_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | defaultStatement 900 + choiceStatement : CHOICE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | defaultStatement
901 | configStatement | mandatoryStatement | statusStatement | descriptionStatement | referenceStatement | shortCaseStatement 901 | configStatement | mandatoryStatement | statusStatement | descriptionStatement | referenceStatement | shortCaseStatement
902 | caseStatement)* RIGHT_CURLY_BRACE); 902 | caseStatement)* RIGHT_CURLY_BRACE);
903 903
...@@ -924,7 +924,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -924,7 +924,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
924 * "}") 924 * "}")
925 * TODO : 0..1 occurance to be checked in listener 925 * TODO : 0..1 occurance to be checked in listener
926 */ 926 */
927 - caseStatement : CASE_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement 927 + caseStatement : CASE_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | statusStatement
928 | descriptionStatement | referenceStatement | dataDefStatement)* RIGHT_CURLY_BRACE); 928 | descriptionStatement | referenceStatement | dataDefStatement)* RIGHT_CURLY_BRACE);
929 929
930 /** 930 /**
...@@ -1095,7 +1095,7 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -1095,7 +1095,7 @@ package org.onosproject.yangutils.parser.antlrgencode;
1095 * "}") 1095 * "}")
1096 * TODO : 0..1 occurance to be checked in listener 1096 * TODO : 0..1 occurance to be checked in listener
1097 */ 1097 */
1098 - rpcStatement : RPC_KEYWORD IDENTIFIER (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement | statusStatement | descriptionStatement 1098 + rpcStatement : RPC_KEYWORD identifier (STMTEND | LEFT_CURLY_BRACE (ifFeatureStatement | statusStatement | descriptionStatement
1099 | referenceStatement | typedefStatement | groupingStatement | inputStatement | outputStatement)* RIGHT_CURLY_BRACE); 1099 | referenceStatement | typedefStatement | groupingStatement | inputStatement | outputStatement)* RIGHT_CURLY_BRACE);
1100 1100
1101 /** 1101 /**
...@@ -1223,3 +1223,9 @@ package org.onosproject.yangutils.parser.antlrgencode; ...@@ -1223,3 +1223,9 @@ package org.onosproject.yangutils.parser.antlrgencode;
1223 string : STRING (PLUS STRING)* 1223 string : STRING (PLUS STRING)*
1224 | IDENTIFIER 1224 | IDENTIFIER
1225 | INTEGER; 1225 | INTEGER;
1226 +
1227 + identifier : STRING (PLUS STRING)*
1228 + | IDENTIFIER;
1229 +
1230 + dateArgumentString : DATE_ARG
1231 + | STRING (PLUS STRING)*;
......
...@@ -226,7 +226,7 @@ public class ContainerListenerTest { ...@@ -226,7 +226,7 @@ public class ContainerListenerTest {
226 @Test 226 @Test
227 public void processContainerInvalidIdentifier() throws IOException, ParserException { 227 public void processContainerInvalidIdentifier() throws IOException, ParserException {
228 thrown.expect(ParserException.class); 228 thrown.expect(ParserException.class);
229 - thrown.expectMessage("mismatched input '1valid' expecting IDENTIFIER"); 229 + thrown.expectMessage("YANG file error : container name 1valid is not valid.");
230 YangNode node = manager.getDataModel("src/test/resources/ContainerInvalidIdentifier.yang"); 230 YangNode node = manager.getDataModel("src/test/resources/ContainerInvalidIdentifier.yang");
231 } 231 }
232 } 232 }
......
...@@ -85,7 +85,7 @@ public class LeafListListenerTest { ...@@ -85,7 +85,7 @@ public class LeafListListenerTest {
85 @Test 85 @Test
86 public void processLeafListInvalidIdentifier() throws IOException, ParserException { 86 public void processLeafListInvalidIdentifier() throws IOException, ParserException {
87 thrown.expect(ParserException.class); 87 thrown.expect(ParserException.class);
88 - thrown.expectMessage("mismatched input '1invalid-interval' expecting IDENTIFIER"); 88 + thrown.expectMessage("YANG file error : leaf-list name 1invalid-interval is not valid.");
89 YangNode node = manager.getDataModel("src/test/resources/LeafListInvalidIdentifier.yang"); 89 YangNode node = manager.getDataModel("src/test/resources/LeafListInvalidIdentifier.yang");
90 } 90 }
91 91
......
...@@ -85,7 +85,7 @@ public class LeafListenerTest { ...@@ -85,7 +85,7 @@ public class LeafListenerTest {
85 @Test 85 @Test
86 public void processLeafInvalidIdentifier() throws IOException, ParserException { 86 public void processLeafInvalidIdentifier() throws IOException, ParserException {
87 thrown.expect(ParserException.class); 87 thrown.expect(ParserException.class);
88 - thrown.expectMessage("mismatched input '1invalid-interval' expecting IDENTIFIER"); 88 + thrown.expectMessage("YANG file error : leaf name 1invalid-interval is not valid.");
89 YangNode node = manager.getDataModel("src/test/resources/LeafInvalidIdentifier.yang"); 89 YangNode node = manager.getDataModel("src/test/resources/LeafInvalidIdentifier.yang");
90 } 90 }
91 91
......
...@@ -205,7 +205,7 @@ public class ListListenerTest { ...@@ -205,7 +205,7 @@ public class ListListenerTest {
205 @Test 205 @Test
206 public void processListInvalidIdentifier() throws IOException, ParserException { 206 public void processListInvalidIdentifier() throws IOException, ParserException {
207 thrown.expect(ParserException.class); 207 thrown.expect(ParserException.class);
208 - thrown.expectMessage("mismatched input '1valid' expecting IDENTIFIER"); 208 + thrown.expectMessage("YANG file error : list name 1valid is not valid.");
209 YangNode node = manager.getDataModel("src/test/resources/ListInvalidIdentifier.yang"); 209 YangNode node = manager.getDataModel("src/test/resources/ListInvalidIdentifier.yang");
210 } 210 }
211 } 211 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
16 16
17 package org.onosproject.yangutils.parser.impl.listeners; 17 package org.onosproject.yangutils.parser.impl.listeners;
18 18
19 +import org.junit.Rule;
19 import org.junit.Test; 20 import org.junit.Test;
21 +import org.junit.rules.ExpectedException;
20 import org.onosproject.yangutils.datamodel.YangModule; 22 import org.onosproject.yangutils.datamodel.YangModule;
21 import org.onosproject.yangutils.datamodel.YangNode; 23 import org.onosproject.yangutils.datamodel.YangNode;
22 import org.onosproject.yangutils.datamodel.YangNodeType; 24 import org.onosproject.yangutils.datamodel.YangNodeType;
...@@ -35,6 +37,9 @@ public class ModuleListenerTest { ...@@ -35,6 +37,9 @@ public class ModuleListenerTest {
35 37
36 private final YangUtilsParserManager manager = new YangUtilsParserManager(); 38 private final YangUtilsParserManager manager = new YangUtilsParserManager();
37 39
40 + @Rule
41 + public ExpectedException thrown = ExpectedException.none();
42 +
38 /** 43 /**
39 * Checks if module listener updates the data model root node. 44 * Checks if module listener updates the data model root node.
40 */ 45 */
...@@ -62,4 +67,15 @@ public class ModuleListenerTest { ...@@ -62,4 +67,15 @@ public class ModuleListenerTest {
62 67
63 YangNode node = manager.getDataModel("src/test/resources/ModuleWithInvalidIdentifier.yang"); 68 YangNode node = manager.getDataModel("src/test/resources/ModuleWithInvalidIdentifier.yang");
64 } 69 }
70 +
71 + /**
72 + * Checks whether exception is thrown when module length is greater than 64 characters.
73 + */
74 + @Test
75 + public void processModuleInvalidIdentifierLength() throws IOException, ParserException {
76 + thrown.expect(ParserException.class);
77 + thrown.expectMessage("YANG file error : module name Testttttttttttttttttttttttttttttttttttttttttttttttttttt" +
78 + "tttttttttt is greater than 64 characters.");
79 + YangNode node = manager.getDataModel("src/test/resources/ModuleInvalidIdentifierLength.yang");
80 + }
65 } 81 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -80,6 +80,45 @@ public class PositionListenerTest { ...@@ -80,6 +80,45 @@ public class PositionListenerTest {
80 } 80 }
81 81
82 /** 82 /**
83 + * Checks position value with double quotes.
84 + */
85 + @Test
86 + public void processPositionWithDoubleQuotes() throws IOException, ParserException {
87 +
88 + YangNode node = manager.getDataModel("src/test/resources/PositionWithDoubleQuotes.yang");
89 +
90 + // Check whether the data model tree returned is of type module.
91 + assertThat((node instanceof YangModule), is(true));
92 +
93 + // Check whether the node type is set properly to module.
94 + assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
95 +
96 + // Check whether the module name is set correctly.
97 + YangModule yangNode = (YangModule) node;
98 + assertThat(yangNode.getName(), is("Test"));
99 +
100 + ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
101 + YangLeaf leafInfo = leafIterator.next();
102 +
103 + assertThat(leafInfo.getLeafName(), is("mybits"));
104 + assertThat(leafInfo.getDataType().getDataTypeName(), is("bits"));
105 + assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.BITS));
106 + assertThat(((YangBits) leafInfo.getDataType().getDataTypeExtendedInfo()).getBitsName(),
107 + is("mybits"));
108 +
109 + Set<YangBit> bitSet = ((YangBits) leafInfo.getDataType().getDataTypeExtendedInfo()).getBitSet();
110 + for (YangBit tmp : bitSet) {
111 + if (tmp.getBitName().equals("disable-nagle")) {
112 + assertThat(tmp.getPosition(), is(0));
113 + } else if (tmp.getBitName().equals("auto-sense-speed")) {
114 + assertThat(tmp.getPosition(), is(1));
115 + } else if (tmp.getBitName().equals("Ten-Mb-only")) {
116 + assertThat(tmp.getPosition(), is(2));
117 + }
118 + }
119 + }
120 +
121 + /**
83 * Checks explicit value and auto generated value. 122 * Checks explicit value and auto generated value.
84 */ 123 */
85 @Test 124 @Test
......
...@@ -56,6 +56,16 @@ public class PrefixListenerTest { ...@@ -56,6 +56,16 @@ public class PrefixListenerTest {
56 } 56 }
57 57
58 /** 58 /**
59 + * Checks prefix value with double quotes.
60 + */
61 + @Test
62 + public void processPrefixWithDoubleQuotes() throws IOException, ParserException {
63 +
64 + YangNode node = manager.getDataModel("src/test/resources/PrefixWithDoubleQuotes.yang");
65 + assertThat(((YangModule) node).getPrefix(), is("On"));
66 + }
67 +
68 + /**
59 * Checks that prefix should be present just once. 69 * Checks that prefix should be present just once.
60 */ 70 */
61 @Test(expected = ParserException.class) 71 @Test(expected = ParserException.class)
......
...@@ -53,21 +53,29 @@ public class RevisionDateListenerTest { ...@@ -53,21 +53,29 @@ public class RevisionDateListenerTest {
53 } 53 }
54 54
55 /** 55 /**
56 - * Checks revision date should not be in quotes inside include. 56 + * Checks revision date in quotes inside include.
57 */ 57 */
58 - @Test(expected = ParserException.class) 58 + @Test
59 public void processRevisionDateInQuotesAtInclude() throws IOException, ParserException { 59 public void processRevisionDateInQuotesAtInclude() throws IOException, ParserException {
60 60
61 YangNode node = manager.getDataModel("src/test/resources/RevisionDateInQuotesAtInclude.yang"); 61 YangNode node = manager.getDataModel("src/test/resources/RevisionDateInQuotesAtInclude.yang");
62 + // Checks for the version value in data model tree.
63 + assertThat(((YangModule) node).getImportList().get(0).getRevision(), is("2015-02-03"));
64 + assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is("2016-02-03"));
65 + assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is("2014-02-03"));
62 } 66 }
63 67
64 /** 68 /**
65 - * Checks revision date should not be in quotes inside import. 69 + * Checks revision date in quotes inside import.
66 */ 70 */
67 - @Test(expected = ParserException.class) 71 + @Test
68 public void processRevisionDateInQuotesAtImport() throws IOException, ParserException { 72 public void processRevisionDateInQuotesAtImport() throws IOException, ParserException {
69 73
70 YangNode node = manager.getDataModel("src/test/resources/RevisionDateInQuotesAtImport.yang"); 74 YangNode node = manager.getDataModel("src/test/resources/RevisionDateInQuotesAtImport.yang");
75 + // Checks for the version value in data model tree.
76 + assertThat(((YangModule) node).getImportList().get(0).getRevision(), is("2015-02-03"));
77 + assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is("2016-02-03"));
78 + assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is("2014-02-03"));
71 } 79 }
72 80
73 /** 81 /**
......
...@@ -56,6 +56,18 @@ public class VersionListenerTest { ...@@ -56,6 +56,18 @@ public class VersionListenerTest {
56 } 56 }
57 57
58 /** 58 /**
59 + * Checks version in double quotes.
60 + */
61 + @Test
62 + public void processValidVersionWithDoubleQuotes() throws IOException, ParserException {
63 +
64 + YangNode node = manager.getDataModel("src/test/resources/ValidVersionWithDoubleQuotes.yang");
65 +
66 + // Checks for the version value in data model tree.
67 + assertThat(((YangModule) node).getVersion(), is((byte) 1));
68 + }
69 +
70 + /**
59 * Checks if version which is optional paramater is not present. 71 * Checks if version which is optional paramater is not present.
60 */ 72 */
61 @Test 73 @Test
......
1 +module Testttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt {
2 +yang-version 1;
3 +namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
4 +prefix On;
5 +}
1 +module Test {
2 + yang-version 1;
3 + namespace http://huawei.com;
4 + prefix Ant;
5 + leaf mybits {
6 + type bits {
7 + bit disable-nagle {
8 + position "0";
9 + }
10 + bit auto-sense-speed {
11 + position "1";
12 + }
13 + bit Ten-Mb-only {
14 + position "2";
15 + }
16 + }
17 + }
18 +}
1 +module Test {
2 +yang-version 1;
3 +namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
4 +prefix "On";
5 +import ietf {
6 +prefix On2;
7 +revision-date 2015-02-03;
8 +}
9 +include itut {
10 +revision-date 2016-02-03;
11 +}
12 +include sdn {
13 +revision-date 2014-02-03;
14 +}
15 +contact "Test";
16 +organization "ONOS";
17 +}
1 +module Test {
2 +yang-version "1";
3 +namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
4 +prefix On;
5 +}