The type of of output of this class.
The type of of output of this class.
Errors are separated by using Scala's Either type.
Base class for the finite state machine states used in the parser.
This is a state for handling CR LF style line termination.
Parsing a position inside a cell and collecting data to emit the corresponding fi.pelam.csv.cell.StringCell object.
Parsing a position inside a cell and collecting data to emit the corresponding fi.pelam.csv.cell.StringCell object.
From this state the state machine transitions to QuotedCellContent, LineEnd or CellEnd.
Cell content is ready.
Cell content is ready. Emit the fi.pelam.csv.cell.StringCell object.
Zero width initial state for each cell from where we go to CellContent
Zero width initial state for each cell from where we go to CellContent
Used to handle case where final line ends without termination.
Parser won't continue after encountering first error.
Parser won't continue after encountering first error.
Subsequent calls to read will produce None.
Parser will then remain in this state.
A state signaling that current line has ended.
State machine transitions to this state from state QuotedCellContent when the quote character is encountered.
State machine transitions to this state from state QuotedCellContent when the quote character is encountered. If it is just a lone quote, the quoted section ends.
However, two quote characters together are interpreted as an escaped quote character. At least Excel and Google Docs seem to adhere to this convention.
This state exists to allow separating these two cases.
Parsing a position inside a cell and collecting data to emit the corresponding fi.pelam.csv.cell.StringCell object.
Parsing a position inside a cell and collecting data to emit the corresponding fi.pelam.csv.cell.StringCell object.
The difference to ordinary CellContent state is that a quote has been encountered.
A cell may contain multiple quoted sections, although usually the whole cell content is quoted or none.
Final state that signals that input stream has been exhausted and no more cells will be emitted.
Final state that signals that input stream has been exhausted and no more cells will be emitted.
Subsequent calls to read will produce None.
A "Zero width" initial state of the state machine.
A "Zero width" initial state of the state machine.
If input ends while in this state, zero cells will be emitted.