/emlang

A stack-based emoticon esolang

Primary LanguageCGNU General Public License v3.0GPL-3.0

emlang

A stack-based emoticon esolang

License Issues GitHub pull requests


A silly emoticon stack-based esoteric programming language.

Table of contents

Hello world

:O Hello, world! :)

Quickstart

$ make
$ ./emlang -h

Try the examples from the examples folder.

Syntax

The syntax is composed of tokens separated by whitespaces. The tokens can be integers, strings or keywords.

Integers

Integers are composed of decimal digits only. Optionally, they can have a dash (-) at the start to make them negative.

1024
-52

Strings

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

Comments start with :x and last until the end of the line.

:x I am a comment

Bugs

If you find any bugs, please create an issue and report them.