Sigil

Sigil is an esoteric programing language with only 5 meaningful characters:.

Language overview
A sigil program can be described with the following EBNF syntax:

main = command; command = number ('(' command ')')*; number = /[#$%]*/;

The Sigil VM also have a stack and a queue.

Number system
The number system used by Sigil is a variant of base 3.

To convert a Sigil number to a decimal number:

 Convert  to ,   to   and   to   Convert the number to decimal from base 3 Add 1 if the original number is not empty 

Commands
- NOP $(x) NEGATE %(x) PUSH $# POP $$(x) ENQUEUE $% DEQUEUE %#(c)(x)(y) IF %$(c)(b) WHILE %%(n) NUMBER $##(c) PRINT CHARACTER $#$ INPUT CHARACTER $#%(n) PRINT NUMBER $$# INPUT NUMBER $$$(a)(b)...(c) CHAIN
 * 1) (x)(y) ADD