toki pona li pona

From Esolang
Jump to navigation Jump to search

toki pona li pona(tplp) is a language by User:ChuckEsoteric08 based on constructed language "toki pona"

Description

It has one unbounded Questa and list of variables. Only this values are valid:

jan pona

and

nanpa wan

Which equals to 1

jan ike

and

nanpa ala

Which equals to 0

jan sona

and

nanpa luka

Which equvals to 5

jan abc

Which is a string abc(it can be any string without spaces that are not pona, ike or sona) Here is commands: Note that [arg1] and [arg2] are arguments

Variables

jan [arg1] li [arg2]

Declare variable [arg1] with value [arg2]

jan [arg1] pi jan [arg2]

Removes first letter after jan in variable [arg2] and set variable [arg1] to it.

Questa

 jan Kesata jo [arg1]

Push [arg1] to Questa

jan Kesata li jo jan [arg1]

Push value of variable [arg1] to Questa

jan Kesata li pakala e ona

Pop value from top of the Questa

jan Kesata li pakala e ni

Pop value from the bottom of the Questa

sewi li anpa

Swap values from the bottom and top of the Questa

Flow Control

ma [arg1]

Declare label [arg1]

ma ni li ma [arg1]

Goto label [arg1]

ken sewi li [arg1] la ma ni li ma [arg2]

If top of Questa is [arg1] then goto label [arg2]

ken jan Kesata li ike la ma ni li ma [arg2]

If Questa is empty goto [arg2]

IO

toki! mi jan [arg1]

Print variable [arg1] to the screen

See also