The Cmajor project contains four compilers: cmc, cppcmc, masmcmc and cmcmc all of which can be accessed from the cmcode IDE. The first three are implemented in C++ and share a common front-end. The fourth is written entirely in Cmajor.
The front-end parses each Cmajor source file and generates an abstract syntax tree from it. Then it generates a bound tree representation from the syntax tree.
The cmc back-end processes the bound syntax tree produced by the front-end and generates LLVM intermediate code from it. The intermediate code is compiled to object code and object code is archived to libraries by calling LLVM libraries. Programs are linked by calling clang++.
The cppcmc back-end processes the bound syntax tree produced by the front-end and generates very primitive C++ from it. The generated C++ is comparable to intermediate code more than hand-written source code. Each C++ file is then compiled to object code by calling g++. The object code files are archived to libraries by calling ar. Programs are linked by calling g++. This back-end has some support for source-level debugging in the cmcode IDE.
The masmcmc back-end processes the bound syntax tree produced by the front-end and generates Cmajor intermediate code from it. The intermediate files have .i suffix. The intermediate code is compiled to x64 assembly code by the back-end. The back-end generates .vcxproj project files that references the assembly files and compiles the assembly files to object code by calling MSBuild that calls msvc and MASM. The object code files are archived to libraries and programs are linked by calling MSBuild that calls msvc and linker. This back-end supports assembly-level debugging by means of opening the .vcxproj project files in Visual Studio.
The cmcmc compiler parses each Cmajor source file and generates an abstract syntax tree from it. It then generates bound tree representation from the syntax tree and generates Cmajor intermediate code from the bound tree. The intermediate code is compiled to x64 assembly code by the compiler. The compiles generates .vcxproj project files that references the assembly files and compiles the assembly files to object code by calling MSBuild. The object code files are archived to libraries and programs are linked by calling MSBuild. This compiler supports assembly-level debugging by means of opening the .vcxproj project files in Visual Studio. The source code of the compiler is included in the installation package.