YREA-SLS/SLS_Python
Kyler Olsen 3c288e9165 worked on filling in the project 2025-12-02 21:38:27 -07:00
..
scripts worked on filling in the project 2025-12-02 21:38:27 -07:00
sls worked on filling in the project 2025-12-02 21:38:27 -07:00
tests Python Project Skeleton 2025-12-02 19:10:11 -07:00
.gitignore worked on filling in the project 2025-12-02 21:38:27 -07:00
MANIFEST.in worked on filling in the project 2025-12-02 21:38:27 -07:00
README.md Python Project Skeleton 2025-12-02 19:10:11 -07:00
pyproject.toml worked on filling in the project 2025-12-02 21:38:27 -07:00

README.md

SLS Python

This directory contains a minimal Python project skeleton intended to reimplement functionality from the C SLS project found at the repository root.

Layout

  • src/sls/ — Python package with module skeletons: lexer, parser, interpreter, builtin, repl, and cli.
  • tests/ — pytest tests (start with test_import.py).
  • pyproject.toml — project metadata and sls console script entrypoint.
  • requirements-dev.txt — developer/test tools.

Quick start

Create a venv and install editable package + dev requirements:

python -m venv .venv
source .venv/bin/activate
pip install -e SLS_Python
pip install -r SLS_Python/requirements-dev.txt

Run tests:

pytest -q

Run the REPL:

sls repl

Next steps (suggested)

  • Port lexer.c to src/sls/lexer.py and add comprehensive tokenization tests.
  • Port parser and interpreter incrementally, keeping tests for parity.
  • Add CI (GitHub Actions) and type checking (mypy).

If you want, I can now:

  • Run the tests in this environment (if you want me to configure the Python env), or
  • Start porting a specific module from the C implementation (lexer is a good first target).