No description
Find a file
RushLana 8fe329c620
Basic args parsing
will migrate from getopts in favor of manual parsing
2025-05-16 21:08:00 +02:00
q-pidon Basic args parsing 2025-05-16 21:08:00 +02:00
q-pilater Basic arg handler 2025-05-16 15:18:25 +02:00
LICENSE Initial commit 2025-05-16 08:45:08 +00:00
README.md Redifine specs 2025-05-16 21:07:07 +02:00

Q-LANG

Idea by @thea@eldritch.cafe.
You can code only using the letter q.

Project structure

  • q-pilator (WIP) is the interpreter/compiler
  • q-pidon (WIP) is the code generator

Language spec

Q-lang is a single threaded language, code is written on using q-dir and q-file sequentially (q -> qq -> qqq).

A q-dir contain at least a q-file named q and can contain an arbitrairy number of q-dir and q-file

A q-filecan contain either an data or instruction.

Instruction is always implied.

Glossary

  • f is a file
  • dir a directory
  • ... meaning repeating

A scope refference the curent execution calling a function make the scope local to this function meaning once the call end memory is cleared.

Instruction

number of q INSTRUCT ARGs Structure Details
0 STDOUT DATA
1 WRITE VAR name - scope - DATA f,f,dir
2 READ VAR name f
3 FUNCTION name dir function are always using the smalest scope possible
4 CALL name - DATA f, dir

DATA

Data type are always prefixed by a q-file containing type info (number of q).

number of q Type Structure Details
0 boolean f bool
1 unsigned int f u32
2 signed int f,f i16
3 char f ASCII
4 array dir \rightarrow (f,data...) u16
5 exec dir \rightarrow INSTRUCTs exec return the data contain in the first cell of the local registry