TokenizerImpl tokenizer = new TokenizerImpl(s);
Delimiter delimiter = tokenizer.getEndingDelimiter();
Parser<T> parser = new Parser<T>(tokenizer, foo, Mode.COMPLETE);
// Last non separator event
Event last = null;
Event.Separator separator = null;
Event.Stop stop;
//
while (true) {
Event event = parser.next();
if (event instanceof Event.Separator) {
separator = (Event.Separator)event;
} else if (event instanceof Event.Stop) {
stop = (Event.Stop)event;
break;