Changeset 5986
- Timestamp:
- 2003-11-25T16:15:26+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Dictionary.java
r5862 r5986 289 289 int opening = initial.indexOf('{'); 290 290 int closing = initial.indexOf('}'); 291 int comment_mark = initial.indexOf('-', opening); // May not exist 292 if(comment_mark > closing) { // May also be detecting a later comment 293 comment_mark = -1; 294 } 291 295 complete = complete + initial.substring(0, opening); 292 296 // Parse arg_num 293 String arg_str = initial.substring(opening + 1, closing); 297 String arg_str = null; 298 if(comment_mark != -1) { 299 arg_str = initial.substring(opening + 1, comment_mark); 300 } 301 else { 302 arg_str = initial.substring(opening + 1, closing); 303 } 294 304 int arg_num = Integer.parseInt(arg_str); 295 305 if(closing + 1 < initial.length()) { … … 318 328 catch (Exception e) { 319 329 System.err.println("Missing value for key: " + key); 330 Gatherer.printStackTrace(e); 320 331 return key; 321 332 }
Note:
See TracChangeset
for help on using the changeset viewer.