# kotarimorm/sentinel_lang architecture

> Architecture diagram of the GitHub repository kotarimorm/sentinel_lang, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kotarimorm/sentinel_lang
- Repository: https://github.com/kotarimorm/sentinel_lang

## Overview

Sentinel Lang is documented as an experimental OSDev-focused compiler: users write `.sl` programs, Sentinel produces inspectable NASM, and NASM produces machine code. The README documents the compiler stages and language capabilities, but this repository tree contains no compiler source; the paths below therefore point to the documentation describing them, not implementation files.

Main entry points: [`README.md`](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md) (Sentinel Source)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_language["Language Model"]
  node_sentinel_source["Sentinel Source<br/>[README.md]"]
  node_language_features["Language Features<br/>[README.md]"]
  node_osdev_commands["OSDev Commands<br/>[README.md]"]
  node_target_selection["Target Selection<br/>[README.md]"]
end

subgraph group_compiler["Compiler Pipeline"]
  node_frontend["Lexer, Parser, AST<br/>[README.md]"]
  node_semantic_analysis["Semantic Analyzer<br/>[README.md]"]
  node_code_generator["NASM Generator<br/>[README.md]"]
  node_optimizer["Optimizer<br/>[README.md]"]
end

subgraph group_outputs["Build Outputs"]
  node_assembly["NASM Assembly<br/>[README.md]"]
  node_nasm["NASM Assembler"]
  node_flat_binary["Flat Binary"]
end

node_programmer(("Programmer"))

node_programmer -->|"writes"| node_sentinel_source
node_sentinel_source -->|"parsed by"| node_frontend
node_frontend -->|"analyzed by"| node_semantic_analysis
node_semantic_analysis -->|"generates through"| node_code_generator
node_code_generator -->|"optimized by"| node_optimizer
node_optimizer -->|"emits"| node_assembly
node_assembly -->|"assembled by"| node_nasm
node_nasm -->|"generates"| node_flat_binary
node_sentinel_source -->|"uses"| node_language_features
node_sentinel_source -->|"may enable"| node_osdev_commands
node_sentinel_source -->|"selects"| node_target_selection

click node_sentinel_source "https://github.com/kotarimorm/sentinel_lang/blob/main/README.md"
click node_language_features "https://github.com/kotarimorm/sentinel_lang/blob/main/README.md"
click node_osdev_commands "https://github.com/kotarimorm/sentinel_lang/blob/main/README.md"
click node_target_selection "https://github.com/kotarimorm/sentinel_lang/blob/main/README.md"
click node_frontend "https://github.com/kotarimorm/sentinel_lang/blob/main/README.md"
click node_semantic_analysis "https://github.com/kotarimorm/sentinel_lang/blob/main/README.md"
click node_code_generator "https://github.com/kotarimorm/sentinel_lang/blob/main/README.md"
click node_optimizer "https://github.com/kotarimorm/sentinel_lang/blob/main/README.md"
click node_assembly "https://github.com/kotarimorm/sentinel_lang/blob/main/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sentinel_source,node_language_features,node_osdev_commands,node_target_selection toneBlue
class node_frontend,node_semantic_analysis,node_code_generator,node_optimizer toneAmber
class node_assembly,node_nasm,node_flat_binary toneMint
class node_programmer toneIndigo
```

## Components

### Language Model

- [Sentinel Source](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md): `README.md`
- [Language Features](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md): `README.md`
- [OSDev Commands](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md): `README.md`
- [Target Selection](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md): `README.md`

### Compiler Pipeline

- [Lexer, Parser, AST](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md): `README.md`
- [Semantic Analyzer](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md): `README.md`
- [NASM Generator](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md): `README.md`
- [Optimizer](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md): `README.md`

### Build Outputs

- [NASM Assembly](https://github.com/kotarimorm/sentinel_lang/blob/main/README.md): `README.md`
- **NASM Assembler**
- **Flat Binary**

### Other components

- **Programmer**

## Connections

- Programmer → Sentinel Source: writes (evidence: `README.md`)
- Sentinel Source → Lexer, Parser, AST: parsed by (evidence: `README.md`)
- Lexer, Parser, AST → Semantic Analyzer: analyzed by (evidence: `README.md`)
- Semantic Analyzer → NASM Generator: generates through (evidence: `README.md`)
- NASM Generator → Optimizer: optimized by (evidence: `README.md`)
- Optimizer → NASM Assembly: emits (evidence: `README.md`)
- NASM Assembly → NASM Assembler: assembled by (evidence: `README.md`)
- NASM Assembler → Flat Binary: generates (evidence: `README.md`)
- Sentinel Source → Language Features: uses (evidence: `README.md`)
- Sentinel Source → OSDev Commands: may enable (evidence: `README.md`)
- Sentinel Source → Target Selection: selects (evidence: `README.md`)
