
naqua <filepath> <flags>
Flags:
-l
- logs tokens and displays the parsing process
file.naq > Open With > naqua.exe
think x
- loads numberx
into single-cell memorythought
- evaluated as the number in single-cell memoryprint x
- prints out valuex
x in y
- assigns numbery
to stack indexx
out x
- evaluated as the number in stack indexx
x char
- evaluated as the character with ascii indexx
. characters cannot be stored as data (in single-cell memory or in the stack)run <name>
- runs macro named<name>
spawn <name>
- runs macro named<name>
on new thread with new runtime (stack + thought)if x { ... }
- runs code within braces ifx
is equivalent to the single-cell memoryloop { ... }
- loops code within bracesdefine <name> { ... }
- runs code within braces whenrun <name>
is calledbreak
- breaks current loop/if statement# <text here>
- comment; ignored when tokenizing (until the end of the line)
0 in 64 + 8 # H
1 in 96 + 5 # e
2 in 96 + 12 # l
3 in 96 + 12 # l
4 in 96 + 15 # o
5 in 44 # ,
6 in 32 #
7 in 64 + 23 # W
8 in 96 + 15 # o
9 in 96 + 18 # r
10 in 96 + 12 # l
11 in 96 + 4 # d
12 in 33 # !
loop { # loop through indices 0-12
print out thought char
think thought + 1
if 13 { # stop at end
break
}
}
1 in 0 # 1st element
2 in 1 # 2nd element
loop {
print out 0 # print out current value
print 10 char # newline
0 in out 1 + out 2 # sum of the elements
1 in out 2 # set 1st element to 2nd element
2 in out 0 # set 2nd element to sum
think thought + 1 # increment counter
if 10 { break } # break on 10th iteration
}