An open API service indexing awesome lists of open source software.

https://github.com/eirikvaa/nic

My first stab at creating a programming language from the ground up
https://github.com/eirikvaa/nic

compiler programming-language

Last synced: 8 months ago
JSON representation

My first stab at creating a programming language from the ground up

Awesome Lists containing this project

README

          

# Nic

## What is Nic?

Since about halfway into my studies at the Norwegian University of Science and Technology (NTNU), I have been interested in programming languages and compilers. I have followed the fantastic guide by [Crafting Interpreters](http://craftinginterpreters.com/) for quite some time now, but the way to truly learn something is to do it yourself. That's why I want to create _my very own_ programming language from scratch.

I have zero and all plans for Nic. I just want to try to create _something_ that can work. I also want it to compile down to machine code and have a strong type system. These things are way over my head right now, but I'm hoping that when I learn more and more concepts, I can incorporate them into the language. It will be a fun exercise and something to show other people.

## Where did the name come from?

Nic is truly a random name. I have a rubber duck at home with the name "Nordic Semiconductor", and this was at the point where I was _just_ starting to think about my new programming language, back in January 2018. I just took the first and two last letters of the word _Nordic_, and there it was. Truly underwhelming, one might say. But the name isn't important here.

## Features

- [x] Single and multiline comments
- [x] Booleans (true/false)
- [x] Binary operations (+, -, *, /, ==, !=, >=, >, <=, <, and, or)
- [x] Variables
- [x] Constants
- [x] Conditionals (if/else)
- [x] Printing
- [x] Int, Double, String and Bool types
- [x] Basic type checking
- [ ] Classes and methods
- [ ] Code generation with LLVM