BRiX
Advanced Computing Environment
Hosted by SourceForge
brix-os project page

RSS feed
14dec2003

removed ADD, SUB, MUL, DIV, INC and DEC names for those extensions   #  added RECURSE extension

more...

Compiler status does not reflect the recent changes to the language.

Tetra compiler
(in C)
Features:

comments (single-line, multi-line and nested multi-line), modules, function and lambda creation and calling via the :func and :lambda accessors, recursion and tail recursion, parameter coercion, module and local variable declaration and assignment, local variable scopes, implicit module and local variable declaration, undeclaring local variables, heap object allocation, quoted variables, type definitions and slot access, type aliases, global and local pointers, never-null and null-checked pointers, boolean true and false enumerations, ascii character enumerations (literals), string literals (including multi-line strings), array element accessor (including memory arrays and strings), positive and negative array indices, compile-time and runtime bounds checking for arrays, nested arrays, IF/IF-NOT extension has ELSE, ELIF and ELIF-NOT virtual extensions, most assembler instructions via ASM, a simple register allocator

Extensions:

DEFUN, DEFTYPE, DEFMODULE, CURRENT-MODULE (temporary), DEFUN-ASM (temporary), INCLUDE (temporary), SET, SET-POINTER, UNSET, SETQ, NEW, OVERLAY-TYPE, RECURSE, RETURN, IF, IF-NOT, WHILE, WHILE-NOT, FOREACH, FOREACH-REV, BREAK, CONTINUE, REPEAT, SLOT, ALIAS, TO-INT64, TO-UINT64, TO-BYTE, TO-WORD, +, -, *, **, /, MOD, ++, --, ^, BITAND, BITOR, BITXOR, BITNOT, ~, >>, <<, ==, <>, >, <, >=, <=, AND, OR, NOT, !, NAND, NOR, NULL?, NOT-NULL?, ZERO?, NOT-ZERO?, ABOVE-ZERO?, BELOW-ZERO?, ABOVE-EQ-ZERO?, BELOW-EQ-ZERO?, BETWEEN?, NOT-BETWEEN?, EMPTY?, NOT-EMPTY?, ASM, OUTPORTB (temporary), OUTPORTW (temporary), OUTPORTD (temporary), INPORTB (temporary), INPORTW (temporary) and INPORTD (temporary), PRE (partial), THROW (partial)

Types:

int8, int16, int32, int64, uint8, uint16, uint32, uint64, bool, char, array, memory, string, lambda, func (hacked)

Type Aliases:

int -> int32, uint -> uint32, byte -> uint8, word -> uint16, dword -> uint32 and qword -> uint64



To Do:

rewrite lexer and parser to handle new infix syntax. replace pointers with references.

Missing Features:

function interface levels, function templates, implicit function returns, implicit return type, mutually recursive functions, unpacked collections, optional function parameters, function parameter labels and parameter swizzling, dynamic types, undeclare module variables, SET..IN and SETQ..IN module and local variable scopes, multiple variable declarations and/or assignments, static local variables, variable histories, dynamic types, inheritance, parameterized types, default slot values, auto-generated constructors for types with primary slots, methods, type constructors and destructors, type accessors, 'variable' type modifier, type properties, submodules, virtual slots, function aliases, ranges, enumerations, bit-fields, array literals, unicode string literals, unicode character literals, lists, unions, files, streams, loop histories, platform specific code, closures, exceptions, contracts

Missing Extensions:

CAST-RETURN, FUNC, #, COPY, CLONE, LOCK, ORIG, OLD, SUM, LEN, MIN, MAX, INHERIT-FROM, METHOD, CONSTRUCTOR, DESTRUCTOR, DEFSET, DEFGET, DEFEXEC, CAST-TO-PARENT, DEFSUBMODULE, FOREACH-UP/DOWN, REPEAT-UP/DOWN, MATCH, CATCH, RETHROW, POST, ASSERT, PLATFORM, SET extension flags STATIC, MUTABLE and IMMUTABLE

WORKS

Boot/Setup code Boot sector loads setup, setup gathers system information and loads the core.

COMPLETE

Core code The existing assembler code needs to be converted to Tetra.

The new DEFUN-ASM extension will allow the existing assembler code to be used without porting it. This is a temporary solution until ASM supports all required instructions.

some code

Device code The existing assembler code has drivers for floppy, keyboard, text screen and partial vga/vesa support. This code needs to be converted to Tetra.

The new DEFUN-ASM extension will allow the existing assembler code to be used without porting it. This is a temporary solution until ASM supports all required instructions.

---

Tetra shell, compiler and assembler
To Do:

port Tetra compiler, add extension support to compiler, write an editor/shell, write an assembler

non-existant

Graphical User Interface -

non-existant