Metadata-Version: 2.5
Name: pseudocode-i18n
Version: 0.2.0
Summary: Multilingual educational pseudocode parser, Python transpiler and runtime
Author: Rod2ik
License: GPL-3.0-or-later
License-File: LICENSE
Keywords: education,i18n,pseudocode,python,transpiler
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Education
Classifier: Topic :: Software Development :: Compilers
Requires-Python: >=3.11
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mkdocs-material>=9.6; extra == 'dev'
Requires-Dist: mkdocs<2,>=1.6; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.12; extra == 'dev'
Description-Content-Type: text/markdown

# pseudocode-i18n

`pseudocode-i18n` is the multilingual semantic core of the Pseudocode ecosystem. It provides language definitions, tolerant parsing, a canonical AST, canonical formatting, pseudocode → Python transpilation, runtime execution, project configuration and shared semantic vocabulary for companion editor/rendering projects.

Current version: **0.2.0**.

Bundled languages: French (`fr`), English (`en`), Spanish (`es`), German (`de`), Italian (`it`) and Portuguese (`pt`).

```text
Fonction factorielle(n):
    r = 1
    Pour i de 1 à n:
        r = r * i
    Renvoyer r

Afficher factorielle(5)
```

## Installation

```bash
python -m pip install pseudocode-i18n
```

On a deliberately system-managed installation that requires it:

```bash
python -m pip install --break-system-packages pseudocode-i18n
```

## Main CLI

Run directly or explicitly:

```bash
pseudo factorielle.pseudo-fr
pseudo run factorielle.pseudo-fr
```

These two commands are equivalent.

Other commands:

```bash
pseudo check factorielle.pseudo-fr
pseudo transpile factorielle.pseudo-fr
pseudo transpile factorielle.pseudo-fr -o factorielle.py
pseudo format factorielle.pseudo-fr
pseudo format factorielle.pseudo-fr --check
```

Language options are equivalent:

```bash
--language fr
--lang fr
-l fr
```

## Canonical defaults

The parser is intentionally tolerant, while the formatter converges on one predictable style per language:

- indentation-based blocks;
- trailing `:` by default;
- no explicit `Fin ...` / `End ...` markers in canonical output;
- case-insensitive grammar vocabulary;
- accentless equivalents for accented declared vocabulary;
- French canonical return keyword: `Renvoyer`;
- statement and function-call variants accepted where supported, for example `Afficher "Bonjour"` and `Afficher("Bonjour")`.

## Project configuration

Canonical filename:

```text
pseudocode.config.yml
```

Example:

```yaml
language: fr

format:
  colons: true
  indent: 4
```

The CLI discovers this file from the source directory upward through parent directories. It can also be selected explicitly with `--config-file` or `--config`.

## Documentation

The MkDocs site is deliberately organized into:

- **Installation**;
- **Configuration**;
- **Usage** — exhaustive user guide plus one generated reference page per supported language;
- **Development**;
- **Reference**.

Language-reference pages are generated directly from the bundled YAML definitions:

```bash
yarn docs:sync
```

Documentation structure and navigation are checked with:

```bash
yarn docs:check
```

**Project policy:** documentation is part of every change. Any modification to code, grammar, CLI behavior, configuration, formatting, transpilation, language data or development workflow must update the relevant documentation in the same revision.

## Development

Bootstrap the checkout:

```bash
yarn setup
```

Run the complete validation pipeline:

```bash
yarn bfc
```

`yarn bfc` synchronizes/checks the version, lints, tests, regenerates/checks/builds documentation, and builds the Python package.

## Companion projects

- `pygments-lexer-pseudocode-i18n` — reusable Pygments lexer;
- `mkdocs-pseudocode-i18n` — MkDocs integration;
- `vscode-pseudocode` — VS Code extension.

## License

GNU General Public License version 3 or later (**GPL-3.0-or-later**).
