64 lines
1.8 KiB
Markdown
64 lines
1.8 KiB
Markdown
# Step 2: syntax-diagnostics
|
|
|
|
## Read First
|
|
|
|
Read these files before editing:
|
|
|
|
- `/AGENTS.md`
|
|
- `/docs/ARCHITECTURE.md`
|
|
- `/docs/ADR.md`
|
|
- `/docs/io-definitions/abaqus-input-parser-io.md`
|
|
- `/src/fesa/io/abaqus/input_parser.hpp`
|
|
- `/src/fesa/io/abaqus/input_parser.cpp`
|
|
- `/tests/unit/abaqus_input_parser_mesh_test.cpp`
|
|
|
|
Review completed step summaries in `/phases/abaqus-input-parser/index.json`.
|
|
|
|
## Task
|
|
|
|
Add structured diagnostics for parser syntax and unsupported subset behavior.
|
|
|
|
Required behavior:
|
|
|
|
- Unsupported keywords produce `Status::is_ok() == false` with an error
|
|
diagnostic code and message that identifies the keyword.
|
|
- Malformed `*NODE` and `*ELEMENT` data lines produce error diagnostics.
|
|
- Missing required `TYPE` on `*ELEMENT` produces an error diagnostic.
|
|
- Unsupported element types produce an error diagnostic and do not add that
|
|
element.
|
|
- Diagnostics must include enough context in the message to locate the line
|
|
number.
|
|
- Existing valid mesh parser behavior remains unchanged.
|
|
|
|
## Tests To Write First
|
|
|
|
Extend `/tests/unit/abaqus_input_parser_mesh_test.cpp` or add
|
|
`/tests/unit/abaqus_input_parser_diagnostics_test.cpp` before production code.
|
|
|
|
Test:
|
|
|
|
- unsupported keyword failure;
|
|
- malformed node row failure;
|
|
- missing element `TYPE` failure;
|
|
- unsupported element type failure.
|
|
|
|
Run the targeted CTest and confirm the new tests fail for missing behavior
|
|
before implementation.
|
|
|
|
## Acceptance Criteria
|
|
|
|
```powershell
|
|
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R abaqus_input_parser
|
|
python -m unittest discover -s scripts -p "test_*.py"
|
|
python scripts/validate_workspace.py
|
|
```
|
|
|
|
## Verification Procedure
|
|
|
|
Update step 2 status with summary or a concrete error/blocked reason.
|
|
|
|
## Forbidden
|
|
|
|
- Do not add new semantic model fields except what diagnostics require.
|
|
- Do not add material, section, step, boundary, or load parsing.
|