Documentation
Welcome to the Vlaams Codex documentation! Here you'll find everything you need to get started with Platskript, from installation to advanced features.
Documentatie
Welkom bij de Vlaams Codex documentatie. Hier vindt ge alles om te beginnen met Platskript, van installatie tot geavanceerde features.
Getting Started
Vlaams Codex is a transpiler toolchain for Platskript (.plats), a programming language that uses Flemish dialect keywords. It compiles Platskript source code to Python and executes it.
Aan de slag
Vlaams Codex is een transpiler toolchain voor Platskript (.plats): een programmeertaal met Vlaamse dialect-keywords. Vlaams Codex compileert uw Platskript naar Python en voert het uit.
Quick Install
pip install vlaamscodex
That's it! You're ready to write your first Platskript program.
Snel installeren
pip install vlaamscodex
Da’s het. Ge zijt klaar om uw eerste Platskript-programma te schrijven.
Your First Program
Create a file called hello.plats:
Uw eerste programma
Maak een bestand hello.plats:
# coding: vlaamsplats
plan doe
klap tekst gdag aan weeireld amen
gedaan
Run it:
Voer het uit:
plats run hello.plats
Output:
Output:
gdag aan weeireld
Installation
There are several ways to install Vlaams Codex depending on your needs:
Installatie
Er zijn meerdere manieren om Vlaams Codex te installeren, afhankelijk van wat ge nodig hebt:
Option A: pip (Recommended)
Optie A: pip (aanbevolen)
pip install vlaamscodex
Standard installation that works with your existing Python environment.
Standaardinstallatie die werkt met uw bestaande Python-omgeving.
Option B: pipx (Isolated)
Optie B: pipx (geïsoleerd)
pipx install vlaamscodex
Perfect for end users. Keeps dependencies isolated from your system Python.
Perfect voor eindgebruikers. Houdt afhankelijkheden geïsoleerd van uw systeem-Python.
Option C: Development Mode
Optie C: development mode
git clone https://github.com/brentishere41848/Vlaams-Codex.git
cd Vlaams-Codex
pip install -e ".[dev]"
For contributors. Includes test suite and development tools.
Voor bijdragers. Inclusief testsuite en ontwikkeltools.
Option D: npm
Optie D: npm
npm install vlaamscodex
Install for JavaScript/Node.js projects. Available now on npm!
Installeren voor JavaScript/Node.js-projecten. Nu beschikbaar op npm.
VS Code Extension
For the best development experience, install the Vlaams Codex VS Code extension:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Vlaams Codex"
- Click Install
VS Code-extensie
Voor de beste developer experience installeert ge de Vlaams Codex VS Code-extensie:
- Open VS Code
- Ga naar Extensions (Ctrl+Shift+X)
- Zoek op “Vlaams Codex”
- Klik op Install
Language Specification
Platskript is a simple, dialect-based programming language. Here's a quick overview:
Taal-specificatie
Platskript is een simpele, dialect-gebaseerde programmeertaal. Hieronder een korte uitleg.
Program Structure
Programs are wrapped in plan doe ... gedaan. Statements terminate with amen.
Programmastructuur
Programma’s zitten in plan doe ... gedaan. Elke statement eindigt met amen.
Statements
Statements
| Syntax Syntax | Description Uitleg |
|---|---|
zet <var> op <expr> amen |
Variable assignment Variabele toekenning |
klap <expr> amen |
Print expression Print een expressie |
maak funksie <name> met <params...> doe ... gedaan |
Function definition Functie-definitie |
roep <name> met <args...> amen |
Function call Functie oproepen |
geeftterug <expr> amen |
Return statement Return statement |
Expressions
Expressies
-
tekst <words...>- String literal (words joined by spaces) - Tekst literal (woorden aan elkaar met spaties) -
getal <digits>- Numeric literal - Getal literal -
da <name>- Variable reference - Variabele referentie -
spatie- Space character literal - Spatie character -
plakt- String concatenation operator - Tekst samenplakken operator
CLI Reference
Vlaams Codex provides a command-line interface called plats with support for multiple Flemish dialects.
CLI referentie
Vlaams Codex heeft een command-line interface: plats, met support voor meerdere Vlaamse dialecten.
Available Commands
Beschikbare commando’s
plats run <file.plats> # Run a Platskript program
plats show-python <file> # Display generated Python code
plats build <file.plats> # Compile to a Python file
plats repl # Interactive REPL
plats examples # Browse built-in examples
plats check <file.plats> # Check syntax
plats init <name> # Create a new project
plats fortune # Random Flemish proverb
plats run <file.plats> # Run een Platskript-programma
plats show-python <file> # Toon de gegenereerde Python-code
plats build <file.plats> # Compileer naar een Python file
plats repl # Interactieve REPL
plats examples # Bekijk ingebouwde voorbeelden
plats check <file.plats> # Check de syntax
plats init <name> # Maak een nieuw project
plats fortune # Willekeurige Vlaamse spreuk
Dialect Aliases
Every command works in 7 Flemish dialects! For example, to run a program:
Dialect-aliassen
Elk commando werkt in 7 Vlaamse dialecten. Bijvoorbeeld om een programma te runnen:
plats run script.plats # Standard
plats voertuut script.plats # West-Vlaams
plats doet script.plats # Antwerps
plats gaon script.plats # Limburgs
plats doeda script.plats # Brussels
See the Multi-Vlaams Dialects page for a complete list of aliases.
Zie de pagina Multi-Vlaams dialecten voor een volledige lijst met aliassen.
Multi-Vlaams Dialects
Vlaams Codex v0.2.0 introduces full support for 7 Flemish dialects with 80+ command aliases. Use whichever dialect feels most natural to you!
Multi-Vlaams dialecten
Vlaams Codex ondersteunt 7 Vlaamse dialecten met 80+ commando-aliassen. Gebruik wat voor u het meest natuurlijk aanvoelt.
Supported Dialects
Ondersteunde dialecten
- Standard - The base dialect- Basisdialect
- West-Vlaams - The classic West Flemish dialect- Klassiek West-Vlaams
- Antwerps - Antwerp dialect- Antwerps dialect
- Limburgs - Limburg dialect- Limburgs dialect
- Brussels - Brussels dialect- Brussels dialect
- Genks - Genk dialect- Genks dialect
- Standard + - Extended standard dialect- Uitgebreid standaard
Error Messages
Error messages also come in your dialect:
Foutmeldingen
Foutmeldingen komen ook in uw dialect:
Manneke, gij zijt 'amen' vergeten op lijn 5! (Antwerps)
Jansen, ge zijt 'amen' vergeten op lijn 5! (West-Vlaams)
For a complete list of dialect commands, see the Multi-Vlaams Dialects documentation.
Voor de volledige lijst met dialectcommando’s: zie Multi-Vlaams dialecten.
Magic Mode
Magic Mode allows you to run .plats files directly with Python using custom source encoding. No compilation step needed!
Magic Mode
Magic Mode laat u .plats-bestanden rechtstreeks uitvoeren met Python via custom source encoding. Geen compilatie nodig.
How It Works
Hoe werkt dat?
- Python detects
# coding: vlaamsplats(PEP 263) and requests the corresponding codec - During normal startup, Python's
sitemodule processes.pthfiles in site-packages - VlaamsCodex installs
vlaamscodex_autoload.pthcontaining the codec registration - The codec decodes UTF-8 bytes, strips the encoding declaration, transpiles Platskript to Python
- Python executes the generated code transparently
- Python ziet
# coding: vlaamsplats(PEP 263) en vraagt de juiste codec op - Bij normaal opstarten verwerkt Python z’n
site-module de.pth-files in site-packages - VlaamsCodex installeert
vlaamscodex_autoload.pthdat de codec registreert - De codec decodeert UTF-8 bytes, haalt de encoding-regel weg en transpilt Platskript naar Python
- Python voert de gegenereerde code transparant uit
Usage
Create a file with the encoding header:
Gebruik
Maak een bestand met de encoding header:
# coding: vlaamsplats
plan doe
klap tekst hallo amen
gedaan
Run it directly with Python:
Voer het rechtstreeks uit met Python:
python hello.plats
Limitations
Beperkingen
- python -S: Disables
sitemodule, preventing.pthhook execution - python -I: Isolated mode restricts site-packages access
- Fallback: Use
plats run script.platswhen magic mode is unavailable
- python -S: schakelt de
site-module uit, waardoor de.pth-hook niet draait - python -I: isolated mode beperkt toegang tot site-packages
- Fallback: gebruik
plats run script.platsals Magic Mode niet beschikbaar is
Need Help?
If you encounter any issues or have questions:
Hulp nodig?
Als ge issues tegenkomt of vragen hebt:
- Check the GitHub Issues
- Read the Contributing Guidelines
- Join the community on GitHub