1 30 31 package de.susebox.jtopas; 32 33 import java.util.Iterator ; 37 38 39 43 109 public interface TokenizerProperties { 110 111 115 124 public static final String DEFAULT_WHITESPACES = " \t\r\n"; 125 126 136 public static final String DEFAULT_SEPARATORS = "\u0021\u0023-\u002f\u003a-\u0040\u005b-\u005e\u0060\u007b-\u007e"; 137 138 141 public static final String DEFAULT_BLOCK_COMMENT_START = "/*"; 142 143 146 public static final String DEFAULT_BLOCK_COMMENT_END = "*/"; 147 148 151 public static final String DEFAULT_LINE_COMMENT = "//"; 152 153 156 public static final String DEFAULT_STRING_START = "\""; 157 158 161 public static final String DEFAULT_STRING_END = DEFAULT_STRING_START; 162 163 166 public static final String DEFAULT_STRING_ESCAPE = "\\"; 167 168 171 public static final String DEFAULT_CHAR_START = "'"; 172 173 176 public static final String DEFAULT_CHAR_END = DEFAULT_CHAR_START; 177 178 182 public static final String DEFAULT_CHAR_ESCAPE = DEFAULT_STRING_ESCAPE; 183 184 185 189 207 public void setParseFlags(int flags); 208 209 218 public int getParseFlags(); 219 220 231 public boolean isFlagSet(int flag); 232 233 249 public boolean isFlagSet(TokenizerProperty prop, int flag) throws NullPointerException ; 250 251 252 256 279 public void setWhitespaces(String whitespaces) throws IllegalArgumentException ; 280 281 298 public void addWhitespaces(String whitespaces) throws IllegalArgumentException ; 299 300 318 public void removeWhitespaces(String whitespaces) throws IllegalArgumentException ; 319 320 327 public String getWhitespaces(); 328 329 353 public void setSeparators(String separators) 354 throws IllegalArgumentException ; 355 356 373 public void addSeparators(String separators) throws IllegalArgumentException ; 374 375 393 public void removeSeparators(String separators) throws IllegalArgumentException ; 394 395 402 public String getSeparators(); 403 404 405 409 438 public void addString(String start, String end, String escape) 439 throws IllegalArgumentException , UnsupportedOperationException ; 440 441 472 public void addString(String start, String end, String escape, Object companion) 473 throws IllegalArgumentException ; 474 475 515 public void addString(String start, String end, String escape, Object companion, int flags) 516 throws IllegalArgumentException , UnsupportedOperationException ; 517 518 541 public void addString(String start, String end, String escape, Object companion, int flags, int flagMask) 542 throws IllegalArgumentException , UnsupportedOperationException ; 543 544 560 public void removeString(String start) 561 throws IllegalArgumentException ; 562 563 575 public Object getStringCompanion(String start) 576 throws IllegalArgumentException , UnsupportedOperationException ; 577 578 593 public boolean stringExists(String start); 594 595 605 public TokenizerProperty getString(String start) 606 throws IllegalArgumentException ; 607 608 616 public Iterator getStrings(); 617 618 619 623 643 public void addLineComment(String lineComment) 644 throws IllegalArgumentException , UnsupportedOperationException ; 645 646 677 public void addLineComment(String lineComment, Object companion) 678 throws IllegalArgumentException , UnsupportedOperationException ; 679 680 723 public void addLineComment(String lineComment, Object companion, int flags) 724 throws IllegalArgumentException , UnsupportedOperationException ; 725 726 747 public void addLineComment(String lineComment, Object companion, int flags, int flagMask) 748 throws IllegalArgumentException , UnsupportedOperationException ; 749 750 765 public void removeLineComment(String lineComment) 766 throws IllegalArgumentException ; 767 768 781 public Object getLineCommentCompanion(String lineComment) 782 throws IllegalArgumentException ; 783 784 793 public boolean lineCommentExists(String lineComment); 794 795 807 public TokenizerProperty getLineComment(String lineComment) 808 throws IllegalArgumentException ; 809 810 817 public Iterator getLineComments(); 818 819 843 public void addBlockComment(String start, String end) 844 throws IllegalArgumentException , UnsupportedOperationException ; 845 846 873 public void addBlockComment(String start, String end, Object companion) 874 throws IllegalArgumentException , UnsupportedOperationException ; 875 876 913 public void addBlockComment(String start, String end, Object companion, int flags) 914 throws IllegalArgumentException , UnsupportedOperationException ; 915 916 938 public void addBlockComment(String start, String end, Object companion, int flags, int flagMask) 939 throws IllegalArgumentException , UnsupportedOperationException ; 940 941 953 public void removeBlockComment(String start) 954 throws IllegalArgumentException ; 955 956 968 public Object getBlockCommentCompanion(String start) 969 throws IllegalArgumentException ; 970 971 981 public boolean blockCommentExists(String start); 982 983 994 public TokenizerProperty getBlockComment(String start) 995 throws IllegalArgumentException ; 996 997 1004 public Iterator getBlockComments(); 1005 1006 1007 1011 1038 public void addSpecialSequence(String specSeq) 1039 throws IllegalArgumentException , UnsupportedOperationException ; 1040 1041 1071 public void addSpecialSequence(String specSeq, Object companion) 1072 throws IllegalArgumentException , UnsupportedOperationException ; 1073 1074 1112 public void addSpecialSequence(String specSeq, Object companion, int flags) 1113 throws IllegalArgumentException , UnsupportedOperationException ; 1114 1115 1136 public void addSpecialSequence(String specSeq, Object companion, int flags, int flagMask) 1137 throws IllegalArgumentException , UnsupportedOperationException ; 1138 1139 1154 public void removeSpecialSequence(String specSeq) 1155 throws IllegalArgumentException ; 1156 1157 1166 public Object getSpecialSequenceCompanion(String specSeq) 1167 throws IllegalArgumentException ; 1168 1169 1176 public Iterator getSpecialSequences(); 1177 1178 1187 public boolean specialSequenceExists(String specSeq); 1188 1189 1199 public TokenizerProperty getSpecialSequence(String specSeq) 1200 throws IllegalArgumentException ; 1201 1202 1203 1207 1228 public void addKeyword(String keyword) 1229 throws IllegalArgumentException , UnsupportedOperationException ; 1230 1231 1253 public void addKeyword(String keyword, Object companion) 1254 throws IllegalArgumentException , UnsupportedOperationException ; 1255 1256 1285 public void addKeyword(String keyword, Object companion, int flags) 1286 throws IllegalArgumentException , UnsupportedOperationException ; 1287 1288 1308 public void addKeyword(String keyword, Object companion, int flags, int flagMask) 1309 throws IllegalArgumentException , UnsupportedOperationException ; 1310 1311 1326 public void removeKeyword(String keyword) 1327 throws IllegalArgumentException ; 1328 1329 1338 public Object getKeywordCompanion(String keyword) 1339 throws IllegalArgumentException ; 1340 1341 1348 public Iterator getKeywords(); 1349 1350 1359 public boolean keywordExists(String keyword); 1360 1361 1371 public TokenizerProperty getKeyword(String keyword) 1372 throws IllegalArgumentException ; 1373 1374 1375 1379 1416 public void addPattern(String pattern) 1417 throws IllegalArgumentException , UnsupportedOperationException ; 1418 1419 1442 public void addPattern(String pattern, Object companion) 1443 throws IllegalArgumentException , UnsupportedOperationException ; 1444 1445 1475 public void addPattern(String pattern, Object companion, int flags) 1476 throws IllegalArgumentException , UnsupportedOperationException ; 1477 1478 1500 public void addPattern(String pattern, Object companion, int flags, int flagMask) 1501 throws IllegalArgumentException , UnsupportedOperationException ; 1502 1503 1518 public void removePattern(String pattern) 1519 throws IllegalArgumentException ; 1520 1521 1534 public Object getPatternCompanion(String pattern) 1535 throws IllegalArgumentException ; 1536 1537 1550 public boolean patternExists(String pattern); 1551 1552 1562 public TokenizerProperty getPattern(String pattern) 1563 throws IllegalArgumentException ; 1564 1565 1572 public Iterator getPatterns(); 1573 1574 1575 1579 1600 public void addProperty(TokenizerProperty property) 1601 throws IllegalArgumentException , UnsupportedOperationException ; 1602 1603 1611 public void removeProperty(TokenizerProperty property) 1612 throws IllegalArgumentException ; 1613 1614 1620 public Iterator getProperties(); 1621 1622 1634 public boolean propertyExists(TokenizerProperty property); 1635 1636 1637 1641 1664 public void addTokenizerPropertyListener(TokenizerPropertyListener listener); 1665 1666 1674 public void removeTokenizerPropertyListener(TokenizerPropertyListener listener); 1675} 1676 | Popular Tags |