diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-09-15 22:01:24 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-09-15 22:01:24 +0200 |
commit | d83f843f7d4610f393014a1e6ff1cee38e1ead9a (patch) | |
tree | f021fb8370973497403c3ffc9d327631f6165173 | |
parent | 35acfd9a41c082cba56a638c2be8027a3e5d1b62 (diff) |
Update spec
-rw-r--r-- | rip-lang.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rip-lang.txt b/rip-lang.txt index 0eb43b8..72ae8cb 100644 --- a/rip-lang.txt +++ b/rip-lang.txt @@ -4,22 +4,22 @@ Rip -- a stack-based rip language All stack items are integers, of unspecified but constant size 0-9: push value -p: pop -s: swap +P: pop +S: swap D: duplicate i: increment d: decrement r: pops the number of items to rotate clockwise R: pops the number of items to rotate anti-clockwise -+ - * /: just what you expect -> < =: comparisons; booleans are 1 and 0, as you expect +a s m q: + - * / (add, subtract, multiply, quotient (integer)) +G L E: greater, less, equal; booleans are 1 and 0, as you expect [ ... ]: syntactical; a codeblock I: pops boolean, conditionally executing the codeblock that should follow the I, depending on the boolean (aka "if") W: I, but then "while" instead of "if" o: outputs the top value as an ascii char O: outputs the top value as a number g: gets a character and pushes the ascii value -S: outputs a stackdump +$: outputs a stackdump whitespace: nop |