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?
*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
@ -50,25 +50,41 @@ a list containing the data of that form
### 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)
`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
`f32`, `f64`
«hex number» «hex number» «hex number» 32 `f` f32
«hex number» «hex number» «hex number» «hex number» 64 `f` f64
## string
matching `""` for string
" «utf8 encoded characters» `"` string
strings are always utf8, other formats will need to be done manually
## logical
`true` / `false`
- `true` bool
- `false` bool
### panic
@ -90,52 +106,53 @@ syntax
The following is a list of global operators and their effect:
!
line comment
!!
block comment (looks for another !! to close)
{ … }
anonymous subtroutine
set
sets a value in the node's map
del
delete from node's map
add
addition
sub
subtraction
mul
multiplication
div
divisor
pow
power
eq
equal to
ne
not equals to
mod
modulo
not
logical not
and
logical and
or
logical or
nor
logical nor
nand
logical nand
xor
logical xor
band
bitwise and
bor
bitwise or
bnor
bitwise nor
bxor
bitwise xor
comment (looks for another ! to close)
! any raw text here `!` -
anonymous subtroutine
{ … `}` subroutine
sets a value in the node's map
`set`
delete from node's map
`del`
`add`
`sub`
`mul`
`div`
`pow`
`eq`
`ne`
`mod`
`not`
`and`
`or`
`nor`
`nand`
`xor`
`band`
`bor`
`bnor`
`bxor`
## Atom