1 3 25 26 package org.apache.webdav.cmd; 27 28 import java.io.*; 29 import java.util.*; 30 import org.apache.webdav.lib.PropertyName; 31 import org.apache.webdav.lib.util.QName; 32 33 34 import antlr.TokenBuffer; 35 import antlr.TokenStreamException; 36 import antlr.TokenStreamIOException; 37 import antlr.ANTLRException; 38 import antlr.LLkParser; 39 import antlr.Token; 40 import antlr.TokenStream; 41 import antlr.RecognitionException; 42 import antlr.NoViableAltException; 43 import antlr.MismatchedTokenException; 44 import antlr.SemanticException; 45 import antlr.ParserSharedInputState; 46 import antlr.collections.impl.BitSet; 47 48 53 public class ClientParser extends antlr.LLkParser implements SlideTokenTypes 54 { 55 56 57 59 62 protected Client client; 63 64 66 71 void setClient(Client client) { 72 this.client = client; 73 } 74 75 76 82 private String text(Token token) { 83 return (token != null) ? token.getText() : null; 84 } 85 86 87 93 private QName qname(Token token) { 94 if (token == null) return null; 95 96 String tmp = token.getText(); 97 if (!tmp.startsWith("<")) { 98 return new PropertyName("DAV:", text(token)); 99 } 100 String namespaceURI = tmp.substring(tmp.indexOf('"') + 1, 101 tmp.lastIndexOf('"')); 102 String localName = tmp.substring(1, tmp.indexOf(' ')); 103 104 return new QName(namespaceURI, localName); 105 } 106 107 108 114 private PropertyName pname(Token token) { 115 if (token == null) return null; 116 117 String tmp = token.getText(); 118 if (!tmp.startsWith("<")) { 119 return new PropertyName("DAV:", text(token)); 120 } 121 122 String namespaceURI = tmp.substring(tmp.indexOf('"') + 1, 123 tmp.lastIndexOf('"')); 124 String localName = tmp.substring(1, tmp.indexOf(' ')); 125 126 return new PropertyName(namespaceURI, localName); 127 } 128 129 130 135 private void printUsage(String command) 136 throws RecognitionException, TokenStreamException { 137 138 client.printUsage(command); 139 skip(); } 141 142 143 protected ClientParser(TokenBuffer tokenBuf, int k) { 144 super(tokenBuf,k); 145 tokenNames = _tokenNames; 146 } 147 148 public ClientParser(TokenBuffer tokenBuf) { 149 this(tokenBuf,2); 150 } 151 152 protected ClientParser(TokenStream lexer, int k) { 153 super(lexer,k); 154 tokenNames = _tokenNames; 155 } 156 157 public ClientParser(TokenStream lexer) { 158 this(lexer,2); 159 } 160 161 public ClientParser(ParserSharedInputState state) { 162 super(state,2); 163 tokenNames = _tokenNames; 164 } 165 166 public final void commands() throws RecognitionException, TokenStreamException { 167 168 169 try { 171 client.prompt(); 172 173 { 174 int _cnt3=0; 175 _loop3: 176 do { 177 if ((_tokenSet_0.member(LA(1)))) { 178 command(); 179 180 client.prompt(); 181 182 } 183 else { 184 if ( _cnt3>=1 ) { break _loop3; } else {throw new NoViableAltException(LT(1), getFilename());} 185 } 186 187 _cnt3++; 188 } while (true); 189 } 190 } 191 catch (ANTLRException ex) { 192 193 if (ex.toString().indexOf("null") != -1) System.exit(-1); 195 client.print("Error: "+ex.toString()); 197 198 } 199 } 200 201 public final void command() throws RecognitionException, TokenStreamException { 202 203 204 { 205 switch ( LA(1)) { 206 case EXIT: 207 case QUIT: 208 case BYE: 209 { 210 exit(); 211 break; 212 } 213 case HELP: 214 case QUESTION: 215 { 216 help(); 217 break; 218 } 219 case STRING: 220 { 221 invalid(); 222 break; 223 } 224 case EOL: 225 { 226 nothing(); 227 break; 228 } 229 case SPOOL: 230 { 231 spool(); 232 break; 233 } 234 case RUN: 235 { 236 run(); 237 break; 238 } 239 case ECHO: 240 { 241 echo(); 242 break; 243 } 244 case DEBUG: 245 { 246 debug(); 247 break; 248 } 249 case STATUS: 250 { 251 status(); 252 break; 253 } 254 case OPTIONS: 255 { 256 optionsmethod(); 257 break; 258 } 259 case CONNECT: 260 case OPEN: 261 { 262 connect(); 263 break; 264 } 265 case DISCONNECT: 266 { 267 disconnect(); 268 break; 269 } 270 case LPWD: 271 { 272 lpwd(); 273 break; 274 } 275 case LCD: 276 { 277 lcd(); 278 break; 279 } 280 case LLS: 281 case LDIR: 282 { 283 lls(); 284 break; 285 } 286 case PWC: 287 case PWD: 288 { 289 pwc(); 290 break; 291 } 292 case CD: 293 case CC: 294 { 295 cd(); 296 break; 297 } 298 case LS: 299 case DIR: 300 { 301 ls(); 302 break; 303 } 304 case MKCOL: 305 case MKDIR: 306 { 307 mkcol(); 308 break; 309 } 310 case MOVE: 311 { 312 move(); 313 break; 314 } 315 case COPY: 316 { 317 copy(); 318 break; 319 } 320 case DELETE: 321 case DEL: 322 case RM: 323 { 324 delete(); 325 break; 326 } 327 case GET: 328 { 329 get(); 330 break; 331 } 332 case PUT: 333 { 334 put(); 335 break; 336 } 337 case PROPFIND: 338 case PROPGET: 339 { 340 propfind(); 341 break; 342 } 343 case PROPFINDALL: 344 case PROPGETALL: 345 { 346 propfindall(); 347 break; 348 } 349 case PROPPATCH: 350 case PROPSET: 351 { 352 proppatch(); 353 break; 354 } 355 case LOCK: 356 { 357 lock(); 358 break; 359 } 360 case UNLOCK: 361 { 362 unlock(); 363 break; 364 } 365 case LOCKS: 366 { 367 locks(); 368 break; 369 } 370 case GRANT: 371 { 372 grant(); 373 break; 374 } 375 case DENY: 376 { 377 deny(); 378 break; 379 } 380 case REVOKE: 381 { 382 revoke(); 383 break; 384 } 385 case ACL: 386 { 387 acl(); 388 break; 389 } 390 case PRINCIPALCOLLECTIONSET: 391 { 392 principalcollectionset(); 393 break; 394 } 395 case VERSIONCONTROL: 396 { 397 versioncontrol(); 398 break; 399 } 400 case REPORT: 401 { 402 report(); 403 break; 404 } 405 case EREPORT: 406 { 407 ereport(); 408 break; 409 } 410 case LREPORT: 411 { 412 lreport(); 413 break; 414 } 415 case MKWS: 416 { 417 mkws(); 418 break; 419 } 420 case CHECKIN: 421 { 422 checkin(); 423 break; 424 } 425 case CHECKOUT: 426 { 427 checkout(); 428 break; 429 } 430 case UNCHECKOUT: 431 { 432 uncheckout(); 433 break; 434 } 435 case UPDATE: 436 { 437 update(); 438 break; 439 } 440 case BEGIN: 441 { 442 begin(); 443 break; 444 } 445 case COMMIT: 446 { 447 commit(); 448 break; 449 } 450 case ABORT: 451 { 452 abort(); 453 break; 454 } 455 default: 456 { 457 throw new NoViableAltException(LT(1), getFilename()); 458 } 459 } 460 } 461 } 462 463 public final void exit() throws RecognitionException, TokenStreamException { 464 465 466 { 467 switch ( LA(1)) { 468 case EXIT: 469 { 470 match(EXIT); 471 break; 472 } 473 case QUIT: 474 { 475 match(QUIT); 476 break; 477 } 478 case BYE: 479 { 480 match(BYE); 481 break; 482 } 483 default: 484 { 485 throw new NoViableAltException(LT(1), getFilename()); 486 } 487 } 488 } 489 match(EOL); 490 491 System.exit(0); 492 493 } 494 495 public final void help() throws RecognitionException, TokenStreamException { 496 497 498 try { { 500 switch ( LA(1)) { 501 case HELP: 502 { 503 match(HELP); 504 break; 505 } 506 case QUESTION: 507 { 508 match(QUESTION); 509 break; 510 } 511 default: 512 { 513 throw new NoViableAltException(LT(1), getFilename()); 514 } 515 } 516 } 517 match(EOL); 518 519 client.help(null); 520 521 } 522 catch (RecognitionException ex) { 523 524 printUsage("help"); 525 526 } 527 } 528 529 public final void invalid() throws RecognitionException, TokenStreamException { 530 531 Token cmd = null; 532 533 cmd = LT(1); 534 match(STRING); 535 { 536 _loop101: 537 do { 538 if ((LA(1)==STRING)) { 539 match(STRING); 540 } 541 else { 542 break _loop101; 543 } 544 545 } while (true); 546 } 547 match(EOL); 548 549 client.printInvalidCommand(text(cmd)); 550 551 } 552 553 public final void nothing() throws RecognitionException, TokenStreamException { 554 555 556 match(EOL); 557 } 558 559 public final void spool() throws RecognitionException, TokenStreamException { 560 561 Token file = null; 562 563 try { match(SPOOL); 565 { 566 switch ( LA(1)) { 567 case STRING: 568 { 569 file = LT(1); 570 match(STRING); 571 break; 572 } 573 case OFF: 574 { 575 match(OFF); 576 break; 577 } 578 default: 579 { 580 throw new NoViableAltException(LT(1), getFilename()); 581 } 582 } 583 } 584 match(EOL); 585 586 if (file != null) { 587 client.enableSpoolToFile(text(file)); 588 } else { 589 client.disableSpoolToFile(); 590 } 591 592 } 593 catch (RecognitionException ex) { 594 595 printUsage("spool"); 596 597 } 598 } 599 600 public final void run() throws RecognitionException, TokenStreamException { 601 602 Token script = null; 603 604 try { match(RUN); 606 script = LT(1); 607 match(STRING); 608 match(EOL); 609 610 client.executeScript(text(script)); 611 612 } 613 catch (RecognitionException ex) { 614 615 printUsage("run"); 616 617 } 618 } 619 620 public final void echo() throws RecognitionException, TokenStreamException { 621 622 623 try { match(ECHO); 625 626 boolean isEnabled; 627 628 { 629 switch ( LA(1)) { 630 case ON: 631 { 632 match(ON); 633 634 isEnabled = true; 635 636 break; 637 } 638 case OFF: 639 { 640 match(OFF); 641 642 isEnabled = true; 643 644 break; 645 } 646 default: 647 { 648 throw new NoViableAltException(LT(1), getFilename()); 649 } 650 } 651 } 652 match(EOL); 653 654 client.setEchoEnabled(isEnabled); 655 656 } 657 catch (RecognitionException ex) { 658 659 printUsage("echo"); 660 661 } 662 } 663 664 public final void debug() throws RecognitionException, TokenStreamException { 665 666 667 try { 669 int level; 670 671 match(DEBUG); 672 { 673 switch ( LA(1)) { 674 case ON: 675 { 676 match(ON); 677 678 level = Client.DEBUG_ON; 679 680 break; 681 } 682 case OFF: 683 { 684 match(OFF); 685 686 level = Client.DEBUG_OFF; 687 688 break; 689 } 690 default: 691 { 692 throw new NoViableAltException(LT(1), getFilename()); 693 } 694 } 695 } 696 match(EOL); 697 698 client.setDebug(level); 699 700 } 701 catch (RecognitionException ex) { 702 703 printUsage("debug"); 704 705 } 706 } 707 708 public final void status() throws RecognitionException, TokenStreamException { 709 710 711 try { match(STATUS); 713 match(EOL); 714 715 client.status(); 716 717 } 718 catch (RecognitionException ex) { 719 720 printUsage("status"); 721 722 } 723 } 724 725 public final void optionsmethod() throws RecognitionException, TokenStreamException { 726 727 Token path = null; 728 729 try { match(OPTIONS); 731 path = LT(1); 732 match(STRING); 733 match(EOL); 734 735 client.options(text(path)); 736 737 } 738 catch (RecognitionException ex) { 739 740 printUsage("options"); 741 742 } 743 } 744 745 public final void connect() throws RecognitionException, TokenStreamException { 746 747 Token uri = null; 748 749 try { { 751 switch ( LA(1)) { 752 case CONNECT: 753 { 754 match(CONNECT); 755 break; 756 } 757 case OPEN: 758 { 759 match(OPEN); 760 break; 761 } 762 default: 763 { 764 throw new NoViableAltException(LT(1), getFilename()); 765 } 766 } 767 } 768 uri = LT(1); 769 match(STRING); 770 match(EOL); 771 772 client.connect(text(uri)); 773 774 } 775 catch (RecognitionException ex) { 776 777 printUsage("connect"); 778 779 } 780 } 781 782 public final void disconnect() throws RecognitionException, TokenStreamException { 783 784 785 try { match(DISCONNECT); 787 match(EOL); 788 789 client.disconnect(); 790 791 } 792 catch (RecognitionException ex) { 793 794 printUsage("disconnect"); 795 796 } 797 } 798 799 public final void lpwd() throws RecognitionException, TokenStreamException { 800 801 802 try { match(LPWD); 804 match(EOL); 805 806 client.lpwd(); 807 808 } 809 catch (RecognitionException ex) { 810 811 printUsage("lpwd"); 812 813 } 814 } 815 816 public final void lcd() throws RecognitionException, TokenStreamException { 817 818 Token path = null; 819 820 try { match(LCD); 822 path = LT(1); 823 match(STRING); 824 match(EOL); 825 826 client.lcd(text(path)); 827 828 } 829 catch (RecognitionException ex) { 830 831 printUsage("lcd"); 832 833 } 834 } 835 836 public final void lls() throws RecognitionException, TokenStreamException { 837 838 Token option = null; 839 Token path = null; 840 841 try { { 843 switch ( LA(1)) { 844 case LLS: 845 { 846 match(LLS); 847 break; 848 } 849 case LDIR: 850 { 851 match(LDIR); 852 break; 853 } 854 default: 855 { 856 throw new NoViableAltException(LT(1), getFilename()); 857 } 858 } 859 } 860 { 861 switch ( LA(1)) { 862 case OPTIONSTRING: 863 { 864 option = LT(1); 865 match(OPTIONSTRING); 866 break; 867 } 868 case EOL: 869 case STRING: 870 { 871 break; 872 } 873 default: 874 { 875 throw new NoViableAltException(LT(1), getFilename()); 876 } 877 } 878 } 879 { 880 switch ( LA(1)) { 881 case STRING: 882 { 883 path = LT(1); 884 match(STRING); 885 break; 886 } 887 case EOL: 888 { 889 break; 890 } 891 default: 892 { 893 throw new NoViableAltException(LT(1), getFilename()); 894 } 895 } 896 } 897 match(EOL); 898 899 client.lls(text(option), text(path)); 900 901 } 902 catch (RecognitionException ex) { 903 904 printUsage("lls"); 905 906 } 907 } 908 909 public final void pwc() throws RecognitionException, TokenStreamException { 910 911 912 try { { 914 switch ( LA(1)) { 915 case PWC: 916 { 917 match(PWC); 918 break; 919 } 920 case PWD: 921 { 922 match(PWD); 923 break; 924 } 925 default: 926 { 927 throw new NoViableAltException(LT(1), getFilename()); 928 } 929 } 930 } 931 match(EOL); 932 933 client.pwc(); 934 935 } 936 catch (RecognitionException ex) { 937 938 printUsage("pwc"); 939 940 } 941 } 942 943 public final void cd() throws RecognitionException, TokenStreamException { 944 945 Token path = null; 946 947 try { { 949 switch ( LA(1)) { 950 case CD: 951 { 952 match(CD); 953 break; 954 } 955 case CC: 956 { 957 match(CC); 958 break; 959 } 960 default: 961 { 962 throw new NoViableAltException(LT(1), getFilename()); 963 } 964 } 965 } 966 path = LT(1); 967 match(STRING); 968 match(EOL); 969 970 client.cd(text(path)); 971 972 } 973 catch (RecognitionException ex) { 974 975 printUsage("cd"); 976 977 } 978 } 979 980 public final void ls() throws RecognitionException, TokenStreamException { 981 982 Token option = null; 983 Token path = null; 984 985 try { { 987 switch ( LA(1)) { 988 case LS: 989 { 990 match(LS); 991 break; 992 } 993 case DIR: 994 { 995 match(DIR); 996 break; 997 } 998 default: 999 { 1000 throw new NoViableAltException(LT(1), getFilename()); 1001 } 1002 } 1003 } 1004 { 1005 switch ( LA(1)) { 1006 case OPTIONSTRING: 1007 { 1008 option = LT(1); 1009 match(OPTIONSTRING); 1010 break; 1011 } 1012 case EOL: 1013 case STRING: 1014 { 1015 break; 1016 } 1017 default: 1018 { 1019 throw new NoViableAltException(LT(1), getFilename()); 1020 } 1021 } 1022 } 1023 { 1024 switch ( LA(1)) { 1025 case STRING: 1026 { 1027 path = LT(1); 1028 match(STRING); 1029 break; 1030 } 1031 case EOL: 1032 { 1033 break; 1034 } 1035 default: 1036 { 1037 throw new NoViableAltException(LT(1), getFilename()); 1038 } 1039 } 1040 } 1041 match(EOL); 1042 1043 client.ls(text(option), text(path)); 1044 1045 } 1046 catch (RecognitionException ex) { 1047 1048 printUsage("ls"); 1049 1050 } 1051 } 1052 1053 public final void mkcol() throws RecognitionException, TokenStreamException { 1054 1055 Token path = null; 1056 1057 try { { 1059 switch ( LA(1)) { 1060 case MKCOL: 1061 { 1062 match(MKCOL); 1063 break; 1064 } 1065 case MKDIR: 1066 { 1067 match(MKDIR); 1068 break; 1069 } 1070 default: 1071 { 1072 throw new NoViableAltException(LT(1), getFilename()); 1073 } 1074 } 1075 } 1076 path = LT(1); 1077 match(STRING); 1078 match(EOL); 1079 1080 client.mkcol(text(path)); 1081 1082 } 1083 catch (RecognitionException ex) { 1084 1085 printUsage("mkcol"); 1086 1087 } 1088 } 1089 1090 public final void move() throws RecognitionException, TokenStreamException { 1091 1092 Token source = null; 1093 Token destination = null; 1094 1095 try { match(MOVE); 1097 source = LT(1); 1098 match(STRING); 1099 destination = LT(1); 1100 match(STRING); 1101 match(EOL); 1102 1103 client.move(text(source), text(destination)); 1104 1105 } 1106 catch (RecognitionException ex) { 1107 1108 printUsage("move"); 1109 1110 } 1111 } 1112 1113 public final void copy() throws RecognitionException, TokenStreamException { 1114 1115 Token source = null; 1116 Token destination = null; 1117 1118 try { match(COPY); 1120 source = LT(1); 1121 match(STRING); 1122 destination = LT(1); 1123 match(STRING); 1124 match(EOL); 1125 1126 client.copy(text(source), text(destination)); 1127 1128 } 1129 catch (RecognitionException ex) { 1130 1131 printUsage("copy"); 1132 1133 } 1134 } 1135 1136 public final void delete() throws RecognitionException, TokenStreamException { 1137 1138 Token path = null; 1139 1140 try { { 1142 switch ( LA(1)) { 1143 case DELETE: 1144 { 1145 match(DELETE); 1146 break; 1147 } 1148 case DEL: 1149 { 1150 match(DEL); 1151 break; 1152 } 1153 case RM: 1154 { 1155 match(RM); 1156 break; 1157 } 1158 default: 1159 { 1160 throw new NoViableAltException(LT(1), getFilename()); 1161 } 1162 } 1163 } 1164 path = LT(1); 1165 match(STRING); 1166 match(EOL); 1167 1168 client.delete(text(path)); 1169 1170 } 1171 catch (RecognitionException ex) { 1172 1173 printUsage("delete"); 1174 1175 } 1176 } 1177 1178 public final void get() throws RecognitionException, TokenStreamException { 1179 1180 Token path = null; 1181 Token file = null; 1182 1183 try { match(GET); 1185 path = LT(1); 1186 match(STRING); 1187 { 1188 switch ( LA(1)) { 1189 case STRING: 1190 { 1191 file = LT(1); 1192 match(STRING); 1193 break; 1194 } 1195 case EOL: 1196 { 1197 break; 1198 } 1199 default: 1200 { 1201 throw new NoViableAltException(LT(1), getFilename()); 1202 } 1203 } 1204 } 1205 match(EOL); 1206 1207 client.get(text(path), text(file)); 1208 1209 } 1210 catch (RecognitionException ex) { 1211 1212 printUsage("get"); 1213 1214 } 1215 } 1216 1217 public final void put() throws RecognitionException, TokenStreamException { 1218 1219 Token file = null; 1220 Token path = null; 1221 1222 try { match(PUT); 1224 file = LT(1); 1225 match(STRING); 1226 { 1227 switch ( LA(1)) { 1228 case STRING: 1229 { 1230 path = LT(1); 1231 match(STRING); 1232 break; 1233 } 1234 case EOL: 1235 { 1236 break; 1237 } 1238 default: 1239 { 1240 throw new NoViableAltException(LT(1), getFilename()); 1241 } 1242 } 1243 } 1244 match(EOL); 1245 1246 client.put(text(file), text(path)); 1247 1248 } 1249 catch (RecognitionException ex) { 1250 1251 printUsage("put"); 1252 1253 } 1254 } 1255 1256 public final void propfind() throws RecognitionException, TokenStreamException { 1257 1258 Token path = null; 1259 Token prop = null; 1260 Token nsprop = null; 1261 1262 try { { 1264 switch ( LA(1)) { 1265 case PROPFIND: 1266 { 1267 match(PROPFIND); 1268 break; 1269 } 1270 case PROPGET: 1271 { 1272 match(PROPGET); 1273 break; 1274 } 1275 default: 1276 { 1277 throw new NoViableAltException(LT(1), getFilename()); 1278 } 1279 } 1280 } 1281 path = LT(1); 1282 match(STRING); 1283 1284 Vector properties = new Vector(); 1285 1286 { 1287 int _cnt43=0; 1288 _loop43: 1289 do { 1290 switch ( LA(1)) { 1291 case STRING: 1292 { 1293 prop = LT(1); 1294 match(STRING); 1295 1296 properties.add(pname(prop)); 1297 1298 break; 1299 } 1300 case QNAME: 1301 { 1302 nsprop = LT(1); 1303 match(QNAME); 1304 1305 properties.add(pname(nsprop)); 1306 1307 break; 1308 } 1309 default: 1310 { 1311 if ( _cnt43>=1 ) { break _loop43; } else {throw new NoViableAltException(LT(1), getFilename());} 1312 } 1313 } 1314 _cnt43++; 1315 } while (true); 1316 } 1317 match(EOL); 1318 1319 client.propfind(text(path), properties); 1320 1321 } 1322 catch (RecognitionException ex) { 1323 1324 printUsage("propfind"); 1325 1326 } 1327 } 1328 1329 public final void propfindall() throws RecognitionException, TokenStreamException { 1330 1331 Token path = null; 1332 1333 try { { 1335 switch ( LA(1)) { 1336 case PROPFINDALL: 1337 { 1338 match(PROPFINDALL); 1339 break; 1340 } 1341 case PROPGETALL: 1342 { 1343 match(PROPGETALL); 1344 break; 1345 } 1346 default: 1347 { 1348 throw new NoViableAltException(LT(1), getFilename()); 1349 } 1350 } 1351 } 1352 { 1353 switch ( LA(1)) { 1354 case STRING: 1355 { 1356 path = LT(1); 1357 match(STRING); 1358 break; 1359 } 1360 case EOL: 1361 { 1362 break; 1363 } 1364 default: 1365 { 1366 throw new NoViableAltException(LT(1), getFilename()); 1367 } 1368 } 1369 } 1370 match(EOL); 1371 1372 client.propfindall(text(path)); 1373 1374 } 1375 catch (RecognitionException ex) { 1376 1377 printUsage("propfindall"); 1378 1379 } 1380 } 1381 1382 public final void proppatch() throws RecognitionException, TokenStreamException { 1383 1384 Token path = null; 1385 Token prop = null; 1386 Token value = null; 1387 1388 try { { 1390 switch ( LA(1)) { 1391 case PROPPATCH: 1392 { 1393 match(PROPPATCH); 1394 break; 1395 } 1396 case PROPSET: 1397 { 1398 match(PROPSET); 1399 break; 1400 } 1401 default: 1402 { 1403 throw new NoViableAltException(LT(1), getFilename()); 1404 } 1405 } 1406 } 1407 path = LT(1); 1408 match(STRING); 1409 prop = LT(1); 1410 match(STRING); 1411 value = LT(1); 1412 match(STRING); 1413 match(EOL); 1414 1415 client.proppatch(text(path), text(prop), text(value)); 1416 1417 } 1418 catch (RecognitionException ex) { 1419 1420 printUsage("proppatch"); 1421 1422 } 1423 } 1424 1425 public final void lock() throws RecognitionException, TokenStreamException { 1426 1427 Token path = null; 1428 Token os1 = null; 1429 Token os2 = null; 1430 Token os3 = null; 1431 1432 try { match(LOCK); 1434 { 1435 switch ( LA(1)) { 1436 case STRING: 1437 { 1438 path = LT(1); 1439 match(STRING); 1440 break; 1441 } 1442 case EOL: 1443 case OPTIONSTRING: 1444 { 1445 break; 1446 } 1447 default: 1448 { 1449 throw new NoViableAltException(LT(1), getFilename()); 1450 } 1451 } 1452 } 1453 { 1454 switch ( LA(1)) { 1455 case OPTIONSTRING: 1456 { 1457 os1 = LT(1); 1458 match(OPTIONSTRING); 1459 { 1460 switch ( LA(1)) { 1461 case OPTIONSTRING: 1462 { 1463 os2 = LT(1); 1464 match(OPTIONSTRING); 1465 { 1466 switch ( LA(1)) { 1467 case OPTIONSTRING: 1468 { 1469 os3 = LT(1); 1470 match(OPTIONSTRING); 1471 break; 1472 } 1473 case EOL: 1474 { 1475 break; 1476 } 1477 default: 1478 { 1479 throw new NoViableAltException(LT(1), getFilename()); 1480 } 1481 } 1482 } 1483 break; 1484 } 1485 case EOL: 1486 { 1487 break; 1488 } 1489 default: 1490 { 1491 throw new NoViableAltException(LT(1), getFilename()); 1492 } 1493 } 1494 } 1495 break; 1496 } 1497 case EOL: 1498 { 1499 break; 1500 } 1501 default: 1502 { 1503 throw new NoViableAltException(LT(1), getFilename()); 1504 } 1505 } 1506 } 1507 match(EOL); 1508 1509 1510 String [] opt = {text(os1), text(os2), text(os3), null}; 1511 1512 int parNr[] = {3, 3, 3}; 1513 String err = null; 1514 1515 for (int i = 0 ; i< opt.length ;i++) { 1516 1517 if (opt[i] != null) { 1518 1519 if ( opt[i].toLowerCase().startsWith("-t")) { 1520 parNr[0] = i; 1521 } else 1522 1523 if ( opt[i].toLowerCase().startsWith("-s")) { 1524 parNr[1] = i; 1525 } else 1526 1527 if ( opt[i].toLowerCase().startsWith("-o")) { 1528 parNr[2] = i; 1529 } else { 1530 err = "Wrong parameter: "+ opt[i]; 1531 } 1532 } 1533 } 1534 1535 if (err == null) 1536 client.lock(text(path), opt[parNr[0]], opt[parNr[1]], opt[parNr[2]]); 1537 else 1538 client.print(err); 1539 1540 } 1541 catch (RecognitionException ex) { 1542 1543 printUsage("lock"); 1544 1545 } 1546 } 1547 1548 public final void unlock() throws RecognitionException, TokenStreamException { 1549 1550 Token path = null; 1551 Token os = null; 1552 1553 try { match(UNLOCK); 1555 { 1556 switch ( LA(1)) { 1557 case STRING: 1558 { 1559 path = LT(1); 1560 match(STRING); 1561 break; 1562 } 1563 case EOL: 1564 case OPTIONSTRING: 1565 { 1566 break; 1567 } 1568 default: 1569 { 1570 throw new NoViableAltException(LT(1), getFilename()); 1571 } 1572 } 1573 } 1574 { 1575 switch ( LA(1)) { 1576 case OPTIONSTRING: 1577 { 1578 os = LT(1); 1579 match(OPTIONSTRING); 1580 break; 1581 } 1582 case EOL: 1583 { 1584 break; 1585 } 1586 default: 1587 { 1588 throw new NoViableAltException(LT(1), getFilename()); 1589 } 1590 } 1591 } 1592 match(EOL); 1593 1594 String owner = text(os); 1595 String err = null; 1596 1597 1598 if ((owner != null) && (!owner.toLowerCase().startsWith("-o")) ) { 1599 err = "Wrong parameter: "+ owner; 1600 } 1601 client.unlock(text(path), owner); 1602 1603 } 1604 catch (RecognitionException ex) { 1605 1606 printUsage("unlock"); 1607 1608 } 1609 } 1610 1611 public final void locks() throws RecognitionException, TokenStreamException { 1612 1613 Token path = null; 1614 1615 try { match(LOCKS); 1617 { 1618 switch ( LA(1)) { 1619 case STRING: 1620 { 1621 path = LT(1); 1622 match(STRING); 1623 break; 1624 } 1625 case EOL: 1626 { 1627 break; 1628 } 1629 default: 1630 { 1631 throw new NoViableAltException(LT(1), getFilename()); 1632 } 1633 } 1634 } 1635 match(EOL); 1636 1637 client.locks(text(path)); 1638 1639 } 1640 catch (RecognitionException ex) { 1641 1642 printUsage("locks"); 1643 1644 } 1645 } 1646 1647 public final void grant() throws RecognitionException, TokenStreamException { 1648 1649 Token permission = null; 1650 Token nspermisssion = null; 1651 Token path = null; 1652 Token principal = null; 1653 1654 try { match(GRANT); 1656 { 1657 switch ( LA(1)) { 1658 case STRING: 1659 { 1660 permission = LT(1); 1661 match(STRING); 1662 break; 1663 } 1664 case QNAME: 1665 { 1666 nspermisssion = LT(1); 1667 match(QNAME); 1668 break; 1669 } 1670 default: 1671 { 1672 throw new NoViableAltException(LT(1), getFilename()); 1673 } 1674 } 1675 } 1676 { 1677 switch ( LA(1)) { 1678 case ON: 1679 { 1680 match(ON); 1681 path = LT(1); 1682 match(STRING); 1683 break; 1684 } 1685 case TO: 1686 { 1687 break; 1688 } 1689 default: 1690 { 1691 throw new NoViableAltException(LT(1), getFilename()); 1692 } 1693 } 1694 } 1695 match(TO); 1696 principal = LT(1); 1697 match(STRING); 1698 match(EOL); 1699 1700 if (permission != null) 1701 client.grant(text(permission), text(path), text(principal)); 1702 else 1703 client.grant(qname(nspermisssion), text(path), text(principal)); 1704 1705 } 1706 catch (RecognitionException ex) { 1707 1708 client.printUsage("grant"); 1709 1710 } 1711 } 1712 1713 public final void deny() throws RecognitionException, TokenStreamException { 1714 1715 Token permission = null; 1716 Token nspermisssion = null; 1717 Token path = null; 1718 Token principal = null; 1719 1720 try { match(DENY); 1722 { 1723 switch ( LA(1)) { 1724 case STRING: 1725 { 1726 permission = LT(1); 1727 match(STRING); 1728 break; 1729 } 1730 case QNAME: 1731 { 1732 nspermisssion = LT(1); 1733 match(QNAME); 1734 break; 1735 } 1736 default: 1737 { 1738 throw new NoViableAltException(LT(1), getFilename()); 1739 } 1740 } 1741 } 1742 { 1743 switch ( LA(1)) { 1744 case ON: 1745 { 1746 match(ON); 1747 path = LT(1); 1748 match(STRING); 1749 break; 1750 } 1751 case TO: 1752 { 1753 break; 1754 } 1755 default: 1756 { 1757 throw new NoViableAltException(LT(1), getFilename()); 1758 } 1759 } 1760 } 1761 match(TO); 1762 principal = LT(1); 1763 match(STRING); 1764 match(EOL); 1765 1766 if (permission != null) 1767 client.deny(text(permission), text(path), text(principal)); 1768 else 1769 client.deny(qname(nspermisssion), text(path), text(principal)); 1770 1771 } 1772 catch (RecognitionException ex) { 1773 1774 client.printUsage("deny"); 1775 1776 } 1777 } 1778 1779 public final void revoke() throws RecognitionException, TokenStreamException { 1780 1781 Token permission = null; 1782 Token nspermisssion = null; 1783 Token path = null; 1784 Token principal = null; 1785 1786 try { match(REVOKE); 1788 { 1789 switch ( LA(1)) { 1790 case STRING: 1791 { 1792 permission = LT(1); 1793 match(STRING); 1794 break; 1795 } 1796 case QNAME: 1797 { 1798 nspermisssion = LT(1); 1799 match(QNAME); 1800 break; 1801 } 1802 default: 1803 { 1804 throw new NoViableAltException(LT(1), getFilename()); 1805 } 1806 } 1807 } 1808 { 1809 switch ( LA(1)) { 1810 case ON: 1811 { 1812 match(ON); 1813 path = LT(1); 1814 match(STRING); 1815 break; 1816 } 1817 case FROM: 1818 { 1819 break; 1820 } 1821 default: 1822 { 1823 throw new NoViableAltException(LT(1), getFilename()); 1824 } 1825 } 1826 } 1827 match(FROM); 1828 principal = LT(1); 1829 match(STRING); 1830 match(EOL); 1831 1832 if (permission != null) 1833 client.revoke(text(permission), text(path), text(principal)); 1834 else 1835 client.revoke(qname(nspermisssion), text(path), 1836 text(principal)); 1837 1838 } 1839 catch (RecognitionException ex) { 1840 1841 client.printUsage("revoke"); 1842 1843 } 1844 } 1845 1846 public final void acl() throws RecognitionException, TokenStreamException { 1847 1848 Token path = null; 1849 1850 try { match(ACL); 1852 { 1853 switch ( LA(1)) { 1854 case STRING: 1855 { 1856 path = LT(1); 1857 match(STRING); 1858 break; 1859 } 1860 case EOL: 1861 { 1862 break; 1863 } 1864 default: 1865 { 1866 throw new NoViableAltException(LT(1), getFilename()); 1867 } 1868 } 1869 } 1870 match(EOL); 1871 1872 client.acl(text(path)); 1873 1874 } 1875 catch (RecognitionException ex) { 1876 1877 printUsage("acl"); 1878 1879 } 1880 } 1881 1882 public final void principalcollectionset() throws RecognitionException, TokenStreamException { 1883 1884 Token path = null; 1885 1886 try { match(PRINCIPALCOLLECTIONSET); 1888 { 1889 switch ( LA(1)) { 1890 case STRING: 1891 { 1892 path = LT(1); 1893 match(STRING); 1894 break; 1895 } 1896 case EOL: 1897 { 1898 break; 1899 } 1900 default: 1901 { 1902 throw new NoViableAltException(LT(1), getFilename()); 1903 } 1904 } 1905 } 1906 match(EOL); 1907 1908 client.principalcollectionset(text(path)); 1909 1910 } 1911 catch (RecognitionException ex) { 1912 1913 printUsage("principalcollectionset"); 1914 1915 } 1916 } 1917 1918 public final void versioncontrol() throws RecognitionException, TokenStreamException { 1919 1920 Token target = null; 1921 Token path = null; 1922 1923 try { match(VERSIONCONTROL); 1925 { 1926 if ((LA(1)==STRING) && (LA(2)==STRING)) { 1927 target = LT(1); 1928 match(STRING); 1929 } 1930 else if ((LA(1)==STRING) && (LA(2)==EOL)) { 1931 } 1932 else { 1933 throw new NoViableAltException(LT(1), getFilename()); 1934 } 1935 1936 } 1937 path = LT(1); 1938 match(STRING); 1939 match(EOL); 1940 1941 if (target == null) 1942 client.versioncontrol(text(path)); 1943 else 1944 client.versioncontrol(text(target), text(path)); 1945 1946 } 1947 catch (RecognitionException ex) { 1948 1949 printUsage("versioncontrol"); 1950 1951 } 1952 } 1953 1954 public final void report() throws RecognitionException, TokenStreamException { 1955 1956 Token path = null; 1957 Token prop = null; 1958 Token nsprop = null; 1959 1960 try { match(REPORT); 1962 path = LT(1); 1963 match(STRING); 1964 1965 Vector properties = new Vector(); 1966 1967 { 1968 switch ( LA(1)) { 1969 case STRING: 1970 { 1971 prop = LT(1); 1972 match(STRING); 1973 1974 properties.add(pname(prop)); 1975 1976 break; 1977 } 1978 case QNAME: 1979 { 1980 nsprop = LT(1); 1981 match(QNAME); 1982 1983 properties.add(pname(nsprop)); 1984 break; 1985 } 1986 case EOL: 1987 { 1988 break; 1989 } 1990 default: 1991 { 1992 throw new NoViableAltException(LT(1), getFilename()); 1993 } 1994 } 1995 } 1996 match(EOL); 1997 1998 client.report(text(path), properties); 1999 2000 } 2001 catch (RecognitionException ex) { 2002 2003 printUsage("report"); 2004 2005 } 2006 } 2007 2008 public final void ereport() throws RecognitionException, TokenStreamException { 2009 2010 Token path = null; 2011 Token filename = null; 2012 2013 try { match(EREPORT); 2015 path = LT(1); 2016 match(STRING); 2017 { 2018 switch ( LA(1)) { 2019 case STRING: 2020 { 2021 filename = LT(1); 2022 match(STRING); 2023 break; 2024 } 2025 case EOL: 2026 { 2027 break; 2028 } 2029 default: 2030 { 2031 throw new NoViableAltException(LT(1), getFilename()); 2032 } 2033 } 2034 } 2035 match(EOL); 2036 2037 client.ereport(text(path), text(filename)); 2038 2039 } 2040 catch (RecognitionException ex) { 2041 2042 printUsage("ereport"); 2043 2044 } 2045 } 2046 2047 public final void lreport() throws RecognitionException, TokenStreamException { 2048 2049 Token path = null; 2050 Token prop = null; 2051 Token nsprop = null; 2052 Token uri = null; 2053 2054 try { match(LREPORT); 2056 path = LT(1); 2057 match(STRING); 2058 2059 Vector properties = new Vector(); 2060 2061 { 2062 int _cnt93=0; 2063 _loop93: 2064 do { 2065 switch ( LA(1)) { 2066 case STRING: 2067 { 2068 prop = LT(1); 2069 match(STRING); 2070 2071 properties.add(pname(prop)); 2072 2073 break; 2074 } 2075 case QNAME: 2076 { 2077 nsprop = LT(1); 2078 match(QNAME); 2079 2080 properties.add(pname(nsprop)); 2081 2082 break; 2083 } 2084 default: 2085 { 2086 if ( _cnt93>=1 ) { break _loop93; } else {throw new NoViableAltException(LT(1), getFilename());} 2087 } 2088 } 2089 _cnt93++; 2090 } while (true); 2091 } 2092 match(ON); 2093 2094 Vector historyUris = new Vector(); 2095 2096 { 2097 int _cnt95=0; 2098 _loop95: 2099 do { 2100 if ((LA(1)==STRING)) { 2101 uri = LT(1); 2102 match(STRING); 2103 2104 historyUris.add(text(uri)); 2105 2106 } 2107 else { 2108 if ( _cnt95>=1 ) { break _loop95; } else {throw new NoViableAltException(LT(1), getFilename());} 2109 } 2110 2111 _cnt95++; 2112 } while (true); 2113 } 2114 match(EOL); 2115 2116 client.lreport(text(path), properties, historyUris); 2117 2118 } 2119 catch (RecognitionException ex) { 2120 2121 printUsage("lreport"); 2122 2123 } 2124 } 2125 2126 public final void mkws() throws RecognitionException, TokenStreamException { 2127 2128 Token path = null; 2129 2130 try { match(MKWS); 2132 path = LT(1); 2133 match(STRING); 2134 match(EOL); 2135 2136 client.mkws(text(path)); 2137 2138 } 2139 catch (RecognitionException ex) { 2140 2141 printUsage("mkws"); 2142 2143 } 2144 } 2145 2146 public final void checkin() throws RecognitionException, TokenStreamException { 2147 2148 Token path = null; 2149 2150 try { match(CHECKIN); 2152 path = LT(1); 2153 match(STRING); 2154 match(EOL); 2155 2156 client.checkin(text(path)); 2157 2158 } 2159 catch (RecognitionException ex) { 2160 2161 printUsage("checkin"); 2162 2163 } 2164 } 2165 2166 public final void checkout() throws RecognitionException, TokenStreamException { 2167 2168 Token path = null; 2169 2170 try { match(CHECKOUT); 2172 path = LT(1); 2173 match(STRING); 2174 match(EOL); 2175 2176 client.checkout(text(path)); 2177 2178 } 2179 catch (RecognitionException ex) { 2180 2181 printUsage("checkout"); 2182 2183 } 2184 } 2185 2186 public final void uncheckout() throws RecognitionException, TokenStreamException { 2187 2188 Token path = null; 2189 2190 try { match(UNCHECKOUT); 2192 path = LT(1); 2193 match(STRING); 2194 match(EOL); 2195 2196 client.uncheckout(text(path)); 2197 2198 } 2199 catch (RecognitionException ex) { 2200 2201 printUsage("uncheckout"); 2202 2203 } 2204 } 2205 2206 public final void update() throws RecognitionException, TokenStreamException { 2207 2208 Token path = null; 2209 Token target = null; 2210 2211 try { match(UPDATE); 2213 path = LT(1); 2214 match(STRING); 2215 target = LT(1); 2216 match(STRING); 2217 match(EOL); 2218 2219 client.update(text(path), text(target)); 2220 2221 } 2222 catch (RecognitionException ex) { 2223 2224 printUsage("update <path> <historyURL>"); 2225 2226 } 2227 } 2228 2229 public final void begin() throws RecognitionException, TokenStreamException { 2230 2231 Token timeout = null; 2232 Token owner = null; 2233 2234 try { match(BEGIN); 2236 { 2237 switch ( LA(1)) { 2238 case STRING: 2239 { 2240 timeout = LT(1); 2241 match(STRING); 2242 { 2243 switch ( LA(1)) { 2244 case STRING: 2245 { 2246 owner = LT(1); 2247 match(STRING); 2248 break; 2249 } 2250 case EOL: 2251 { 2252 break; 2253 } 2254 default: 2255 { 2256 throw new NoViableAltException(LT(1), getFilename()); 2257 } 2258 } 2259 } 2260 break; 2261 } 2262 case EOL: 2263 { 2264 break; 2265 } 2266 default: 2267 { 2268 throw new NoViableAltException(LT(1), getFilename()); 2269 } 2270 } 2271 } 2272 match(EOL); 2273 2274 client.beginTransaction(text(timeout), text(owner)); 2275 2276 } 2277 catch (RecognitionException ex) { 2278 2279 printUsage("begin"); 2280 2281 } 2282 } 2283 2284 public final void commit() throws RecognitionException, TokenStreamException { 2285 2286 2287 try { match(COMMIT); 2289 2290 client.commitTransaction(); 2291 2292 } 2293 catch (RecognitionException ex) { 2294 2295 printUsage("commit"); 2296 2297 } 2298 } 2299 2300 public final void abort() throws RecognitionException, TokenStreamException { 2301 2302 2303 try { match(ABORT); 2305 2306 client.abortTransaction(); 2307 2308 } 2309 catch (RecognitionException ex) { 2310 2311 printUsage("abort"); 2312 2313 } 2314 } 2315 2316 public final void skip() throws RecognitionException, TokenStreamException { 2317 2318 2319 { 2320 _loop105: 2321 do { 2322 switch ( LA(1)) { 2323 case STRING: 2324 { 2325 match(STRING); 2326 break; 2327 } 2328 case HELP: 2329 case QUESTION: 2330 case STATUS: 2331 case SPOOL: 2332 case OFF: 2333 case RUN: 2334 case ECHO: 2335 case ON: 2336 case DEBUG: 2337 case OPTIONS: 2338 case CONNECT: 2339 case OPEN: 2340 case DISCONNECT: 2341 case LPWD: 2342 case PWC: 2343 case PWD: 2344 case LCD: 2345 case CD: 2346 case CC: 2347 case LLS: 2348 case LDIR: 2349 case LS: 2350 case DIR: 2351 case MKCOL: 2352 case MKDIR: 2353 case MOVE: 2354 case COPY: 2355 case DELETE: 2356 case DEL: 2357 case RM: 2358 case PROPFIND: 2359 case PROPGET: 2360 case PROPFINDALL: 2361 case PROPGETALL: 2362 case PROPPATCH: 2363 case GET: 2364 case PUT: 2365 case BEGIN: 2366 case COMMIT: 2367 case ABORT: 2368 case LOCK: 2369 case UNLOCK: 2370 case LOCKS: 2371 case GRANT: 2372 case TO: 2373 case DENY: 2374 case REVOKE: 2375 case FROM: 2376 case ACL: 2377 case PRINCIPALCOLLECTIONSET: 2378 case VERSIONCONTROL: 2379 case UPDATE: 2380 case CHECKIN: 2381 case CHECKOUT: 2382 case UNCHECKOUT: 2383 case REPORT: 2384 case EREPORT: 2385 case LREPORT: 2386 case MKWS: 2387 case EXIT: 2388 case QUIT: 2389 case BYE: 2390 case SET: 2391 case CLOSE: 2392 case CP: 2393 case MV: 2394 case PROPPUT: 2395 case PRINCIPALCOL: 2396 { 2397 all_tokens(); 2398 break; 2399 } 2400 default: 2401 { 2402 break _loop105; 2403 } 2404 } 2405 } while (true); 2406 } 2407 match(EOL); 2408 2409 } 2410 2411 public final void all_tokens() throws RecognitionException, TokenStreamException { 2412 2413 2414 switch ( LA(1)) { 2415 case EXIT: 2416 { 2417 match(EXIT); 2418 break; 2419 } 2420 case QUIT: 2421 { 2422 match(QUIT); 2423 break; 2424 } 2425 case BYE: 2426 { 2427 match(BYE); 2428 break; 2429 } 2430 case HELP: 2431 { 2432 match(HELP); 2433 break; 2434 } 2435 case QUESTION: 2436 { 2437 match(QUESTION); 2438 break; 2439 } 2440 case RUN: 2441 { 2442 match(RUN); 2443 break; 2444 } 2445 case SPOOL: 2446 { 2447 match(SPOOL); 2448 break; 2449 } 2450 case STATUS: 2451 { 2452 match(STATUS); 2453 break; 2454 } 2455 case ECHO: 2456 { 2457 match(ECHO); 2458 break; 2459 } 2460 case ON: 2461 { 2462 match(ON); 2463 break; 2464 } 2465 case OFF: 2466 { 2467 match(OFF); 2468 break; 2469 } 2470 case SET: 2471 { 2472 match(SET); 2473 break; 2474 } 2475 case DEBUG: 2476 { 2477 match(DEBUG); 2478 break; 2479 } 2480 case OPTIONS: 2481 { 2482 match(OPTIONS); 2483 break; 2484 } 2485 case OPEN: 2486 { 2487 match(OPEN); 2488 break; 2489 } 2490 case CONNECT: 2491 { 2492 match(CONNECT); 2493 break; 2494 } 2495 case CLOSE: 2496 { 2497 match(CLOSE); 2498 break; 2499 } 2500 case DISCONNECT: 2501 { 2502 match(DISCONNECT); 2503 break; 2504 } 2505 case LPWD: 2506 { 2507 match(LPWD); 2508 break; 2509 } 2510 case LCD: 2511 { 2512 match(LCD); 2513 break; 2514 } 2515 case LLS: 2516 { 2517 match(LLS); 2518 break; 2519 } 2520 case LDIR: 2521 { 2522 match(LDIR); 2523 break; 2524 } 2525 case PWC: 2526 { 2527 match(PWC); 2528 break; 2529 } 2530 case PWD: 2531 { 2532 match(PWD); 2533 break; 2534 } 2535 case CC: 2536 { 2537 match(CC); 2538 break; 2539 } 2540 case CD: 2541 { 2542 match(CD); 2543 break; 2544 } 2545 case LS: 2546 { 2547 match(LS); 2548 break; 2549 } 2550 case DIR: 2551 { 2552 match(DIR); 2553 break; 2554 } 2555 case GET: 2556 { 2557 match(GET); 2558 break; 2559 } 2560 case PUT: 2561 { 2562 match(PUT); 2563 break; 2564 } 2565 case MKCOL: 2566 { 2567 match(MKCOL); 2568 break; 2569 } 2570 case MKDIR: 2571 { 2572 match(MKDIR); 2573 break; 2574 } 2575 case DELETE: 2576 { 2577 match(DELETE); 2578 break; 2579 } 2580 case DEL: 2581 { 2582 match(DEL); 2583 break; 2584 } 2585 case RM: 2586 { 2587 match(RM); 2588 break; 2589 } 2590 case COPY: 2591 { 2592 match(COPY); 2593 break; 2594 } 2595 case CP: 2596 { 2597 match(CP); 2598 break; 2599 } 2600 case MOVE: 2601 { 2602 match(MOVE); 2603 break; 2604 } 2605 case MV: 2606 { 2607 match(MV); 2608 break; 2609 } 2610 case LOCK: 2611 { 2612 match(LOCK); 2613 break; 2614 } 2615 case UNLOCK: 2616 { 2617 match(UNLOCK); 2618 break; 2619 } 2620 case LOCKS: 2621 { 2622 match(LOCKS); 2623 break; 2624 } 2625 case PROPGET: 2626 { 2627 match(PROPGET); 2628 break; 2629 } 2630 case PROPFIND: 2631 { 2632 match(PROPFIND); 2633 break; 2634 } 2635 case PROPGETALL: 2636 { 2637 match(PROPGETALL); 2638 break; 2639 } 2640 case PROPFINDALL: 2641 { 2642 match(PROPFINDALL); 2643 break; 2644 } 2645 case PROPPUT: 2646 { 2647 match(PROPPUT); 2648 break; 2649 } 2650 case PROPPATCH: 2651 { 2652 match(PROPPATCH); 2653 break; 2654 } 2655 case ACL: 2656 { 2657 match(ACL); 2658 break; 2659 } 2660 case PRINCIPALCOL: 2661 { 2662 match(PRINCIPALCOL); 2663 break; 2664 } 2665 case GRANT: 2666 { 2667 match(GRANT); 2668 break; 2669 } 2670 case DENY: 2671 { 2672 match(DENY); 2673 break; 2674 } 2675 case REVOKE: 2676 { 2677 match(REVOKE); 2678 break; 2679 } 2680 case TO: 2681 { 2682 match(TO); 2683 break; 2684 } 2685 case FROM: 2686 { 2687 match(FROM); 2688 break; 2689 } 2690 case PRINCIPALCOLLECTIONSET: 2691 { 2692 match(PRINCIPALCOLLECTIONSET); 2693 break; 2694 } 2695 case VERSIONCONTROL: 2696 { 2697 match(VERSIONCONTROL); 2698 break; 2699 } 2700 case REPORT: 2701 { 2702 match(REPORT); 2703 break; 2704 } 2705 case EREPORT: 2706 { 2707 match(EREPORT); 2708 break; 2709 } 2710 case LREPORT: 2711 { 2712 match(LREPORT); 2713 break; 2714 } 2715 case MKWS: 2716 { 2717 match(MKWS); 2718 break; 2719 } 2720 case CHECKIN: 2721 { 2722 match(CHECKIN); 2723 break; 2724 } 2725 case CHECKOUT: 2726 { 2727 match(CHECKOUT); 2728 break; 2729 } 2730 case UNCHECKOUT: 2731 { 2732 match(UNCHECKOUT); 2733 break; 2734 } 2735 case UPDATE: 2736 { 2737 match(UPDATE); 2738 break; 2739 } 2740 case BEGIN: 2741 { 2742 match(BEGIN); 2743 break; 2744 } 2745 case COMMIT: 2746 { 2747 match(COMMIT); 2748 break; 2749 } 2750 case ABORT: 2751 { 2752 match(ABORT); 2753 break; 2754 } 2755 default: 2756 { 2757 throw new NoViableAltException(LT(1), getFilename()); 2758 } 2759 } 2760 } 2761 2762 2763 public static final String [] _tokenNames = { 2764 "<0>", 2765 "EOF", 2766 "<2>", 2767 "NULL_TREE_LOOKAHEAD", 2768 "\"help\"", 2769 "QUESTION", 2770 "EOL", 2771 "\"status\"", 2772 "\"spool\"", 2773 "STRING", 2774 "\"off\"", 2775 "\"run\"", 2776 "\"echo\"", 2777 "\"on\"", 2778 "\"debug\"", 2779 "\"options\"", 2780 "\"connect\"", 2781 "\"open\"", 2782 "\"disconnect\"", 2783 "\"lpwd\"", 2784 "\"pwc\"", 2785 "\"pwd\"", 2786 "\"lcd\"", 2787 "\"cd\"", 2788 "\"cc\"", 2789 "\"lls\"", 2790 "\"ldir\"", 2791 "OPTIONSTRING", 2792 "\"ls\"", 2793 "\"dir\"", 2794 "\"mkcol\"", 2795 "\"mkdir\"", 2796 "\"move\"", 2797 "\"copy\"", 2798 "\"delete\"", 2799 "\"del\"", 2800 "\"rm\"", 2801 "\"propfind\"", 2802 "\"propget\"", 2803 "QNAME", 2804 "\"propfindall\"", 2805 "\"propgetall\"", 2806 "\"proppatch\"", 2807 "PROPSET", 2808 "\"get\"", 2809 "\"put\"", 2810 "\"begin\"", 2811 "\"commit\"", 2812 "\"abort\"", 2813 "\"lock\"", 2814 "\"unlock\"", 2815 "\"locks\"", 2816 "\"grant\"", 2817 "\"to\"", 2818 "\"deny\"", 2819 "\"revoke\"", 2820 "\"from\"", 2821 "\"acl\"", 2822 "\"principalcollectionset\"", 2823 "\"versioncontrol\"", 2824 "\"update\"", 2825 "\"checkin\"", 2826 "\"checkout\"", 2827 "\"uncheckout\"", 2828 "\"report\"", 2829 "\"ereport\"", 2830 "\"lreport\"", 2831 "\"mkws\"", 2832 "\"exit\"", 2833 "\"quit\"", 2834 "\"bye\"", 2835 "\"set\"", 2836 "\"close\"", 2837 "\"cp\"", 2838 "\"mv\"", 2839 "\"propput\"", 2840 "\"principalcol\"", 2841 "WS", 2842 "CHARS", 2843 "ALPHANUM", 2844 "ALPHA", 2845 "LOWALPHA", 2846 "UPALPHA", 2847 "DIGIT" 2848 }; 2849 2850 private static final long[] mk_tokenSet_0() { 2851 long[] data = { -81065343182709776L, 127L, 0L, 0L}; 2852 return data; 2853 } 2854 public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0()); 2855 2856 } 2857 | Popular Tags |