AetherC is a comprehensive C compiler project aimed at providing a robust toolchain for compiling C code into optimized NASM assembly language. The project includes modules for tokenization, parsing, semantic analysis, code generation, semantic validation, and preprocessing.
- Lexer for tokenization of source code.
- Parser for constructing Abstract Syntax Tree (AST).
- Resolver for semantic analysis and symbol table generation.
- Code generator for NASM assembly output.
- Semantic validator for ensuring code correctness.
- Preprocessor for handling directives and macros.
-
Clone the repository:
git clone https://github.com/yourusername/AetherC.git cd AetherC
-
Build the project:
make build
-
Run tests (optional):
make test
-
Compile C code:
./aetherc source_file.c -o output_file.asm
-
Run generated assembly code (example using NASM and GCC):
nasm -f elf64 -o output_file.o output_file.asm gcc -o executable_name output_file.o ./executable_name
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature_branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature_branch
). - Create a new Pull Request.
- NASM for the NASM assembler.