src/jdk.snmp/share/classes/com/sun/jmx/snmp/IPAcl/Parser.java

Print this page
rev 10521 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>


 362   final public void HostName() throws ParseException {
 363  /*@bgen(jjtree) HostName */
 364   JDMHostName jjtn000 = new JDMHostName(JJTHOSTNAME);
 365   boolean jjtc000 = true;
 366   jjtree.openNodeScope(jjtn000);Token t;
 367     try {
 368       t = jj_consume_token(IDENTIFIER);
 369                    jjtn000.name.append(t.image);
 370       label_4:
 371       while (true) {
 372         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 373         case DOT:
 374           ;
 375           break;
 376         default:
 377           jj_la1[9] = jj_gen;
 378           break label_4;
 379         }
 380         jj_consume_token(DOT);
 381         t = jj_consume_token(IDENTIFIER);
 382    jjtn000.name.append( "." + t.image);
 383       }
 384     } finally {
 385     if (jjtc000) {
 386       jjtree.closeNodeScope(jjtn000, true);
 387     }
 388     }
 389   }
 390 
 391   final public void IpAddress() throws ParseException {
 392  /*@bgen(jjtree) IpAddress */
 393 JDMIpAddress jjtn000 = new JDMIpAddress(JJTIPADDRESS);
 394 boolean jjtc000 = true;
 395 jjtree.openNodeScope(jjtn000);Token t;
 396     try {
 397       t = jj_consume_token(INTEGER_LITERAL);
 398    jjtn000.address.append(t.image);
 399       label_5:
 400       while (true) {
 401         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 402         case DOT:
 403           ;
 404           break;
 405         default:
 406           jj_la1[10] = jj_gen;
 407           break label_5;
 408         }
 409         jj_consume_token(DOT);
 410         t = jj_consume_token(INTEGER_LITERAL);
 411    jjtn000.address.append( "." + t.image);
 412       }
 413     } finally {
 414   if (jjtc000) {
 415     jjtree.closeNodeScope(jjtn000, true);
 416   }
 417     }
 418   }
 419 
 420   final public void IpV6Address() throws ParseException {
 421  /*@bgen(jjtree) IpV6Address */
 422 JDMIpV6Address jjtn000 = new JDMIpV6Address(JJTIPV6ADDRESS);
 423 boolean jjtc000 = true;
 424 jjtree.openNodeScope(jjtn000);Token t;
 425     try {
 426       t = jj_consume_token(V6_ADDRESS);
 427     jjtree.closeNodeScope(jjtn000, true);
 428     jjtc000 = false;
 429    jjtn000.address.append(t.image);
 430     } finally {
 431   if (jjtc000) {


 437   final public void IpMask() throws ParseException {
 438  /*@bgen(jjtree) IpMask */
 439 JDMIpMask jjtn000 = new JDMIpMask(JJTIPMASK);
 440 boolean jjtc000 = true;
 441 jjtree.openNodeScope(jjtn000);Token t;
 442     try {
 443       t = jj_consume_token(INTEGER_LITERAL);
 444    jjtn000.address.append(t.image);
 445       label_6:
 446       while (true) {
 447         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 448         case MARK:
 449           ;
 450           break;
 451         default:
 452           jj_la1[11] = jj_gen;
 453           break label_6;
 454         }
 455         jj_consume_token(MARK);
 456         t = jj_consume_token(INTEGER_LITERAL);
 457    jjtn000.address.append( "." + t.image);
 458       }
 459     } finally {
 460   if (jjtc000) {
 461     jjtree.closeNodeScope(jjtn000, true);
 462   }
 463     }
 464   }
 465 
 466   final public void NetMask() throws ParseException {
 467  /*@bgen(jjtree) NetMask */
 468 JDMNetMask jjtn000 = new JDMNetMask(JJTNETMASK);
 469 boolean jjtc000 = true;
 470 jjtree.openNodeScope(jjtn000);Token t;
 471     try {
 472       t = jj_consume_token(INTEGER_LITERAL);
 473    jjtn000.address.append(t.image);
 474       label_7:
 475       while (true) {
 476         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 477         case DOT:
 478           ;
 479           break;
 480         default:
 481           jj_la1[12] = jj_gen;
 482           break label_7;
 483         }
 484         jj_consume_token(DOT);
 485         t = jj_consume_token(INTEGER_LITERAL);
 486    jjtn000.address.append( "." + t.image);
 487       }
 488       jj_consume_token(MASK);
 489       t = jj_consume_token(INTEGER_LITERAL);
 490                               jjtree.closeNodeScope(jjtn000, true);
 491                               jjtc000 = false;
 492                              jjtn000.mask = t.image;
 493     } finally {
 494   if (jjtc000) {
 495     jjtree.closeNodeScope(jjtn000, true);
 496   }
 497     }
 498   }
 499 
 500   final public void NetMaskV6() throws ParseException {
 501  /*@bgen(jjtree) NetMaskV6 */
 502 JDMNetMaskV6 jjtn000 = new JDMNetMaskV6(JJTNETMASKV6);
 503 boolean jjtc000 = true;
 504 jjtree.openNodeScope(jjtn000);Token t;
 505     try {
 506       t = jj_consume_token(V6_ADDRESS);




 362   final public void HostName() throws ParseException {
 363  /*@bgen(jjtree) HostName */
 364   JDMHostName jjtn000 = new JDMHostName(JJTHOSTNAME);
 365   boolean jjtc000 = true;
 366   jjtree.openNodeScope(jjtn000);Token t;
 367     try {
 368       t = jj_consume_token(IDENTIFIER);
 369                    jjtn000.name.append(t.image);
 370       label_4:
 371       while (true) {
 372         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 373         case DOT:
 374           ;
 375           break;
 376         default:
 377           jj_la1[9] = jj_gen;
 378           break label_4;
 379         }
 380         jj_consume_token(DOT);
 381         t = jj_consume_token(IDENTIFIER);
 382    jjtn000.name.append('.').append(t.image);
 383       }
 384     } finally {
 385     if (jjtc000) {
 386       jjtree.closeNodeScope(jjtn000, true);
 387     }
 388     }
 389   }
 390 
 391   final public void IpAddress() throws ParseException {
 392  /*@bgen(jjtree) IpAddress */
 393 JDMIpAddress jjtn000 = new JDMIpAddress(JJTIPADDRESS);
 394 boolean jjtc000 = true;
 395 jjtree.openNodeScope(jjtn000);Token t;
 396     try {
 397       t = jj_consume_token(INTEGER_LITERAL);
 398    jjtn000.address.append(t.image);
 399       label_5:
 400       while (true) {
 401         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 402         case DOT:
 403           ;
 404           break;
 405         default:
 406           jj_la1[10] = jj_gen;
 407           break label_5;
 408         }
 409         jj_consume_token(DOT);
 410         t = jj_consume_token(INTEGER_LITERAL);
 411    jjtn000.address.append('.').append(t.image);
 412       }
 413     } finally {
 414   if (jjtc000) {
 415     jjtree.closeNodeScope(jjtn000, true);
 416   }
 417     }
 418   }
 419 
 420   final public void IpV6Address() throws ParseException {
 421  /*@bgen(jjtree) IpV6Address */
 422 JDMIpV6Address jjtn000 = new JDMIpV6Address(JJTIPV6ADDRESS);
 423 boolean jjtc000 = true;
 424 jjtree.openNodeScope(jjtn000);Token t;
 425     try {
 426       t = jj_consume_token(V6_ADDRESS);
 427     jjtree.closeNodeScope(jjtn000, true);
 428     jjtc000 = false;
 429    jjtn000.address.append(t.image);
 430     } finally {
 431   if (jjtc000) {


 437   final public void IpMask() throws ParseException {
 438  /*@bgen(jjtree) IpMask */
 439 JDMIpMask jjtn000 = new JDMIpMask(JJTIPMASK);
 440 boolean jjtc000 = true;
 441 jjtree.openNodeScope(jjtn000);Token t;
 442     try {
 443       t = jj_consume_token(INTEGER_LITERAL);
 444    jjtn000.address.append(t.image);
 445       label_6:
 446       while (true) {
 447         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 448         case MARK:
 449           ;
 450           break;
 451         default:
 452           jj_la1[11] = jj_gen;
 453           break label_6;
 454         }
 455         jj_consume_token(MARK);
 456         t = jj_consume_token(INTEGER_LITERAL);
 457    jjtn000.address.append('.').append(t.image);
 458       }
 459     } finally {
 460   if (jjtc000) {
 461     jjtree.closeNodeScope(jjtn000, true);
 462   }
 463     }
 464   }
 465 
 466   final public void NetMask() throws ParseException {
 467  /*@bgen(jjtree) NetMask */
 468 JDMNetMask jjtn000 = new JDMNetMask(JJTNETMASK);
 469 boolean jjtc000 = true;
 470 jjtree.openNodeScope(jjtn000);Token t;
 471     try {
 472       t = jj_consume_token(INTEGER_LITERAL);
 473    jjtn000.address.append(t.image);
 474       label_7:
 475       while (true) {
 476         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 477         case DOT:
 478           ;
 479           break;
 480         default:
 481           jj_la1[12] = jj_gen;
 482           break label_7;
 483         }
 484         jj_consume_token(DOT);
 485         t = jj_consume_token(INTEGER_LITERAL);
 486    jjtn000.address.append('.').append(t.image);
 487       }
 488       jj_consume_token(MASK);
 489       t = jj_consume_token(INTEGER_LITERAL);
 490                               jjtree.closeNodeScope(jjtn000, true);
 491                               jjtc000 = false;
 492                              jjtn000.mask = t.image;
 493     } finally {
 494   if (jjtc000) {
 495     jjtree.closeNodeScope(jjtn000, true);
 496   }
 497     }
 498   }
 499 
 500   final public void NetMaskV6() throws ParseException {
 501  /*@bgen(jjtree) NetMaskV6 */
 502 JDMNetMaskV6 jjtn000 = new JDMNetMaskV6(JJTNETMASKV6);
 503 boolean jjtc000 = true;
 504 jjtree.openNodeScope(jjtn000);Token t;
 505     try {
 506       t = jj_consume_token(V6_ADDRESS);