67 lines
2.2 KiB
Markdown
67 lines
2.2 KiB
Markdown
# Step 3: parser-foundation
|
|
|
|
## Sprint Contract
|
|
|
|
### Objective
|
|
Implement the Abaqus input lexical/keyword parser foundation plus Factory + Registry plumbing for Phase 1 objects.
|
|
|
|
### Required Reading
|
|
- /AGENTS.md
|
|
- /PROGRESS.md
|
|
- /PLAN.md
|
|
- /docs/README.md
|
|
- /docs/HARNESS_ENGINEERING.md
|
|
- /docs/ARCHITECTURE.md
|
|
- /docs/ADR.md
|
|
- /docs/ABAQUS_INPUT_SUBSET.md
|
|
- /phases/1-linear-static-mitc4/step2.md
|
|
|
|
### Scope
|
|
- Tokenize Abaqus keyword lines, parameters, data lines, comments, continuations if documented, and source locations.
|
|
- Add a parser result shape that returns Domain data or diagnostics.
|
|
- Add keyword Factory + Registry structure without completing every Phase 1 keyword.
|
|
- Add smoke parsing for a tiny supported subset such as `*Node` and `*Element, TYPE=S4`.
|
|
|
|
### Allowed Files
|
|
- `include/**`
|
|
- `src/**`
|
|
- `tests/**`
|
|
- `PLAN.md`
|
|
- `PROGRESS.md`
|
|
- `phases/1-linear-static-mitc4/index.json`
|
|
|
|
### Explicit Non-Goals
|
|
- Do not complete all Phase 1 Abaqus keywords in this step.
|
|
- Do not silently accept unsupported keywords or unknown parameters.
|
|
- Do not parse `quad_01.inp` as a supported Phase 1 case.
|
|
|
|
### Tests To Write First
|
|
- Lexer tests for keyword names, parameters, comments, blank lines, and source locations.
|
|
- Registry tests for supported and unsupported keyword dispatch.
|
|
- Parser smoke tests for minimal nodes and S4 elements.
|
|
|
|
### Reference Artifacts
|
|
- None. Existing `references/quad_01.inp` is not a Phase 1 parser acceptance case.
|
|
|
|
### Acceptance Commands
|
|
```bash
|
|
python scripts/validate_workspace.py
|
|
```
|
|
|
|
### Evaluator Checklist
|
|
- Unsupported input produces diagnostics with line context.
|
|
- Factory + Registry is present and parser logic is not hardwired into Domain constructors.
|
|
- Parser tests do not expand Phase 1 support beyond `docs/ABAQUS_INPUT_SUBSET.md`.
|
|
|
|
### Handoff Requirements
|
|
- Record progress and validation in `PROGRESS.md`.
|
|
- Update `PLAN.md` if parser-scope risks change.
|
|
- Update the matching phase index entry: use `completed` with a one-line `summary`, or `blocked` with `blocked_reason`, or `error` with `error_message`.
|
|
|
|
## Verification
|
|
1. Run the acceptance command.
|
|
2. Inspect parser tests for line-numbered diagnostic coverage.
|
|
|
|
## Do Not
|
|
- Do not normalize away Abaqus labels that later diagnostics or references need.
|