How mohitmishra786/compiler works
EDG is a configurable C/C++ compiler front end, accompanied by code-generating back ends, template prelinking, IL utilities, a demangler, and a minimal runtime. The principal workflow takes source through front-end analysis and intermediate representation (IL) to generated C or C++. README-level evidence establishes the product capabilities; sampled source also shows pragma processing and IL structures, but does not expose the complete compiler call graph, so internal arrows are limited to documented relationships.
Main entry points: il_def.h Intermediate Language · lexical.c Lexing and Preprocessing · decls.c Declarations and Semantics · expr.c Expressions and Statements
Components 16
Compiler Front End
- Lexing and Preprocessing
src/lexical.c - Declarations and Semantics
src/decls.c - Expressions and Statements
src/expr.c - Pragma Processing
src/pragma.c - Symbols and Scope
src/symbol_tbl.h - Target Configuration
src/target.h
Intermediate Representation
- Intermediate Language
src/il_def.h - IL Read and Display
src/il_read.c
Code Generation
- C Code Generator
src/c_gen_be.c - C++ Code Generator
src/cp_gen_be.c
Compiler Support
- Template Prelinker
util/edg_prelink.c - Name Demangler
util/decode.c - Minimal Runtime
lib_src/runtime.h
Other components
- Source Author
- Compiler User
- Generated C or C++
Connections 15
- Source Author → Lexing and Preprocessing: provides source
README.md - Lexing and Preprocessing → Declarations and Semantics: front-end analysis
README.md - Declarations and Semantics → Expressions and Statements: analyzes constructs
README.md - Expressions and Statements → Intermediate Language: represents program
README.md - Pragma Processing → Intermediate Language: records pragma data
src/pragma.c - Symbols and Scope → Intermediate Language: supports semantic representation
- Target Configuration → Intermediate Language: configures front end
- Intermediate Language → C Code Generator: generates C
README.md - Intermediate Language → C++ Code Generator: generates C++
README.md - Intermediate Language → IL Read and Display: writes and reads
README.md - Compiler User → Template Prelinker: uses template instantiation
README.md - Compiler User → Name Demangler: uses name demangling
README.md - C Code Generator → Generated C or C++: emits C
README.md - C++ Code Generator → Generated C or C++: emits C++
README.md - Generated C or C++ → Minimal Runtime: may require support