Skip to content

Phase 3.8 — Conformance: CSV-style parser using pattern matching on characters #34

Description

@whoisclebs

Parent

Part of #5 (Phase 3: Implement pattern matching).

Background

This integration test exercises the full pattern-matching pipeline with a real-world scenario: parsing a comma-separated line into fields by iterating over characters and matching on each one. It combines for-in iteration, match on char, accumulation into a string, and Vec construction — validating that all Phase 3 features compose correctly.

Spec reference: docs/design/spec.md §5 · Crates: paco-match, paco-eval

What already exists

  • compiler/paco-match/src/lib.rs — full exhaustiveness checker.
  • compiler/paco-eval/src/lib.rs — full interpreter including for, match, and string ops.
  • compiler/paco-test-harness/src/lib.rs — golden test harness.

Scope

  • Create tests/conformance/phase_03/csv_parser/input.paco — a parse_csv(line: string) -> Vec<string> function that iterates characters, splits on ,, and returns fields; main calls it on a sample line and prints each field.
  • Create tests/conformance/phase_03/csv_parser/expected.stdout with each field on its own line.
  • Create tests/conformance/phase_03/csv_parser/flags.toml with kind = "run" and feature_min = 3.

Acceptance Criteria

  • Fields are split correctly on commas.
  • Leading/trailing characters within fields are preserved.
  • Output matches expected.stdout byte-for-byte.
  • All previously passing conformance tests remain green.

Key files

  • tests/conformance/phase_03/csv_parser/ — new test directory
  • compiler/paco-eval/src/lib.rs — character iteration and string accumulation
  • compiler/paco-driver/tests/conformance.rs — conformance runner

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/analysisType system, trait solver, borrow checker, pattern matchingenhancementNew feature or requestphase/3Phase 3: pattern matchingstatus/readyAll dependencies met — ready to implement

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions