A stack-based emoticon esolang
A silly emoticon stack-based esoteric programming language.
:O Hello, world! :)
$ make
$ ./emlang -h
Try the examples from the examples folder.
The syntax is composed of tokens separated by whitespaces. The tokens can be integers, strings or keywords.
Integers are composed of decimal digits only. Optionally, they can have a dash (-
) at the start
to make them negative.
1024
-52
Strings can be quoted or unquoted. Unquoted strings can contain any characters except whitespaces.
Hello!
I'm-an-unquoted-string.
Quoted strings start and end with double quotes ("
) and can contain whitespaces.
"Hello, world!"
They also have escape sequences, see the table below.
Sequence | Name |
---|---|
\n |
New line |
\r |
Return carriage |
\t |
Tab |
\f |
Form-feed |
\v |
Vertical tab |
\b |
Backspace |
\a |
Alert |
\" |
Double quotes |
\e |
Escape |
\\ |
Backslash |
Example
"I can use quotes inside a quoted string:\n\t\"Look!\""
Comments start with :x
and last until the end of the line.
:x I am a comment
If you find any bugs, please create an issue and report them.