The Nemo programming language.
C CMake
Permalink
Failed to load latest commit information.
cmake Add the un/install make rules. Oct 26, 2013
ext Bask in the enchantment of the BSD license Nov 24, 2013
.gitignore Some tweaking around the AST. Dec 11, 2013
.travis.yml Create the example.nm file. Dec 15, 2013
CMakeLists.txt Start incorporating type inference Aug 29, 2015
LICENSE suckless #6: rewrite from scratch instead of trying to fix. Nov 3, 2013
MOBILIS Move all the header includes to nemo.h, so only it needs to be included. May 16, 2013
README.md Rewrite the infnum library. Jun 10, 2014
ast.c Fix building with -DDEBUG=OFF Sep 21, 2015
ast.h We can infer function application + a few fixes Aug 31, 2015
config.h.in Get rid of the notion of 'fields' in tuples Aug 29, 2015
count_params.h Functions will be λ-calculus-like one-param only Aug 30, 2015
debug.c Make it a compiler :) Jun 25, 2015
debug.h Make it a compiler :) Jun 25, 2015
infer.c Save node's type after infering it. Sep 16, 2015
infer.h Do some work on function prototypes Aug 29, 2015
infnum.c Make it a compiler :) Jun 25, 2015
infnum.h Add support for the bitwise AND operation Jun 19, 2014
lexer.c
lexer.h Chars are enclosed in `s, type variables use 's Aug 29, 2015
mem.c Get rid of the warnings. Aug 28, 2015
mem.h Add the -d flag, and it's support for memory. Dec 15, 2013
nemo.c Do some work on function prototypes Aug 29, 2015
nemo.h Make it a compiler :) Jun 25, 2015
nob.c Fix recognising ADTs names Sep 7, 2015
nob.h Fix parametrizing ADTs over tuples Sep 3, 2015
parser.c Change syntax for function calls (yay parens) Sep 19, 2015
parser.h Don't create new OT_TYPE_VARIABLEs Aug 29, 2015
scope.c Start incorporating type inference Aug 29, 2015
scope.h Start incorporating type inference Aug 29, 2015
utf8.c UTF-8 support for literal characters. Jun 14, 2014
utf8.h UTF-8 support for literal characters. Jun 14, 2014
util.c Some work on variables (and functions) Jul 15, 2015
util.h Make it a compiler :) Jun 25, 2015
version.h Few small improvements to the lexer. Nov 11, 2013

README.md

Nemo

Nemo is a scripting, interpreted, statically and strongly typed programming (well, that's the plan) language written in ANSI C.

Note I'm rewriting Nemo from the ground up. There's not much to see right now.

Install

1. Obtain the sources

$ git clone https://github.com/semahawk/nemo.git

2. Compile

$ cmake . \
    [-DDEBUG=ON|YES|1] \
    [-DBINDIR=/where/to/install/binaries]  \
    [-DINCDIR=/where/to/install/headers]   \
    [-DLIBDIR=/where/to/install/libraries] \
$ make
$ sudo make install

The default values for the specific options are:

DEBUG:  0
BINDIR: "/usr/local/bin"
INCDIR: "/usr/local/include"
LIBDIR: "/usr/local/lib"

Dependencies

  • C99 compatible C compiler
  • CMake
  • make

What's what

cmake/ CMake build-only related files
ext/ External files/libraries, sometimes replacements for existing libc functions
ast.c AST related stuff - node creation, execution etc.
lexer.c The lexer, tokenizing, keywords list etc.
mem.c Basically just malloc/realloc/calloc wrappers
nemo.c The main file of the executable, contains main(), the REPL
parser.c The (recursive-descent) parser and all the grammar
utf8.c Handful of handy functions to help with UTF-8
util.c Handful of handy functions to help with anything else

License

This code is licensed under the New / Modified (3 clause) BSD License. For more details, please visit the LICENSE file.