blob: eb90f77c0088763e803a27ed6dd4811082f38bb0 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. Parser.jj */
2/*@egen*//*
3 * @(#)file Parser.jjt
4 * @(#)author Sun Microsystems, Inc.
5 *
6 * Copyright 1997-2003 Sun Microsystems, Inc. All Rights Reserved.
7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 *
9 * This code is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License version 2 only, as
11 * published by the Free Software Foundation. Sun designates this
12 * particular file as subject to the "Classpath" exception as provided
13 * by Sun in the LICENSE file that accompanied this code.
14 *
15 * This code is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 * version 2 for more details (a copy is included in the LICENSE file that
19 * accompanied this code).
20 *
21 * You should have received a copy of the GNU General Public License version
22 * 2 along with this work; if not, write to the Free Software Foundation,
23 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24 *
25 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
26 * CA 95054 USA or visit www.sun.com if you need additional information or
27 * have any questions.
28 *
29 */
30
31options {
32 STATIC=false;
33}
34
35
36PARSER_BEGIN(Parser)
37
38package com.sun.jmx.snmp.IPAcl;
39
40import java.io.*;
41
42public class Parser/*@bgen(jjtree)*/implements ParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
43 protected JJTParserState jjtree = new JJTParserState();
44
45/*@egen*/
46}
47
48PARSER_END(Parser)
49
50
51SKIP :
52{
53 " "
54| "\t"
55| "\n"
56| "\r"
57| <"--" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
58| <"#" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
59
60}
61
62
63
64/* RESERVED WORDS AND LITERALS */
65
66TOKEN :
67{
68 <ACCESS: "access">
69| <ACL: "acl">
70| <ASSIGN: "=">
71| <COMMUNITIES: "communities">
72| <ENTERPRISE: "enterprise">
73| <HOSTS: "hosts">
74| <LBRACE: "{">
75| <MANAGERS: "managers">
76| <RANGE: "-">
77| <RBRACE: "}">
78| <RO: "read-only">
79| <RW: "read-write">
80| <TRAP: "trap">
81| <INFORM: "inform">
82| <TRAPCOMMUNITY: "trap-community">
83| <INFORMCOMMUNITY: "inform-community">
84| <TRAPNUM: "trap-num">
85}
86
87
88
89TOKEN : /* LITERALS */
90{
91 < INTEGER_LITERAL:
92 <DECIMAL_LITERAL> (["l","L"])?
93 | <HEX_LITERAL> (["l","L"])?
94 | <OCTAL_LITERAL> (["l","L"])?
95 >
96|
97 < #DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])* >
98|
99 < #HEX_LITERAL: "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+ >
100|
101 < #OCTAL_LITERAL: "0" (["0"-"7"])* >
102}
103
104TOKEN : /* V6 LITERALS */
105{
106 < V6_ADDRESS: ((( ( (<H> ":")+ (":")?) | "::" ) (<H> ":")* (<H> | (<D> "." <D> "." <D> "." <D>))) | ("::")) | ( (<H> ":")+ ":") >
107|
108 <#H: (["0"-"9","a"-"f","A"-"F"])+ >
109|
110 <#D: (["0"-"9"])+ >
111}
112
113TOKEN : /* IDENTIFIERS */
114{
115 < IDENTIFIER: ( (<DIGIT>|<LETTER>)+ (<SEPARATOR>|<LETTER>|<DIGIT>)* (<DIGIT>|<LETTER>)+ ) | (<DIGIT>|<LETTER>)+ >
116|
117 < #LETTER: ["a"-"z","A"-"Z"] >
118|
119 < #SEPARATOR: ["-", "_"] >
120|
121 < #DIGIT: ["0"-"9"] >
122|
123 <CSTRING: "\"" (~["\""])* "\"">
124}
125
126
127
128TOKEN: /* SEPARATOR */
129{
130 < COMMA: "," >
131| < DOT: "." >
132| < MARK: "!" >
133| < MASK: "/">
134}
135
136// A file can contain several acl definitions
137//
138JDMSecurityDefs SecurityDefs() : {/*@bgen(jjtree) SecurityDefs */
139 JDMSecurityDefs jjtn000 = new JDMSecurityDefs(JJTSECURITYDEFS);
140 boolean jjtc000 = true;
141 jjtree.openNodeScope(jjtn000);
142/*@egen*/}
143{/*@bgen(jjtree) SecurityDefs */
144 try {
145/*@egen*/
146 [AclBlock()]
147 [TrapBlock()]
148 [InformBlock()]
149 <EOF>/*@bgen(jjtree)*/
150 {
151 jjtree.closeNodeScope(jjtn000, true);
152 jjtc000 = false;
153 }
154/*@egen*/
155 { return jjtn000;}/*@bgen(jjtree)*/
156 } catch (Throwable jjte000) {
157 if (jjtc000) {
158 jjtree.clearNodeScope(jjtn000);
159 jjtc000 = false;
160 } else {
161 jjtree.popNode();
162 }
163 if (jjte000 instanceof RuntimeException) {
164 throw (RuntimeException)jjte000;
165 }
166 if (jjte000 instanceof ParseException) {
167 throw (ParseException)jjte000;
168 }
169 throw (Error)jjte000;
170 } finally {
171 if (jjtc000) {
172 jjtree.closeNodeScope(jjtn000, true);
173 }
174 }
175/*@egen*/
176}
177
178void AclBlock(): {/*@bgen(jjtree) AclBlock */
179 JDMAclBlock jjtn000 = new JDMAclBlock(JJTACLBLOCK);
180 boolean jjtc000 = true;
181 jjtree.openNodeScope(jjtn000);
182/*@egen*/}
183{/*@bgen(jjtree) AclBlock */
184try {
185/*@egen*/
186"acl" "=" "{" (AclItem())+ "}"/*@bgen(jjtree)*/
187} catch (Throwable jjte000) {
188 if (jjtc000) {
189 jjtree.clearNodeScope(jjtn000);
190 jjtc000 = false;
191 } else {
192 jjtree.popNode();
193 }
194 if (jjte000 instanceof RuntimeException) {
195 throw (RuntimeException)jjte000;
196 }
197 if (jjte000 instanceof ParseException) {
198 throw (ParseException)jjte000;
199 }
200 throw (Error)jjte000;
201} finally {
202 if (jjtc000) {
203 jjtree.closeNodeScope(jjtn000, true);
204 }
205}
206/*@egen*/
207}
208
209void AclItem(): {/*@bgen(jjtree) AclItem */
210 JDMAclItem jjtn000 = new JDMAclItem(JJTACLITEM);
211 boolean jjtc000 = true;
212 jjtree.openNodeScope(jjtn000);
213/*@egen*/}
214{/*@bgen(jjtree) AclItem */
215try {
216/*@egen*/
217"{" jjtn000.com= Communities() jjtn000.access= Access() Managers() "}"/*@bgen(jjtree)*/
218} catch (Throwable jjte000) {
219 if (jjtc000) {
220 jjtree.clearNodeScope(jjtn000);
221 jjtc000 = false;
222 } else {
223 jjtree.popNode();
224 }
225 if (jjte000 instanceof RuntimeException) {
226 throw (RuntimeException)jjte000;
227 }
228 if (jjte000 instanceof ParseException) {
229 throw (ParseException)jjte000;
230 }
231 throw (Error)jjte000;
232} finally {
233 if (jjtc000) {
234 jjtree.closeNodeScope(jjtn000, true);
235 }
236}
237/*@egen*/
238}
239
240JDMCommunities Communities(): {/*@bgen(jjtree) Communities */
241 JDMCommunities jjtn000 = new JDMCommunities(JJTCOMMUNITIES);
242 boolean jjtc000 = true;
243 jjtree.openNodeScope(jjtn000);
244/*@egen*/}
245{/*@bgen(jjtree) Communities */
246try {
247/*@egen*/
248"communities" "=" Community() ( "," Community())*/*@bgen(jjtree)*/
249{
250 jjtree.closeNodeScope(jjtn000, true);
251 jjtc000 = false;
252}
253/*@egen*/
254
255{return jjtn000;}/*@bgen(jjtree)*/
256} catch (Throwable jjte000) {
257 if (jjtc000) {
258 jjtree.clearNodeScope(jjtn000);
259 jjtc000 = false;
260 } else {
261 jjtree.popNode();
262 }
263 if (jjte000 instanceof RuntimeException) {
264 throw (RuntimeException)jjte000;
265 }
266 if (jjte000 instanceof ParseException) {
267 throw (ParseException)jjte000;
268 }
269 throw (Error)jjte000;
270} finally {
271 if (jjtc000) {
272 jjtree.closeNodeScope(jjtn000, true);
273 }
274}
275/*@egen*/
276
277}
278
279void Community():
280{/*@bgen(jjtree) Community */
281 JDMCommunity jjtn000 = new JDMCommunity(JJTCOMMUNITY);
282 boolean jjtc000 = true;
283 jjtree.openNodeScope(jjtn000);
284/*@egen*/
285 Token t;
286}
287{/*@bgen(jjtree) Community */
288try {
289/*@egen*/
290t=<IDENTIFIER>/*@bgen(jjtree)*/
291 {
292 jjtree.closeNodeScope(jjtn000, true);
293 jjtc000 = false;
294 }
295/*@egen*/ {jjtn000.communityString= t.image;}/*@bgen(jjtree)*/
296} finally {
297 if (jjtc000) {
298 jjtree.closeNodeScope(jjtn000, true);
299 }
300}
301/*@egen*/
302}
303
304JDMAccess Access(): {/*@bgen(jjtree) Access */
305 JDMAccess jjtn000 = new JDMAccess(JJTACCESS);
306 boolean jjtc000 = true;
307 jjtree.openNodeScope(jjtn000);
308/*@egen*/}
309{/*@bgen(jjtree) Access */
310try {
311/*@egen*/
312"access" "=" ( <RO> {jjtn000.access= RO;}
313 |
314 <RW> {jjtn000.access= RW;}
315 )/*@bgen(jjtree)*/
316{
317 jjtree.closeNodeScope(jjtn000, true);
318 jjtc000 = false;
319}
320/*@egen*/
321{return jjtn000;}/*@bgen(jjtree)*/
322} finally {
323 if (jjtc000) {
324 jjtree.closeNodeScope(jjtn000, true);
325 }
326}
327/*@egen*/
328}
329
330
331void Managers() : {/*@bgen(jjtree) Managers */
332 JDMManagers jjtn000 = new JDMManagers(JJTMANAGERS);
333 boolean jjtc000 = true;
334 jjtree.openNodeScope(jjtn000);
335/*@egen*/ }
336{/*@bgen(jjtree) Managers */
337try {
338/*@egen*/
339"managers" "=" Host() ( "," Host())*/*@bgen(jjtree)*/
340} catch (Throwable jjte000) {
341 if (jjtc000) {
342 jjtree.clearNodeScope(jjtn000);
343 jjtc000 = false;
344 } else {
345 jjtree.popNode();
346 }
347 if (jjte000 instanceof RuntimeException) {
348 throw (RuntimeException)jjte000;
349 }
350 if (jjte000 instanceof ParseException) {
351 throw (ParseException)jjte000;
352 }
353 throw (Error)jjte000;
354} finally {
355 if (jjtc000) {
356 jjtree.closeNodeScope(jjtn000, true);
357 }
358}
359/*@egen*/
360}
361
362void Host() :
363{/*@bgen(jjtree) Host */
364 JDMHost jjtn000 = new JDMHost(JJTHOST);
365 boolean jjtc000 = true;
366 jjtree.openNodeScope(jjtn000);
367/*@egen*/
368 Token t;
369}
370{/*@bgen(jjtree) Host */
371try {
372/*@egen*/
373HostName()
374|
375LOOKAHEAD(<INTEGER_LITERAL> ( "." <INTEGER_LITERAL> )* "/" <INTEGER_LITERAL>)
376NetMask()
377|
378LOOKAHEAD(<V6_ADDRESS> "/" <INTEGER_LITERAL>)
379NetMaskV6()
380|
381LOOKAHEAD(<INTEGER_LITERAL> ".")
382IpAddress()
383|
384IpV6Address()
385|
386IpMask()/*@bgen(jjtree)*/
387} catch (Throwable jjte000) {
388 if (jjtc000) {
389 jjtree.clearNodeScope(jjtn000);
390 jjtc000 = false;
391 } else {
392 jjtree.popNode();
393 }
394 if (jjte000 instanceof RuntimeException) {
395 throw (RuntimeException)jjte000;
396 }
397 if (jjte000 instanceof ParseException) {
398 throw (ParseException)jjte000;
399 }
400 throw (Error)jjte000;
401} finally {
402 if (jjtc000) {
403 jjtree.closeNodeScope(jjtn000, true);
404 }
405}
406/*@egen*/
407}
408
409void HostName():
410{/*@bgen(jjtree) HostName */
411 JDMHostName jjtn000 = new JDMHostName(JJTHOSTNAME);
412 boolean jjtc000 = true;
413 jjtree.openNodeScope(jjtn000);
414/*@egen*/
415 Token t;
416}
417{/*@bgen(jjtree) HostName */
418 try {
419/*@egen*/
420 t=<IDENTIFIER> { jjtn000.name.append(t.image); }
421(
422"." t=<IDENTIFIER>
423 {jjtn000.name.append( "." + t.image); }
424)*/*@bgen(jjtree)*/
425 } finally {
426 if (jjtc000) {
427 jjtree.closeNodeScope(jjtn000, true);
428 }
429 }
430/*@egen*/
431
432}
433
434void IpAddress():
435{/*@bgen(jjtree) IpAddress */
436JDMIpAddress jjtn000 = new JDMIpAddress(JJTIPADDRESS);
437boolean jjtc000 = true;
438jjtree.openNodeScope(jjtn000);
439/*@egen*/
440Token t;
441}
442{/*@bgen(jjtree) IpAddress */
443try {
444/*@egen*/
445
446t= <INTEGER_LITERAL>
447 {jjtn000.address.append(t.image); }
448(
449"." t= <INTEGER_LITERAL>
450 {jjtn000.address.append( "." + t.image); }
451)*/*@bgen(jjtree)*/
452} finally {
453 if (jjtc000) {
454 jjtree.closeNodeScope(jjtn000, true);
455 }
456}
457/*@egen*/
458
459}
460
461void IpV6Address():
462{/*@bgen(jjtree) IpV6Address */
463JDMIpV6Address jjtn000 = new JDMIpV6Address(JJTIPV6ADDRESS);
464boolean jjtc000 = true;
465jjtree.openNodeScope(jjtn000);
466/*@egen*/
467Token t;
468}
469{/*@bgen(jjtree) IpV6Address */
470try {
471/*@egen*/
472
473t= <V6_ADDRESS>/*@bgen(jjtree)*/
474 {
475 jjtree.closeNodeScope(jjtn000, true);
476 jjtc000 = false;
477 }
478/*@egen*/
479 {jjtn000.address.append(t.image); }/*@bgen(jjtree)*/
480} finally {
481 if (jjtc000) {
482 jjtree.closeNodeScope(jjtn000, true);
483 }
484}
485/*@egen*/
486}
487
488void IpMask():
489{/*@bgen(jjtree) IpMask */
490JDMIpMask jjtn000 = new JDMIpMask(JJTIPMASK);
491boolean jjtc000 = true;
492jjtree.openNodeScope(jjtn000);
493/*@egen*/
494Token t;
495}
496{/*@bgen(jjtree) IpMask */
497try {
498/*@egen*/
499
500t= <INTEGER_LITERAL>
501 {jjtn000.address.append(t.image); }
502(
503"!" t= <INTEGER_LITERAL>
504 {jjtn000.address.append( "." + t.image); }
505)*/*@bgen(jjtree)*/
506} finally {
507 if (jjtc000) {
508 jjtree.closeNodeScope(jjtn000, true);
509 }
510}
511/*@egen*/
512}
513
514void NetMask():
515{/*@bgen(jjtree) NetMask */
516JDMNetMask jjtn000 = new JDMNetMask(JJTNETMASK);
517boolean jjtc000 = true;
518jjtree.openNodeScope(jjtn000);
519/*@egen*/
520Token t;
521}
522{/*@bgen(jjtree) NetMask */
523try {
524/*@egen*/
525
526t= <INTEGER_LITERAL>
527 {jjtn000.address.append(t.image); }
528(
529"." t= <INTEGER_LITERAL>
530 {jjtn000.address.append( "." + t.image); }
531)* "/" t= <INTEGER_LITERAL>/*@bgen(jjtree)*/
532 {
533 jjtree.closeNodeScope(jjtn000, true);
534 jjtc000 = false;
535 }
536/*@egen*/ {jjtn000.mask = t.image; }/*@bgen(jjtree)*/
537} finally {
538 if (jjtc000) {
539 jjtree.closeNodeScope(jjtn000, true);
540 }
541}
542/*@egen*/
543}
544
545void NetMaskV6():
546{/*@bgen(jjtree) NetMaskV6 */
547JDMNetMaskV6 jjtn000 = new JDMNetMaskV6(JJTNETMASKV6);
548boolean jjtc000 = true;
549jjtree.openNodeScope(jjtn000);
550/*@egen*/
551Token t;
552}
553{/*@bgen(jjtree) NetMaskV6 */
554try {
555/*@egen*/
556
557t= <V6_ADDRESS>
558 {jjtn000.address.append(t.image); }
559
560"/" t= <INTEGER_LITERAL>/*@bgen(jjtree)*/
561 {
562 jjtree.closeNodeScope(jjtn000, true);
563 jjtc000 = false;
564 }
565/*@egen*/ {jjtn000.mask = t.image; }/*@bgen(jjtree)*/
566} finally {
567 if (jjtc000) {
568 jjtree.closeNodeScope(jjtn000, true);
569 }
570}
571/*@egen*/
572}
573
574void TrapBlock(): {/*@bgen(jjtree) TrapBlock */
575 JDMTrapBlock jjtn000 = new JDMTrapBlock(JJTTRAPBLOCK);
576 boolean jjtc000 = true;
577 jjtree.openNodeScope(jjtn000);
578/*@egen*/ }
579{/*@bgen(jjtree) TrapBlock */
580try {
581/*@egen*/
582"trap" "=" "{" (TrapItem())* "}"/*@bgen(jjtree)*/
583} catch (Throwable jjte000) {
584 if (jjtc000) {
585 jjtree.clearNodeScope(jjtn000);
586 jjtc000 = false;
587 } else {
588 jjtree.popNode();
589 }
590 if (jjte000 instanceof RuntimeException) {
591 throw (RuntimeException)jjte000;
592 }
593 if (jjte000 instanceof ParseException) {
594 throw (ParseException)jjte000;
595 }
596 throw (Error)jjte000;
597} finally {
598 if (jjtc000) {
599 jjtree.closeNodeScope(jjtn000, true);
600 }
601}
602/*@egen*/
603}
604
605void TrapItem(): {/*@bgen(jjtree) TrapItem */
606 JDMTrapItem jjtn000 = new JDMTrapItem(JJTTRAPITEM);
607 boolean jjtc000 = true;
608 jjtree.openNodeScope(jjtn000);
609/*@egen*/ }
610{/*@bgen(jjtree) TrapItem */
611try {
612/*@egen*/
613"{" jjtn000.comm= TrapCommunity() TrapInterestedHost() (Enterprise())* "}"/*@bgen(jjtree)*/
614} catch (Throwable jjte000) {
615 if (jjtc000) {
616 jjtree.clearNodeScope(jjtn000);
617 jjtc000 = false;
618 } else {
619 jjtree.popNode();
620 }
621 if (jjte000 instanceof RuntimeException) {
622 throw (RuntimeException)jjte000;
623 }
624 if (jjte000 instanceof ParseException) {
625 throw (ParseException)jjte000;
626 }
627 throw (Error)jjte000;
628} finally {
629 if (jjtc000) {
630 jjtree.closeNodeScope(jjtn000, true);
631 }
632}
633/*@egen*/
634}
635
636JDMTrapCommunity TrapCommunity():
637{/*@bgen(jjtree) TrapCommunity */
638 JDMTrapCommunity jjtn000 = new JDMTrapCommunity(JJTTRAPCOMMUNITY);
639 boolean jjtc000 = true;
640 jjtree.openNodeScope(jjtn000);
641/*@egen*/
642 Token t;
643}
644{/*@bgen(jjtree) TrapCommunity */
645try {
646/*@egen*/
647"trap-community" "=" t=<IDENTIFIER>/*@bgen(jjtree)*/
648 {
649 jjtree.closeNodeScope(jjtn000, true);
650 jjtc000 = false;
651 }
652/*@egen*/ { jjtn000.community= t.image; return jjtn000; }/*@bgen(jjtree)*/
653} finally {
654 if (jjtc000) {
655 jjtree.closeNodeScope(jjtn000, true);
656 }
657}
658/*@egen*/
659}
660
661void TrapInterestedHost(): {/*@bgen(jjtree) TrapInterestedHost */
662 JDMTrapInterestedHost jjtn000 = new JDMTrapInterestedHost(JJTTRAPINTERESTEDHOST);
663 boolean jjtc000 = true;
664 jjtree.openNodeScope(jjtn000);
665/*@egen*/ }
666{/*@bgen(jjtree) TrapInterestedHost */
667try {
668/*@egen*/
669"hosts" "=" HostTrap() ("," HostTrap())*/*@bgen(jjtree)*/
670} catch (Throwable jjte000) {
671 if (jjtc000) {
672 jjtree.clearNodeScope(jjtn000);
673 jjtc000 = false;
674 } else {
675 jjtree.popNode();
676 }
677 if (jjte000 instanceof RuntimeException) {
678 throw (RuntimeException)jjte000;
679 }
680 if (jjte000 instanceof ParseException) {
681 throw (ParseException)jjte000;
682 }
683 throw (Error)jjte000;
684} finally {
685 if (jjtc000) {
686 jjtree.closeNodeScope(jjtn000, true);
687 }
688}
689/*@egen*/
690}
691
692void HostTrap() :
693{/*@bgen(jjtree) HostTrap */
694 JDMHostTrap jjtn000 = new JDMHostTrap(JJTHOSTTRAP);
695 boolean jjtc000 = true;
696 jjtree.openNodeScope(jjtn000);
697/*@egen*/
698 Token t;
699}
700{/*@bgen(jjtree) HostTrap */
701try {
702/*@egen*/
703HostName()
704|
705IpAddress()
706|
707IpV6Address()/*@bgen(jjtree)*/
708} catch (Throwable jjte000) {
709 if (jjtc000) {
710 jjtree.clearNodeScope(jjtn000);
711 jjtc000 = false;
712 } else {
713 jjtree.popNode();
714 }
715 if (jjte000 instanceof RuntimeException) {
716 throw (RuntimeException)jjte000;
717 }
718 if (jjte000 instanceof ParseException) {
719 throw (ParseException)jjte000;
720 }
721 throw (Error)jjte000;
722} finally {
723 if (jjtc000) {
724 jjtree.closeNodeScope(jjtn000, true);
725 }
726}
727/*@egen*/
728}
729
730void Enterprise():
731{/*@bgen(jjtree) Enterprise */
732 JDMEnterprise jjtn000 = new JDMEnterprise(JJTENTERPRISE);
733 boolean jjtc000 = true;
734 jjtree.openNodeScope(jjtn000);
735/*@egen*/
736 Token t;
737}
738{/*@bgen(jjtree) Enterprise */
739try {
740/*@egen*/
741"{"
742"enterprise" "=" t=<CSTRING> {jjtn000.enterprise= t.image;}
743
744"trap-num" "=" TrapNum() ("," TrapNum())*
745
746"}"/*@bgen(jjtree)*/
747} catch (Throwable jjte000) {
748 if (jjtc000) {
749 jjtree.clearNodeScope(jjtn000);
750 jjtc000 = false;
751 } else {
752 jjtree.popNode();
753 }
754 if (jjte000 instanceof RuntimeException) {
755 throw (RuntimeException)jjte000;
756 }
757 if (jjte000 instanceof ParseException) {
758 throw (ParseException)jjte000;
759 }
760 throw (Error)jjte000;
761} finally {
762 if (jjtc000) {
763 jjtree.closeNodeScope(jjtn000, true);
764 }
765}
766/*@egen*/
767}
768
769void TrapNum():
770{/*@bgen(jjtree) TrapNum */
771 JDMTrapNum jjtn000 = new JDMTrapNum(JJTTRAPNUM);
772 boolean jjtc000 = true;
773 jjtree.openNodeScope(jjtn000);
774/*@egen*/
775 Token t;
776}
777{/*@bgen(jjtree) TrapNum */
778 try {
779/*@egen*/
780 t=<INTEGER_LITERAL> {jjtn000.low= Integer.parseInt(t.image);}
781[
782 "-" t=<INTEGER_LITERAL> {jjtn000.high= Integer.parseInt(t.image);}
783]/*@bgen(jjtree)*/
784 } finally {
785 if (jjtc000) {
786 jjtree.closeNodeScope(jjtn000, true);
787 }
788 }
789/*@egen*/
790}
791
792
793void InformBlock(): {/*@bgen(jjtree) InformBlock */
794 JDMInformBlock jjtn000 = new JDMInformBlock(JJTINFORMBLOCK);
795 boolean jjtc000 = true;
796 jjtree.openNodeScope(jjtn000);
797/*@egen*/ }
798{/*@bgen(jjtree) InformBlock */
799try {
800/*@egen*/
801"inform" "=" "{" (InformItem())* "}"/*@bgen(jjtree)*/
802} catch (Throwable jjte000) {
803 if (jjtc000) {
804 jjtree.clearNodeScope(jjtn000);
805 jjtc000 = false;
806 } else {
807 jjtree.popNode();
808 }
809 if (jjte000 instanceof RuntimeException) {
810 throw (RuntimeException)jjte000;
811 }
812 if (jjte000 instanceof ParseException) {
813 throw (ParseException)jjte000;
814 }
815 throw (Error)jjte000;
816} finally {
817 if (jjtc000) {
818 jjtree.closeNodeScope(jjtn000, true);
819 }
820}
821/*@egen*/
822}
823
824void InformItem(): {/*@bgen(jjtree) InformItem */
825 JDMInformItem jjtn000 = new JDMInformItem(JJTINFORMITEM);
826 boolean jjtc000 = true;
827 jjtree.openNodeScope(jjtn000);
828/*@egen*/ }
829{/*@bgen(jjtree) InformItem */
830try {
831/*@egen*/
832"{" jjtn000.comm= InformCommunity() InformInterestedHost() "}"/*@bgen(jjtree)*/
833} catch (Throwable jjte000) {
834 if (jjtc000) {
835 jjtree.clearNodeScope(jjtn000);
836 jjtc000 = false;
837 } else {
838 jjtree.popNode();
839 }
840 if (jjte000 instanceof RuntimeException) {
841 throw (RuntimeException)jjte000;
842 }
843 if (jjte000 instanceof ParseException) {
844 throw (ParseException)jjte000;
845 }
846 throw (Error)jjte000;
847} finally {
848 if (jjtc000) {
849 jjtree.closeNodeScope(jjtn000, true);
850 }
851}
852/*@egen*/
853}
854
855JDMInformCommunity InformCommunity():
856{/*@bgen(jjtree) InformCommunity */
857 JDMInformCommunity jjtn000 = new JDMInformCommunity(JJTINFORMCOMMUNITY);
858 boolean jjtc000 = true;
859 jjtree.openNodeScope(jjtn000);
860/*@egen*/
861 Token t;
862}
863{/*@bgen(jjtree) InformCommunity */
864try {
865/*@egen*/
866"inform-community" "=" t=<IDENTIFIER>/*@bgen(jjtree)*/
867 {
868 jjtree.closeNodeScope(jjtn000, true);
869 jjtc000 = false;
870 }
871/*@egen*/ { jjtn000.community= t.image; return jjtn000; }/*@bgen(jjtree)*/
872} finally {
873 if (jjtc000) {
874 jjtree.closeNodeScope(jjtn000, true);
875 }
876}
877/*@egen*/
878}
879
880void InformInterestedHost(): {/*@bgen(jjtree) InformInterestedHost */
881 JDMInformInterestedHost jjtn000 = new JDMInformInterestedHost(JJTINFORMINTERESTEDHOST);
882 boolean jjtc000 = true;
883 jjtree.openNodeScope(jjtn000);
884/*@egen*/ }
885{/*@bgen(jjtree) InformInterestedHost */
886try {
887/*@egen*/
888"hosts" "=" HostInform() ("," HostInform())*/*@bgen(jjtree)*/
889} catch (Throwable jjte000) {
890 if (jjtc000) {
891 jjtree.clearNodeScope(jjtn000);
892 jjtc000 = false;
893 } else {
894 jjtree.popNode();
895 }
896 if (jjte000 instanceof RuntimeException) {
897 throw (RuntimeException)jjte000;
898 }
899 if (jjte000 instanceof ParseException) {
900 throw (ParseException)jjte000;
901 }
902 throw (Error)jjte000;
903} finally {
904 if (jjtc000) {
905 jjtree.closeNodeScope(jjtn000, true);
906 }
907}
908/*@egen*/
909}
910
911void HostInform() :
912{/*@bgen(jjtree) HostInform */
913 JDMHostInform jjtn000 = new JDMHostInform(JJTHOSTINFORM);
914 boolean jjtc000 = true;
915 jjtree.openNodeScope(jjtn000);
916/*@egen*/
917 Token t;
918}
919{/*@bgen(jjtree) HostInform */
920try {
921/*@egen*/
922HostName()
923|
924IpAddress()
925|
926IpV6Address()/*@bgen(jjtree)*/
927} catch (Throwable jjte000) {
928 if (jjtc000) {
929 jjtree.clearNodeScope(jjtn000);
930 jjtc000 = false;
931 } else {
932 jjtree.popNode();
933 }
934 if (jjte000 instanceof RuntimeException) {
935 throw (RuntimeException)jjte000;
936 }
937 if (jjte000 instanceof ParseException) {
938 throw (ParseException)jjte000;
939 }
940 throw (Error)jjte000;
941} finally {
942 if (jjtc000) {
943 jjtree.closeNodeScope(jjtn000, true);
944 }
945}
946/*@egen*/
947}
948