Files
kraken/README.md

47 lines
2.0 KiB
Markdown
Raw Normal View History

Kraken
2013-05-10 12:08:44 -07:00
======
The Kraken Programming Language
2015-07-18 16:30:21 -04:00
(try it out online at http://www.kraken-lang.org/)
(vim integration (filetype, syntax highlighting, Syntastic) at https://github.com/Limvot/kraken.vim)
2016-02-20 14:11:27 -05:00
(emacs integration (filetype, syntax highlighting) at https://github.com/Limvot/kraken-mode)
2015-05-09 06:48:23 -04:00
2015-07-18 16:30:21 -04:00
(more info and examples at http://limvot.github.io/kraken/)
2015-07-18 16:29:29 -04:00
The Kraken Programming Language is functional but very much still in development.
2016-01-19 03:23:38 -05:00
It has both the normal features you might expect of a modern language, (functions, variables, an object system, dynamic memory), as well as some more advanced ones (mutually recursive definitions, lambdas/closures, algebraic data types, templates, marker traits, defer statements, etc).
2015-07-18 16:29:29 -04:00
Currently, it consists of a RNGLALR parser written in C++, an AST intermediate representation, and a C code generator.
When compiled, the kraken compiler will take in a text file to be parsed and optionally the grammer file to use and an output file name.
2016-01-19 03:23:38 -05:00
Kraken will then generate the RNLALR parsing tables from the grammer or load them from a binary file if Kraken has been run with this exact version of the grammer before. Then it will parse the input and export one .c file along with a .sh script containing the compiler command to compile the C files together into a binary.
The current work is going into self-hosting the compiler, which is progressing quickly. Currently, the self-hosted version can compile simple programs consisting of functions, variables, normal operators, if statements, while loops, and very simple C-passthroughs.
It is invoked in this way:
2015-07-18 16:29:29 -04:00
kraken inputKrakenFile
OR
kraken inputKrakenFile inputGrammerFile outputName
Dependencies
============
It is built using CMake, which is also its only dependency.
Goals
=====
It has the following design goals:
* Compiled
* Clean
* Fast (both running and writing)
* Good for Systems (including Operating Systems) programming
* Minimal "magic" code. (no runtime, other libraries automatically included)
2015-07-18 16:29:29 -04:00
It is inspired by C/C++, Scala, and Rust.