User:PythonshellDebugwindow/Yggdrasil

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

Yggdrasil is a tree-based esolang by User:PythonshellDebugwindow.

Syntax

All code is within function headers. The 'main' function is called execution.

fname:

First, you have to set the tree head.

tree-head X

Literals

Character literals are of the form C, where C is the character you want (note the Unicode single quote).

Hello program

execution:
 tree-head ‘H
 tree-add tree-head 0
 tree-set (tree-get tree-head 0) ~out
 tree-add (tree-get tree-head 0) 1
 tree-set (tree-get (tree-get tree-head 0) 1) ‘H
 tree-add (tree-get tree-head 0) 2
 tree-set (tree-get (tree-get tree-head 0) 2) ‘e
 tree-add (tree-get tree-head 0) 3
 tree-set (tree-get (tree-get tree-head 0) 3) ‘l
 tree-add (tree-get tree-head 0) 4
 tree-set (tree-get (tree-get tree-head 0) 4) (tree-get (tree-get tree-head 0) 3)
 tree-add (tree-get tree-head 0) 5
 tree-set (tree-get (tree-get tree-head 0) 5) ‘o

Category:Languages Category:2020 Category:Unimplemented