MCPcopy Index your code
hub / github.com/DDP-Projekt/Kompilierer

github.com/DDP-Projekt/Kompilierer @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
2,651 symbols 6,950 edges 169 files 636 documented · 24%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README


zum Deutschen README

Der Kompilierer Der Deutschen Programmiersprache (Compiler for the german programming language)

"Die Deutsche Programmiersprache" (DDP) is a (joke-)programming language by NotLe0n and bafto, which was designed so that programs written in it read like almost proper german.

The Bedienungsanleitung (documentation) is a good starting point to get to know DDP; you can also find installation instructions there.

The Playground makes it possible to try out DDP without having to install the compiler.

If you want to work on the Compiler see CONTRIBUTING-en

Installation

To install DDP, all you have to do is download the current release for the desired operating system from Github here, Unpack the archive and run the installer (ddp-setup.exe).

Detailed installation instructions are available here.

Feature overview

DDP is a statically typed, modular and imperative language. Most of the features will be familiar to programmers.

Expressions

Every expression in DDP produces a value of fixed type.

Variables also have a fixed type.

DDP also has Listen

Instruction blocks

In DDP, multiple instructions can be grouped together in a block.

As you can see, each block begins with a ":". Variables are transferred to sub-blocks, but overshadow new declarations with the same name old declarations.

Since {} are not symbols of German texts, the Indentation depth (4 spaces or 1 tab) is used to determine when a block is finished.

If statements

For simple branches, DDP offers If statements.

Of course, this can also be done without instruction blocks, but only for single instructions.

Loops

DDP supports most known loops.

While loops:

Do-While loops:

and most importantly, for loops:

So that you don't always have to write a long for loop there are also repetitions:

Just like with if statements, this can all be done with single instructions.

Functions

Functions are by far the most important feature of DDP, because they allow you to turn almost any German sentence or expression into code.

This is due to the way they are called, namely via so-called aliases.

As you can see, the function foo was called like a normal German expression without violating the grammatical rules.

Functions are a very big topic in DDP and this small example shows only a fraction of their complex syntax.

For more details, I strongly recommend reading this article from the documentation thoroughly, or at least skimming the examples.

Modules

In DDP, source code is organized into modules, where a module is simply a source file.

In fact, all of the examples above already have used the Module "Duden/Ausgabe" to be able to use the Schreibe x function.

When you include a module, only the functions/variables marked as 'public' become visible.

You can also just include the functions/variables that you need.

include.ddp:

main.ddp:

Extension points exported contracts — how you extend this code

Type (Interface)
go-sumtype:decl Type holds information about a DDP-Type [9 implementers]
src/ddptypes/type.go
Visitor (Interface)
base interface for all visitors this interface itself is useless, implement one of the sub-interfaces for the actual fun [6 …
src/ast/visitor.go
TrieKeyGen (FuncType)
generate keys for the trie it is given a unique, incrementing index for the node visited and the key of the possible chi
src/parser/alias_trie/trie.go
Handler (FuncType)
(no doc)
src/ddperror/handler.go
Node (Interface)
go-sumtype:decl Node go-sumtype:decl Expression go-sumtype:decl Statement go-sumtype:decl Declaration go-sumtype:decl As [41 …
src/ast/ast.go
GenericInstantiator (Interface)
(no doc) [1 implementers]
src/parser/typechecker/typechecker.go
Expression (Interface)
go-sumtype:decl Node go-sumtype:decl Expression go-sumtype:decl Statement go-sumtype:decl Declaration go-sumtype:decl As [20 …
src/ast/ast.go
CompFunc (FuncType)
(no doc)
src/parser/ordered_map/ordered_map.go

Core symbols most depended-on inside this repo

previous
called by 190
src/parser/tokens.go
Pointer
called by 173
src/compiler/llvm/executionengine.go
free
called by 161
src/compiler/runtime_bindings.go
consumeSeq
called by 140
src/parser/tokens.go
Name
called by 122
src/compiler/ir_types.go
matchAny
called by 102
src/parser/tokens.go
IrType
called by 96
src/compiler/ir_types.go
ddp_error
called by 90
lib/stdlib/source/DDP/error.c

Shape

Method 1,639
Function 694
Struct 150
Interface 60
FuncType 52
TypeAlias 37
Class 19

Languages

Go90%
C10%
C++1%

Modules by API surface

src/compiler/llvm/ir.go521 symbols
src/ast/visitor.go209 symbols
src/ast/expressions.go153 symbols
src/ast/statements.go92 symbols
src/ast/declarations.go87 symbols
src/compiler/compiler.go77 symbols
src/parser/typechecker/typechecker.go59 symbols
src/compiler/llvm/dibuilder.go57 symbols
src/ast/helper_visitor.go54 symbols
src/parser/resolver/resolver.go49 symbols
src/ast/printer.go48 symbols
src/ast/ast.go45 symbols

For agents

$ claude mcp add Kompilierer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page