Skip to content

dburkart/nord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

    _   __                  __
   / | / /____   _____ ____/ /
  /  |/ // __ \ / ___// __  /
 / /|  // /_/ // /   / /_/ /
/_/ |_/ \____//_/    \__,_/


Nord is a personal experiment in language design and compiler construction. I
don't know where this is going yet, but it should be fun!

Current State of the Project
===============================================================================
Last Updated: 06/21/2021

Currently, a small subset of the planned language is implemented and working.
There is support for basic expressions, including arithmetic and comparisons,
as well as function call support. Beyond the fact that syntax is minimal, the
following known limitations exist:

 - Register allocation is not that sophisticated. In fact, full support for
   spilling / unspilling variables to main memory doesn't exist (function calls
   spill variables, but only using the stack). This means that sufficiently
   large scripts with enough variables in the same scope will most likely
   result in undefined behavior.

 - Only partial error-handling exists. There are many edge cases which are
   not handled correctly, resulting in asserts and seg faults for some classes
   of syntax or semantic errors.
   
 - No garbage collection or heap as such, only constant pool support.
 
 - Only primitive types (int, float, string, bool) are supported, as we add
   garbage collection, I'll look to expand to more complex types.


Building
===============================================================================

To build the project, run:

    make

Doing so will produce a binary, "nord" which can then be run. What that binary
does will eventually be to run nord scripts, but it may do something else until
we have all subsystems up and running.

Testing
===============================================================================

To test things, run:

    make test