Skip to content

I'm creating a new programing language on C, till now I only made the variable creation syntax and its compiled into C code so we can execute it with GCC compiler.

Notifications You must be signed in to change notification settings

skinwalker3654/programing-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

I was starting to creating my own programing language and till now i made the compiler that tokenizes the file input and does syntax check to generate the C code on an output.c file.


Features

it can compile variable creation in a new language with diffrent syntax end has a build in printf function called write(). end one called getInput() which is for basic I/O.

syntax:

let <var_name>: <var_type> = <value>;

examples:

let number: integer = 45;
let name: string = "michael";
let isGood: boolean = true;

write("Hello!!\n");
write(number);
write("How are you!\n");

number = getInput("Enter a number: ");
name = getInput("Enter your name: ");

# This is a comment
let newVar1: integer = getInput("Enter a number: ");
let newVar2: string = getInput("Enter your name: ");

# For now loops are only allowing write()
loop i=1 to 3: write("Hello");
loop x=2 to 10: write(x);
...

Types:

integer
string
float
boolean

USE the compiler:

  1. compile the compiler:
make
  1. use the compiler:
./compile filename

I will add more in the future.

About

I'm creating a new programing language on C, till now I only made the variable creation syntax and its compiled into C code so we can execute it with GCC compiler.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published