Queue Esolang Interpreter Docs

Instructions

Queue Interaction

Integer: Push a constant value.

x: Discard a value from the front of the queue.

d: Duplicate the front of the queue (Pushes both copies to back)

r: Rotate queue (front → back)

u: Unrotate queue (back → front)

Stack Interaction

s: Store the front of the queue to the stack.

e: Restore from the stack onto the front of the queue.

Length Querying

S: Push the length of the stack.

Q: Push the length of the queue, after pushing.

Iteration

[: Pop, jump to next matching ] if zero.

]: Pop, jump to previous matching [ if non-zero.

Input/Output

i: Push one character from input to queue. Pushes 0 if no input.

p: Pop and print to output.

Binary Operations

All binary operations pop the two front values and push the result to the front of the queue

l: Front lower than next, -1 if true, 0 if false.

+: Addition, front + next.

-: Subtraction, front - next.

*: Multiplication, front - next.

/: Division, front - next.

%: Modulo, front - next.

&: Bitwise AND, front - next.

|: Bitwise OR, front - next.

^: Bitwise XOR, front - next.

Unary Operations

All unary operations replace the front of the queue.

?: Random integer less than value

~: Negation.

!: Bitwise NOT.