Siemens TIA is a pilot input, but today the PLC front end only reads raw .scl as generic Structured Text, so Siemens-specific syntax breaks the parse. Teach the existing lexer/parser/AST the SCL dialect so TIA Openness exports parse as first-class PLC code.
ORGANIZATION_BLOCK / DATA_BLOCK / TYPE, BEGIN, VAR_TEMP and VAR CONSTANT.
Accept .scl, .db and .udt files; record .awl (STL) as unsupported rather than failing.
Acceptance
The synthetic TIA SCL/DB/UDT fixtures (MVP-2.5) parse without error and produce an AST the existing rules can run over.
.awl input is recorded as unsupported on the scan run with the offending file named, and the run still completes.
No regression on the CODESYS ST golden baselines.
Unit tests per dialect feature in pipeline/plc/.
## Goal
Siemens TIA is a pilot input, but today the PLC front end only reads raw `.scl` as generic Structured Text, so Siemens-specific syntax breaks the parse. Teach the existing lexer/parser/AST the SCL dialect so TIA Openness exports parse as first-class PLC code.
## What to change
In `pipeline/plc/{lexer,parser,ast}.rs`:
- `#local` temporaries, `"DB".member` qualified access and `%I` / `%Q` / `%M` addressing.
- `REGION` blocks.
- `{ … }` attributes.
- `ORGANIZATION_BLOCK` / `DATA_BLOCK` / `TYPE`, `BEGIN`, `VAR_TEMP` and `VAR CONSTANT`.
- Accept `.scl`, `.db` and `.udt` files; record `.awl` (STL) as **unsupported** rather than failing.
## Acceptance
- [ ] The synthetic TIA SCL/DB/UDT fixtures (MVP-2.5) parse without error and produce an AST the existing rules can run over.
- [ ] `.awl` input is recorded as `unsupported` on the scan run with the offending file named, and the run still completes.
- [ ] No regression on the CODESYS ST golden baselines.
- [ ] Unit tests per dialect feature in `pipeline/plc/`.
sharang
added this to the Production MVP milestone 2026-09-20 20:18:24 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
Siemens TIA is a pilot input, but today the PLC front end only reads raw
.sclas generic Structured Text, so Siemens-specific syntax breaks the parse. Teach the existing lexer/parser/AST the SCL dialect so TIA Openness exports parse as first-class PLC code.What to change
In
pipeline/plc/{lexer,parser,ast}.rs:#localtemporaries,"DB".memberqualified access and%I/%Q/%Maddressing.REGIONblocks.{ … }attributes.ORGANIZATION_BLOCK/DATA_BLOCK/TYPE,BEGIN,VAR_TEMPandVAR CONSTANT..scl,.dband.udtfiles; record.awl(STL) as unsupported rather than failing.Acceptance
.awlinput is recorded asunsupportedon the scan run with the offending file named, and the run still completes.pipeline/plc/.