> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
$schema: https://holocron.so/frontmatter.json
title: Language Support
description: Which IEC 61131-3 languages, profiles, and size limits the RoboC++ compiler supports today.
icon: lucide:code-2
---

RoboC++ is a **complete IEC 61131-3:2003 language compiler** for the repository's current profile. It implements **Structured Text**, **Instruction List**, **textual and graphical SFC**, **native textual LD and FBD**, and **PLCopen XML** for graphical exchange. The **`2003-strict`** compliance matrix tracks **88 leaf features**, all marked **`implemented`**.

Use **`rbcpp compliance`** and **`rbcpp todos`** as the live source of truth. Target HAL adapters are integration scaffolding, not a certified controller runtime.

## Overview

| Area                          | Status      | Details                                                                    |
| ----------------------------- | ----------- | -------------------------------------------------------------------------- |
| Project structure             | Implemented | `TYPE`, `FUNCTION`, `FUNCTION_BLOCK`, `PROGRAM`, `CONFIGURATION`           |
| Variables and storage         | Implemented | [Types and variables](/types-and-variables)                                |
| Structured Text               | Implemented | [Structured Text](/structured-text)                                        |
| Instruction List              | Implemented | [IL and SFC](/il-and-sfc)                                                  |
| Sequential Function Chart     | Implemented | Textual and PLCopen graphical SFC; see `rbcpp sfc-compliance`              |
| Native Ladder Diagram         | Implemented | [Native LD and FBD](/native-ld-fbd); `.ld` and embedded `LADDER`           |
| Native Function Block Diagram | Implemented | [Native LD and FBD](/native-ld-fbd); `.fbd` and embedded `FBD`             |
| Standard library              | Implemented | [Standard library](/standard-library); communication FBs need target hooks |
| PLCopen XML                   | Implemented | [PLCopen](/plcopen); graphical LD, FBD, SFC, configurations                |
| Target deployment             | Library     | [Targets and Generated C](/targets); `rbcpp_target` adapters               |

## Compliance and profiles

Only **`2003-strict`** and **`2003-plus-extensions`** are claimable profiles. **`2013-placeholder`** and **`2025-placeholder`** exist for future routing; semantic checking rejects non-claimable profiles.

```bash
cargo run -p rbcpp_cli -- compliance --profile 2003-strict
cargo run -p rbcpp_cli -- todos --profile 2003-strict
```

For **`2003-strict`**, **`rbcpp todos`** reports **0** scoped profile items remaining and **0** full compiler completion items.

**`2003-plus-extensions`** relaxes **identifier underscore rules** only (`__` and trailing `_` allowed). It does **not** enable pragmas through the CLI; parsing still uses default implementation parameters with **`pragmas_enabled: false`**.

See [Compliance](/compliance) for feature status meanings.

<Aside>
  <Warning>
    Complete for the **tracked profile** does not mean safety-certified machinery control. Validate deployment timing, I/O failure paths, and hardware mapping for your environment.
  </Warning>
</Aside>

## Implementation limits

Default **implementation parameters** include:

| Parameter                                    | Default                         |
| -------------------------------------------- | ------------------------------- |
| Identifier length                            | 128 characters                  |
| Comment length                               | 1,000,000 characters            |
| Expression depth                             | 256                             |
| Statement depth                              | 256                             |
| Array elements                               | 1,000,000                       |
| Structure elements                           | 4,096                           |
| String length                                | 65,535                          |
| Runtime scan cycles                          | 10,000                          |
| Pragmas                                      | Disabled by default (see below) |
| Source file size (`max_source_bytes`)        | 1 MiB                           |
| PLCopen XML bytes (`max_plcopen_xml_bytes`)  | 1 MiB                           |
| PLCopen XML nodes                            | 150,000                         |
| PLCopen XML depth                            | 256                             |
| PLCopen XML text per node                    | 65,535 bytes                    |
| PLCopen XML attribute size                   | 65,535 bytes                    |
| POUs per project (`max_pous`)                | 10,000                          |
| Variables (`max_variables`)                  | 100,000                         |
| Symbols (`max_symbols`)                      | 150,000                         |
| Generated C output (`max_generated_c_bytes`) | 1 MiB                           |

Print limits with **`rbcpp parameters --json`**. The compiler repo **`validation/LIMITS.md`** documents diagnostic behavior when limits are exceeded.

### Source file extensions

The CLI accepts **`.st`**, **`.il`**, **`.sfc`**, **`.ld`**, **`.fbd`**, and **`.xml`** (PLCopen). Textual extensions share the same parser frontend.

### Framed comments and pragmas

Under **`2003-strict`**, **nested framed comments** (`(* … (* … *) … *)`) are rejected with a compliance diagnostic.

**Pragmas** are implemented in the matrix but **disabled by default** (`pragmas_enabled: false`). The CLI always parses with default implementation parameters; neither profile enables pragmas automatically. Library embedders can set **`CheckOptions.implementation.pragmas_enabled = true`** when calling **`check_project`** directly.

## CLI boundaries

These areas are implemented in crates but **not** fully exposed on the command line:

| Capability                        | CLI today         | Where it lives                                      |
| --------------------------------- | ----------------- | --------------------------------------------------- |
| Configuration scheduler C codegen | `run` only        | `iec_runtime`; `build-c` emits a single **PROGRAM** |
| Communication FB simulation       | No hook installer | `iec_runtime` `CommunicationHooks` API              |
| Warm restart before cycles        | No flag           | `RuntimeOptions::warm_restart_before_cycles`        |
| Target HAL / supervisor           | No command        | `rbcpp_target` library used with generated C        |

## Language reference

<CardGroup cols={2}>
  <Card title="Types and variables" icon="lucide:variable" href="/types-and-variables">
    Derived types, VAR blocks, RETAIN, AT, and direct variables.
  </Card>

  <Card title="Structured Text" icon="lucide:braces" href="/structured-text">
    Control flow, expressions, functions, and FB calls.
  </Card>

  <Card title="Standard library" icon="lucide:library" href="/standard-library">
    Standard functions and function blocks.
  </Card>

  <Card title="IL and SFC" icon="lucide:git-branch" href="/il-and-sfc">
    Instruction List operators and textual SFC.
  </Card>

  <Card title="Native LD and FBD" icon="lucide:layout-grid" href="/native-ld-fbd">
    LADDER/RUNG and FBD/NETWORK syntax.
  </Card>

  <Card title="PLCopen" icon="lucide:file-code" href="/plcopen">
    XML import/export and graphical lowering.
  </Card>

  <Card title="Targets" icon="lucide:cpu" href="/targets">
    Generated C hooks and rbcpp\_target HAL helpers.
  </Card>
</CardGroup>


---

*Powered by [holocron.so](https://holocron.so)*
