The name "c15" has nothing to do with the C programming language, this is a private joke like the name of the compiler
This language is based on the C syntax, with some difference and some other thing in more, i designed it has how i wanted it to be and with what i wanted.
There probably a bunch of bug, if you find one and want to contribute send me someting here (c15.tsukini@gmail.com)
| File extension | Utility |
|---|---|
.15 |
for the code |
.15h |
for prototype, set, ... (code can't be writen in it) |
Clone the repository:
git clone https://github.com/TsukiNi22/my_language.git c15To create a link to the compiler:
cd c15
make sys_cmd -C compilerTo use it or for more information use -h or --help:
kmc files_pathFor language syntax or more information go to the file in the branch wiki
Open the file compiler/src/const.c, you can see it here const.c
You will see a list of string like below in the list named token_str:
"=", // op_eqIf you change the "=" to "test" for exemple. The compiler will now compile each file with this string test who will be interpreted as = in the executable.
The changement of "@>" & "<@" is not handle for now! or also change the line 260 & 262 (line number can be a little different) in the file compiler/src/tokenizer/tokenizer.c, you can also see it here tokenizer.c
Open the file compiler/include/kamion.h, you can see it here kamion.h
You will see a multiple define like below:
/* extension */
#define FILE_EXTENSION ".15"
#define HEADER_EXTENSION ".15h"
/* files_name */
#define BINARY_NAME "15.out"If you want to change the extension of the file just change the two string ".15" & ".15h" as you want.
If you want to change the default binary name just change the string "15.out as you want.
Open the file compiler/src/const.c, you can see it here const.c
You will see a list of string like below in the list named flags & full_flags:
'h',
"--help",The first type of option stored in flags like 'h' can only be a character and can't be -.
The second type of option stored in full_flags like "--help", they must start with --. The other characters can be anything.
After the changement are made do this at the root of the project file:
make fclean sys_cmd -C compilerOr this in the compiler file:
make fclean sys_cmd⚠️ Please note that, if you change any file content in the wrong way you may break the whole compiler!!! ⚠️
| Task | State |
|---|---|
| Lexer | Done |
| Parser | In progress |
| Semantic Analyzer | Nothing |
| Optimizer | Nothing |
| Code Generation | Nothing |
| Linker | Nothing |