aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md27
1 files changed, 26 insertions, 1 deletions
diff --git a/README.md b/README.md
index 83cb867..b1d220d 100644
--- a/README.md
+++ b/README.md
@@ -11,4 +11,29 @@
§ loop i withinBounds if i print i incr loop then else ;
loop
-The above _slang_ code to be entered in the repl prints the numbers from 1 to 9. The repl may be compiled and executed using `dub run` in the project directory.
+The above _slang_ code to be entered in the repl prints the numbers from 1 to 9. The repl may be compiled and executed using `dub run` in the project directory. Check the `example` directory for further further demonstrations.
+
+## Words
+
+Currently implemented primitives:
+
+| Word | Description |
+| --- | --- |
+| `§` | Custom word definition |
+| `$`, `@` | Single token variable binding, resolution |
+| `if`, `then`, `else` | Conditional primitives |
+| `+`, `*`, `/`, `%` | Common artithmetics |
+| `.` | Non destructive printing of top-of-stack |
+| `pop` | Remove uppermost stack element |
+| `dup` | Duplicate top-of-stack |
+| `swp` | Swap the first two stack elements |
+| `over` | Place a copy of the second stack element on top-of-stack |
+| `rot` | Rotate the top three stack elements |
+| `true` | Write true boolean value to top-of-stack |
+| `false` | Write false boolean value to top-of-stack |
+| `!` | Negate boolean value |
+| `<` | Compare size of two integers |
+| `=` | Compare equality of two stack values |
+| `&` | Boolean and |
+| `or` | Boolean or |
+| `#` | Debug word printing the whole stack to _stdout_ |