From 145407da41c293e4e9627452d4fc704f4872e260 Mon Sep 17 00:00:00 2001 From: zongor Date: Sat, 20 Jul 2024 16:07:46 -0400 Subject: [PATCH] Update SPECIFICATION.MD --- SPECIFICATION.MD | 121 +++++++++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 52 deletions(-) diff --git a/SPECIFICATION.MD b/SPECIFICATION.MD index 0817449..79c55b4 100644 --- a/SPECIFICATION.MD +++ b/SPECIFICATION.MD @@ -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