This project is a tutorial for myself to learn how to create my own programming language. I decided to write all the code in C. Below is a list of things that I would like to try:
- a lexer
- a parser
- an interpreter
- produce native executables
The development compiler is Tiny C Compiler aka. tcc
. It compiles code really fast. The name of my programming compiler is pltc
, which simply stands for Programming Language Tutorial Compiler.
- Go to this URL and download the appropriate version
- Extract the downloaded zip file where-ever you like
- Add the path to the
tcc
executable file into your environment - Confirm that it works by running
tcc --help
On the command line (if you have git
installed):
git clone https://github.com/santerijps/programming-language-tutorial
With make
:
cd programming-language-tutorial
make
With tcc
:
cd programming-language-tutorial
mkdir bin
tcc src/pltc.c -o bin/pltc
cd programming-language-tutorial
bin/pltc examples/example.py