in src/main/java/com/univocity/parsers/common/AbstractParser.java [113:154]
public final void parse(Reader reader) {
beginParsing(reader);
try {
while (!context.isStopped()) {
input.markRecordStart();
ch = input.nextChar();
if (inComment()) {
processComment();
continue;
}
parseRecord();
String[] row = output.rowParsed();
if (row != null) {
if (recordsToRead >= 0 && context.currentRecord() >= recordsToRead) {
context.stop();
if (recordsToRead == 0) {
stopParsing();
return;
}
}
if (processor != NoopProcessor.instance) {
rowProcessed(row);
}
}
}
stopParsing();
} catch (EOFException ex) {
try {
handleEOF();
} finally {
stopParsing();
}
} catch (Throwable ex) {
try {
ex = handleException(ex);
} finally {
stopParsing(ex);
}
}
}