SimpleCC stands for SimpleC Compiler.
SimpleC is a subset of the C programming language with a lua/pascal-like syntax. a hello world program with a few other tests can be seen in test.simplec.
SimpleC has full compatability with the C programming language and can use most if not all C libraries.
it uses some very careful string manipulation to replace keywords in the file. this also means that some keywords cannot appear at all in function or variable names. for example, if i have a function like this,
declare void thentest
end
that would translate to,
void ){test(){
so please be careful.
here is a list of all the keywords,
if then end main switch else uint --[[all valid C types]] Call declare --[[Any thing not listed here is the same way you do it in C]]
This is licensed under the GPL-v2.0
To build scc, you need,
- libc
- libc++
- a c++ compiler
- cmake
- version of VS CMake supports
- msbuild in your path <-- Not necessarily needed if building with VS
you can use cmake to build projects for your build system of choice, or you can use cmake to generate project files for Visual Studio.
Ubuntu
mkdir build && cd build && mkdir makefile && cd makefile && cmake ../../ && make
Windows
mkdir build && cd build && mkdir VS2019 && cd VS2019 && cmake ../../ && msbuild scc.sln
Mac
mkdir build && cd build && mkdir makefile && cd makefile && cmake ../../ && make
it should output a executable called scc. you can add this directory to your path or move it into a folder in your path.
A prebuilt binary is avalible for linux, windows and macos. go to actions and the latest succsesful workflow will have a binary for you. they are bundled together in a zip file. Im pretty sure all are 64 bit binaries.
Just make a PR with a description of your code and what it adds.