# thebugstudio/freebsd-cli-calculator architecture

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

- Interactive diagram: https://gitdiagram.com/thebugstudio/freebsd-cli-calculator
- Repository: https://github.com/thebugstudio/freebsd-cli-calculator

## Overview

This is a small terminal calculator: the user enters an expression, and the program parses space-separated tokens, checks them, computes addition or subtraction, and prints a result. The shown runtime entry point is `BSDCalculator.cpp`; it includes `Calc.hh` and uses its `calc` type. `AbsClass.cpp` appears to be a separate, incomplete program and is not shown as part of that runtime path. The contents of `Calc.hh` were not provided, so its internal responsibilities are not expanded here.

Main entry points: [`BSDCalculator.cpp`](https://github.com/thebugstudio/freebsd-cli-calculator/blob/main/BSDCalculator.cpp) (Calculator program), [`Calc.hh`](https://github.com/thebugstudio/freebsd-cli-calculator/blob/main/Calc.hh) (Calc token type)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Terminal user"))
node_calculator["Calculator program<br/>[BSDCalculator.cpp]"]
node_calc_type["Calc token type<br/>[Calc.hh]"]

node_user -->|"enters expression"| node_calculator
node_calculator -->|"creates tokens"| node_calc_type
node_calculator -->|"prints result"| node_user

click node_calculator "https://github.com/thebugstudio/freebsd-cli-calculator/blob/main/BSDCalculator.cpp"
click node_calc_type "https://github.com/thebugstudio/freebsd-cli-calculator/blob/main/Calc.hh"

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_calculator,node_calc_type toneTeal
```

## Components

### Other components

- **Terminal user**
- [Calculator program](https://github.com/thebugstudio/freebsd-cli-calculator/blob/main/BSDCalculator.cpp): `BSDCalculator.cpp`
- [Calc token type](https://github.com/thebugstudio/freebsd-cli-calculator/blob/main/Calc.hh): `Calc.hh`

## Connections

- Terminal user → Calculator program: enters expression (evidence: `BSDCalculator.cpp`)
- Calculator program → Calc token type: creates tokens (evidence: `BSDCalculator.cpp`)
- Calculator program → Terminal user: prints result (evidence: `BSDCalculator.cpp`)
