NEUPL is a stack-based language. Most operations rely on the internal stack in some way.
Please note that this language is not Turing-Complete.
NEUPL recognises a few commands, all of which are case-insensitive:
<: Pushes the preceeding character onto the stack. (note, spaces are automatically pushed to the stack. You don't need a
<after them.)
p: Pop a character, and...
p: print it.
i: insert it into the program.
n: do nothing with it. (Just pops a character off of the stack.)
l: Loop through the stack, popping each character and...
p: printing it.
e: executing it as an instruction. (note, the stack is implicitly reversed before its characters are processed as instructions. This is for ease of use, so that the last instruction on the stack is executed last.)
n: doing nothing with it. This effectively clears the stack.
l(alternate use. This is only executed if the command is not followed by a
p,
e, or
n, as those have different meanings shown above): Push the length of the stack to the stack. Note that each digit of the number is pushed to the stack from highest place value to smallest place value.
r: Reverse (flip) the...
s: stack
p: program (UNIMPLEMENTED. THIS WILL NOT WORK AS OF THE LATEST VERSION.)
i: Pop a character off the stack. If it is a number, increment the next character in the stack's ASCII value that number of times.
d: Pop a character off the stack. If it is a number, decrement the next character in the stack's ASCII value that number of times.
*: Pop a character off the stack. If it is a number, repeat it that number of times. (broken, but semi-functional.)
c: Clear/empty the stack.
=: Pop two characters off of the stack. If they are identical/equal, push the letter
tonto the stack. Otherwise, push the letter
fonto the stack.
a: Pop two charaters off of the stack, add the UTF-8 character codes of the two characters, and push the resulting character onto the stack
Characters inside of quotation marks are automatically pushed to the stack.
If you do not explicitly print anything during the program, the contents of the stack will be implicitly printed.
Input to NEUPL is flipped and inserted into the stack at program execution. If you want input to be ignored, add
lnto the beginning of your program.
Created and developed by _iPhoenix_.