The scenario
An import preview reads records with delimiters and quoted values. The parser has to distinguish separators from characters that belong inside a field.
A failure to reason about
An address containing a comma is displayed as two columns, shifting the remaining values into the wrong headings.
Illustrative context for the topic. The exercise’s full requirements arrive in the workspace.
Questions to bring to your review
- What state does the scanner need to remember?
- How can the import preview expose a parsing failure?
- Which ordinary input should keep working after the change?
Skills you will practice
- Parsing
- State machines
- Input validation
Read the existing code, reproduce the reported behavior, review proposed changes, and verify your final implementation. You can use AI assistance while staying responsible for the result.
Prepare with a worked example
- How to review AI-generated code
A worked review of a cache patch: establish the contract, find a counterexample, verify the fix, and explain the evidence.
See how nrml evaluates an attempt, including the limits of automated evidence.