Metadata-Version: 2.4
Name: simply-lang
Version: 0.2.1
Summary: Simply: a small, explicit, readable programming language.
Project-URL: Homepage, https://github.com/GamasDoRpg/Simpy
Project-URL: Repository, https://github.com/GamasDoRpg/Simpy
Project-URL: Issues, https://github.com/GamasDoRpg/Simpy/issues
Keywords: simply,programming-language,interpreter,education
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Interpreters
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Simply

Simply is an experimental programming language focused on explicit, readable code. The GitHub repository is named **Simpy**, but the language is **Simply**.

## Simply 0.2

```simply
STRING name = INPUT("Name: ")
INT age = INPUT("Age: ")
BOOL access = True

IF age >= 18 AND access:
    DISPLAY("Welcome", name)
ELSE IF age >= 13:
    DISPLAY("Teen access")
ELSE:
    DISPLAY("Blocked")

END
```

v0.2 includes:

- `ELSE IF`
- `AND`, `OR`, `NOT`
- `INPUT(...)`
- `WHILE`
- isolated `TEST(...)` blocks

It intentionally does **not** include `FOR`, `EXPECT`, functions, `RETURN`, `BREAK`, `CONTINUE`, lists, or classes yet.

## Install

After the first PyPI release, install the Simply runtime from any terminal:

```bash
python -m pip install simply-lang
```

Then run `.sim` files from any folder:

```bash
simply program.sim
```

Run test blocks with:

```bash
simply test program.sim
```

For local development from a clone of this repository:

```bash
python -m pip install -e .
```

## VS Code

After the Marketplace release, install editor support with:

```bash
code --install-extension gamasdorpg.simply-language-support
```

Then `.sim` files are recognized as **Simply** anywhere. `Ctrl+K M` will list Simply as a language mode, and the extension provides syntax highlighting plus live lexer/parser/type diagnostics in the **Problems** panel.

The extension no longer needs a cloned Simpy repository. It communicates with the installed runtime through:

```text
simply diagnostics
```

If the CLI is installed outside VS Code's PATH, set **Simply: Executable Path** in VS Code.

Until the Marketplace release is published, repository development can still use the local extension tooling.

## Architecture

```text
.sim source
    ↓
Lexer
    ↓
Tokens + INDENT/DEDENT
    ↓
Recursive-descent Parser
    ↓
AST
    ↓
Semantic Analyzer + Symbol Scopes
    ↓
Tree-walking Interpreter
    ↓
Runtime
    ↓
Output
```

The implementation is written in Python 3.10+ and has no third-party runtime dependencies.

## INPUT

The declared variable type determines how input is converted:

```simply
INT age = INPUT("Age: ")
FLOAT score = INPUT("Score: ")
STRING name = INPUT("Name: ")
BOOL ready = INPUT("Ready (True/False): ")
```

## WHILE

```simply
INT x = 0

WHILE x < 5:
    DISPLAY(x)
    x = x + 1

END
```

## TEST

Tests are isolated and receive copies only of the variables listed in `TEST(...)`.

```simply
INT x = 10
INT y = 2

TEST(x, y):
    x = x + y
    DISPLAY(x)
END

DISPLAY(x)
END
```

Normal execution skips test blocks. Test mode executes them.

## Quality checks

Run the Python test suite:

```bash
python -m unittest discover -s tests -v
```

GitHub Actions also verifies the Python package build and packages the VS Code extension as a VSIX on pushes and pull requests.

## Publishing

See [`DISTRIBUTION.md`](DISTRIBUTION.md) for the complete PyPI and Visual Studio Marketplace release procedure.

## Project layout

```text
simply/
    tokens.py
    lexer.py
    parser.py
    ast_nodes.py
    semantic.py
    typesys.py
    environment.py
    interpreter.py
    runtime.py
    runner.py
    diagnostics.py
    cli.py

main.py
LANGUAGE_SPEC.md
DISTRIBUTION.md
examples/
tests/
.vscode/
vscode-extension/
```

See `LANGUAGE_SPEC.md` for the exact v0.2 rules.
