Skip to main content

A transpiler toolchain for Platskript, a programming language using Multi-Vlaams dialect keywords that compiles to Python

Project description

VlaamsCodex - Multi-Vlaams Editie ๐Ÿ‡ง๐Ÿ‡ช

PyPI version Python 3.10+ License: MIT CI

't Es simpel, 't es plansen, 't es Vlaams!

A transpiler toolchain for Platskript (.plats), a programming language that uses Flemish dialect keywords. VlaamsCodex compiles Platskript source code to Python and executes it.

NEW in v0.2.4: Full Multi-Vlaams dialect support with 80+ command aliases from all Flemish regions!


Quick Start

# Install
pip install vlaamscodex

# Run your first program
plats run examples/hello.plats

# Or use magic mode - run .plats directly with Python!
python examples/hello.plats

Output:

gdag aan weeireld

Multi-Vlaams Dialect Commands ๐Ÿ‡ง๐Ÿ‡ช

Every command works in 7 Flemish dialects! Use whichever feels most natural:

Run a Program

Dialect Command Meaning
English plats run script.plats Run
West-Vlaams plats voertuut script.plats Voer 't uut
Antwerps plats doet script.plats Doe 't
Limburgs plats gaon script.plats Gaan
Brussels plats doeda script.plats Doe da

Interactive REPL

plats repl              # English
plats proboir           # West-Vlaams: proberen
plats smos              # Antwerps: praten/uitproberen
plats efkes             # Limburgs: eventjes
plats praot             # Brussels: praten

Browse Examples

plats examples              # List all examples
plats tuuntnekeer           # West-Vlaams: toon eens
plats toondada              # Antwerps: toon da da
plats loatskiejn            # Limburgs: laat 's kijken
plats examples --run hello  # Run an example

Check Syntax

plats check script.plats        # English
plats zijdezekers script.plats  # West-Vlaams: zijt ge zeker?
plats istdagoe script.plats     # Antwerps: is da goe?
plats kloptda script.plats      # Limburgs: klopt da?

Error messages come in your dialect:

Manneke, gij zijt 'amen' vergeten op lijn 5!  (Antwerps)
Jansen, ge zijt 'amen' vergeten op lijn 5!    (West-Vlaams)

Create a New Project

plats init myproject        # English
plats allehop mijnproject   # West-Vlaams: hier gaan we!
plats awel mijnproject      # Antwerps: kom, we beginnen
plats allei mijnproject     # Limburgs: vooruit dan

Flemish Fortune (Easter Egg!)

plats fortune    # Random Flemish proverb
plats zegt       # West-Vlaams: "zen moeder zegt..."
plats watteda    # Antwerps: wat is da?
plats wiste      # Limburgs: wist ge dat?

Example output:

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ Beter een vogel in de hand dan tien    โ•‘
โ•‘ op 't dak, jong!                       โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

All Dialect Aliases

Command Standard West-Vlaams Antwerps Limburgs Brussels Genks
run loop voertuut doet gaon doeda jaowdoen
repl repl proboir smos efkes praot babbel
examples examples tuuntnekeer toondada loatskiejn toontmansen jaowkiek
check check zijdezekers istdagoe kloptda isdagoe istokin
init init allehop awel allei maakaan pakaan
fortune fortune zegt watteda wiste spreuk jaowzegt
build bouw moakt bouwt maakt fabrikeert bouwt
help haalp hulpe helptemij helpt aidez hulp

Installation

Option 0: npm / npx (Node.js users)

Requires Python 3.10+ to be installed (because the compiler is implemented in Python).

Global install (adds plats and vlaamscodex to your PATH):

npm install -g vlaamscodex
plats version

Run without installing globally:

npx vlaamscodex --help
npx plats version

Option 0b: Chocolatey (Windows)

Requires Python 3.10+.

This repo includes a Chocolatey package skeleton in chocolatey/ (build/pack separately). See chocolatey/README.md.

Option A: pip (Recommended)

pip install vlaamscodex

Option B: pipx (Isolated)

pipx install vlaamscodex

Option C: Development

git clone https://github.com/brentishere41848/Vlaamse-Codex.git
cd Vlaamse-Codex
pip install -e ".[dev]"

Example Programs

Hello World

# coding: vlaamsplats
plan doe
  zet naam op tekst weeireld amen

  maak funksie groet met wie doe
    klap tekst gdag plakt spatie plakt tekst aan plakt spatie plakt da wie amen
  gedaan

  roep groet met da naam amen
gedaan

Calculator

# coding: vlaamsplats
plan doe
  zet x op getal 10 amen
  zet y op getal 5 amen

  zet som op da x derbij da y amen
  klap da som amen

  zet verschil op da x deraf da y amen
  klap da verschil amen

  zet product op da x keer da y amen
  klap da product amen
gedaan

Run Built-in Examples

plats examples --list          # Show all examples
plats examples --show hello    # View the code
plats examples --run rekenen   # Run calculator example

Magic Mode

Platskript files with the encoding header can run directly with Python:

# coding: vlaamsplats
plan doe
  klap tekst hallo amen
gedaan
python script.plats  # Works after installing VlaamsCodex!

Language Specification (v0.1)

Program Structure

Programs are wrapped in plan doe ... gedaan. Statements terminate with amen.

Statements

Syntax Description
zet <var> op <expr> amen Variable assignment
klap <expr> amen Print expression
maak funksie <name> met <params...> doe ... gedaan Function definition
roep <name> met <args...> amen Function call
geeftterug <expr> amen Return statement

Expressions

Syntax Description
tekst <words...> String literal
getal <digits> Numeric literal
da <name> Variable reference
spatie Space character
plakt String concatenation

Operators

Platskript Python Description
derbij + Addition
deraf - Subtraction
keer * Multiplication
gedeeld / Division
isgelijk == Equals
isniegelijk != Not equals
isgroterdan > Greater than
iskleinerdan < Less than

VS Code Extension

Install the VlaamsCodex extension for syntax highlighting:

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "VlaamsCodex"
  4. Click Install

Documentation


Contributing

Contributions are welcome! Please read our Contributing Guidelines before submitting a pull request.

Bugs? Ideas? Open an issue!


License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with โค๏ธ in Flanders

't Es simpel, 't es plansen!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vlaamscodex-0.2.4.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vlaamscodex-0.2.4-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file vlaamscodex-0.2.4.tar.gz.

File metadata

  • Download URL: vlaamscodex-0.2.4.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vlaamscodex-0.2.4.tar.gz
Algorithm Hash digest
SHA256 21b4c11ba067dc66d2ff61a14736b5c8538c984bf4f867c67467855d50d9eb0e
MD5 d700d66a3521c6ed49f963d17a5a4ab2
BLAKE2b-256 e818f4e0b50772e5b8d94e02d5dd916d99e565e1687fc851483a09d4928daff2

See more details on using hashes here.

File details

Details for the file vlaamscodex-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: vlaamscodex-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vlaamscodex-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 89bd8c92e0dea3e7794d0f98a02cfde0568f1cd2515c5ec155afceaa9bd9d340
MD5 be39028a6b41f672b638c3d7a0208725
BLAKE2b-256 2bff9d23e01c60a59cc68da7835950738d858413985e526f1511f6078a157f27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page