compiler README

The project's README from github.com/edgcpp/compiler. As one markdown file: README.md.

EDG Compiler Project

Welcome to the open source EDG C/C++ compiler project!

About

The EDG C/C++ front end is the primary focus of this repository. The EDG front end is known for: its excellent parsing compatibility and bug emulation, to make sure source that compiles with Clang, GCC, and MSVC compiles with EDG; extensive documentation, to assist with development and modification; and extreme configurability, to allow it to be derived for use into a large number of C/C++ oriented products.

The compiler project also includes: a C-generating back end, which can be used to generate C code for C++ programs; a C++-generating back end, which is useful for source-to-source transformation applications; a prelinker, which handles automatic template instantiation; a minimal runtime support library (but not any "real" libraries, e.g., for stream I/O); utilities to write the intermediate language to a file, read it back in, and display it in human-readable form; a name demangler; and a collection of purpose built development tools.

Documentation

See the documentation on: https://edgcpp.org/doc/.

[!NOTE]

If you would like to build a local copy of the documentation see the documentation build guide.

Building & Contributing

To get started, it's recommended for most people to clone the repository using a partial clone (this keeps a full copy of the git history while only downloading the most recent version of each file, git can implicitly fetch older versions as needed):

git clone --filter=blob:none [email protected]:edgcpp/compiler.git

If you are looking to build the front end from source and use it, please see the build instructions.

If you are looking to make changes to the front end, please see the contribution guide and the development guide for quickly getting setup.

Tips, Tricks, & Tutorials

To further aid humans and AI agents in product development there is additional documentation for tips, tricks, and tutorials that can be found in the development annex.

compiler (edgcpp/compiler)

parsing
Searching Database…

What is this?This is the open-source EDG C/C++ compiler front end project: a parser and semantic analyzer for C and C++ that is famous for matching Clang, GCC, and MSVC's parsing behavior (including their quirks) so vendors can embed it in their own tools.
Is this a full compiler that produces machine code, or just a front end?It is primarily a front end (lexer/parser/semantic analyzer), not a codegen-to-machine-code compiler. It ships with back ends that regenerate C or C++ source for source-to-source use cases instead of native binaries.
Who is this front end actually for?Companies and developers building their own compilers, IDEs, static analyzers, or source-to-source tools, since EDG is designed to be extremely configurable and re-derived into many different C/C++-oriented products rather than used as a finished standalone compiler.
What extra tools come bundled with the front end besides parsing?It also includes a prelinker that handles automatic template instantiation, utilities to dump/read/display the intermediate language, a name demangler, and a small runtime support library (no full standard library implementations).
Why does matching Clang/GCC/MSVC parsing matter so much here?Because EDG is meant to be embedded into other vendors' compilers and tools, code that already compiles with mainstream compilers needs to compile unchanged with EDG, including replicating their parsing bugs for compatibility.
Creator
edgcpp
Size
194.8 MB
Stars
937
Updated
CommitOct 16
Age
25d
Commits · 90 Days