i shall make stack machine

This commit is contained in:
tildearrow 2024-06-02 21:56:18 -05:00
parent 52b45ef5ab
commit 118103b8af
3 changed files with 177 additions and 3 deletions

26
src/momo/stack.md Normal file
View file

@ -0,0 +1,26 @@
the following document describes the stack machine used to get the correct plural form in ngettext.
# instructions
```
op | description
---|--------------------
00 | exit
01 | push imm
02 | push N
03 | add
04 | sub
05 | mul
06 | div
07 | mod
08 | cmp eq
09 | cmp ne
0a | cmp gt
0b | cmp lt
0c | cmp ge
0d | cmp le
0e | cmp and
0f | cmp or
10 | true imm
11 | false imm
```