Changeset 7206
- Timestamp:
- 2004-04-20T09:20:11+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/CommandTokenizer.java
r6539 r7206 63 63 private int count = -1; 64 64 private StringTokenizer internal_tokenizer; 65 65 private boolean strip_quotes = true; 66 66 /** Basic Constructor. Used to parse tokens from a string keeping tokens surrounded by speechmarks or square brackets intact. Thus something like:<br> 67 67 * collectionmeta collectionextra [l = en] "Hello World"<br> … … 90 90 } 91 91 92 public CommandTokenizer(String command, BufferedReader in_stream, boolean strip_quotes) { 93 this.internal_tokenizer = new StringTokenizer(command); 94 this.in_stream = in_stream; 95 this.strip_quotes = strip_quotes; 96 } 97 92 98 /** Returns the minumum number of remaining tokens before the tokenizer runs out of string. There may be more tokens than this count, but never less. The discrepancy is due to internal functionality and the fact we can't read ahead in the string or associated stream without risking the need for unpredictable push-back 93 99 * @return the minumum number of tokens available as an int … … 120 126 case StaticStrings.DOUBLEQUOTE_CHAR: 121 127 ///ystem.err.println("Building token wrapped by double quotes."); 122 result = buildToken(buffer, StaticStrings.DOUBLEQUOTE_CHAR, t rue);128 result = buildToken(buffer, StaticStrings.DOUBLEQUOTE_CHAR, this.strip_quotes); 123 129 break; 124 130 case StaticStrings.SINGLEQUOTE_CHAR: 125 131 ///ystem.err.println("Building token wrapped by single quotes."); 126 result = buildToken(buffer, StaticStrings.SINGLEQUOTE_CHAR, t rue);132 result = buildToken(buffer, StaticStrings.SINGLEQUOTE_CHAR, this.strip_quotes); 127 133 break; 128 134 case StaticStrings.OPENBRACKET_CHAR:
Note:
See TracChangeset
for help on using the changeset viewer.