Update SPECIFICATION.MD

This commit is contained in:
zongor 2024-07-20 16:07:46 -04:00
parent 055c910ab6
commit 145407da41
1 changed files with 69 additions and 52 deletions

View File

@ -12,7 +12,7 @@ In general the paradigms are designed to be: var'aq-like, Interpreted, Distribut
## What is the purpose of this language? ## What is the purpose of this language?
*zwl* acts as the assembly language for *zwm*. it allows for a user to manipulate the world machine. *zwl* acts as the assembly language for the universe machine. it allows for a user to manipulate the world machine.
# *zwl* Grammar and Specification # *zwl* Grammar and Specification
@ -50,25 +50,41 @@ a list containing the data of that form
### bit (or unsigned units) ### bit (or unsigned units)
`u8`, `u16`, `u32`, u64` «hex number» 8 `u` u8
«hex number» «hex number» 16 `u` u16
«hex number» «hex number» «hex number» 32 `u` u32
«hex number» «hex number» «hex number» «hex number» 64 `u` u64
### integer (signed) ### integer (signed)
`i8`, `i16`, `i32`, `i64` «hex number» 8 `i` u8
«hex number» «hex number» 16 `i` u16
«hex number» «hex number» «hex number» 32 `i` u32
«hex number» «hex number» «hex number» «hex number» 64 `i` u64
### real ### real
`f32`, `f64` «hex number» «hex number» «hex number» 32 `f` f32
«hex number» «hex number» «hex number» «hex number» 64 `f` f64
## string ## string
matching `""` for string " «utf8 encoded characters» `"` string
strings are always utf8, other formats will need to be done manually strings are always utf8, other formats will need to be done manually
## logical ## logical
`true` / `false` - `true` bool
- `false` bool
### panic ### panic
@ -90,52 +106,53 @@ syntax
The following is a list of global operators and their effect: The following is a list of global operators and their effect:
! comment (looks for another ! to close)
line comment ! any raw text here `!` -
!!
block comment (looks for another !! to close) anonymous subtroutine
{ … } { … `}` subroutine
anonymous subtroutine
set sets a value in the node's map
sets a value in the node's map `set`
del
delete from node's map delete from node's map
add `del`
addition
sub `add`
subtraction
mul `sub`
multiplication
div `mul`
divisor
pow `div`
power
eq `pow`
equal to
ne `eq`
not equals to
mod `ne`
modulo
not `mod`
logical not
and `not`
logical and
or `and`
logical or
nor `or`
logical nor
nand `nor`
logical nand
xor `nand`
logical xor
band `xor`
bitwise and
bor `band`
bitwise or
bnor `bor`
bitwise nor
bxor `bnor`
bitwise xor
`bxor`
## Atom ## Atom