# marcelojtelles/parse-file-sm architecture

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

- Interactive diagram: https://gitdiagram.com/marcelojtelles/parse-file-sm
- Repository: https://github.com/marcelojtelles/parse-file-sm

## Overview

SimpleMarkup is documented as a syntax validator for `.sm` files. Its intended workflow reads a file, tokenizes its contents into opening-tag, closing-tag, and text tokens, then parses those tokens with a stack to determine whether tags are properly nested and matched. The README describes this architecture and an example main program, but no implementation files are present, so the graph represents documented responsibilities rather than inspected runtime code.

Main entry points: [`README.md`](https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md) (Validator main)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_sm_file["SM file"]
node_main["Validator main<br/>[README.md]"]
node_lexer["Tokenizer<br/>[README.md]"]
node_tokens["Token list<br/>[README.md]"]
node_parser["Stack parser<br/>[README.md]"]
node_result["Syntax result<br/>[README.md]"]

node_user -->|"runs validation"| node_main
node_main -->|"reads contents"| node_sm_file
node_main -->|"tokenizes contents"| node_lexer
node_lexer -->|"produces tokens"| node_tokens
node_main -->|"parses tokens"| node_parser
node_tokens -->|"supplies input"| node_parser
node_main -->|"prints validity"| node_result

click node_main "https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md"
click node_lexer "https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md"
click node_tokens "https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md"
click node_parser "https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md"
click node_result "https://github.com/marcelojtelles/parse-file-sm/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_user toneBlue
class node_sm_file toneIndigo
class node_main,node_lexer,node_tokens,node_parser,node_result toneTeal
```

## Components

### Other components

- **User**
- **SM file**
- [Validator main](https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md): `README.md`
- [Tokenizer](https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md): `README.md`
- [Token list](https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md): `README.md`
- [Stack parser](https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md): `README.md`
- [Syntax result](https://github.com/marcelojtelles/parse-file-sm/blob/main/README.md): `README.md`

## Connections

- User → Validator main: runs validation (evidence: `README.md`)
- Validator main → SM file: reads contents (evidence: `README.md`)
- Validator main → Tokenizer: tokenizes contents (evidence: `README.md`)
- Tokenizer → Token list: produces tokens (evidence: `README.md`)
- Validator main → Stack parser: parses tokens (evidence: `README.md`)
- Token list → Stack parser: supplies input (evidence: `README.md`)
- Validator main → Syntax result: prints validity (evidence: `README.md`)
