Metadata-Version: 2.4
Name: ricectopy
Version: 0.1.1
Summary: A lightweight C-to-Python source code translator
Author: Rice Platform
License-Expression: MIT
Project-URL: Homepage, https://riceplatform.org
Keywords: c,python,translator,transpiler,compiler
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
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 :: Compilers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# ricectopy

`ricectopy` is a lightweight C-to-Python source translator for a limited subset of C.

## Installation

```bash
pip install .
```

For development:

```bash
pip install -e .
```

## Python API

```python
import ricectopy as rep

translator = rep.start()

python_code = translator.trans("""
int main() {
    printf("Hello\\n");
    return 0;
}
""")

print(python_code)
```

## Command line

```bash
ricectopy input.c
```

Or specify the output file:

```bash
ricectopy input.c output.py
```

## Currently supported

- Basic function definitions
- `if`, `else if`, `else`
- `while`
- Basic increasing `for` loops
- Primitive variable declarations
- Assignment
- `return`
- Basic `printf`
- `++` and `--`
- `&&`, `||`, `!`
- `true`, `false`, `NULL`

## Limitations

This project is an alpha-stage source translator, not a full C compiler. It does not yet fully support pointers, structs, arrays, macros, `switch`, `scanf`, C type semantics, or the complete `printf` format language.

## Build

```bash
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
```
