| 300 | self.field.append(c) |
| 301 | |
| 302 | def parse_process_char(self, c): |
| 303 | switch = { |
| 304 | START_RECORD: self._parse_start_record, |
| 305 | START_FIELD: self._parse_start_field, |
| 306 | ESCAPED_CHAR: self._parse_escaped_char, |
| 307 | AFTER_ESCAPED_CRNL: self._parse_after_escaped_crnl, |
| 308 | IN_FIELD: self._parse_in_field, |
| 309 | IN_QUOTED_FIELD: self._parse_in_quoted_field, |
| 310 | ESCAPE_IN_QUOTED_FIELD: self._parse_escape_in_quoted_field, |
| 311 | QUOTE_IN_QUOTED_FIELD: self._parse_quote_in_quoted_field, |
| 312 | EAT_CRNL: self._parse_eat_crnl, |
| 313 | } |
| 314 | return switch[self.state](c) |
| 315 | |
| 316 | def _parse_start_record(self, c): |
| 317 | if c == '\0': |