Rust-based compiler for the Address Language developed by Ekaterina Logvinovna Yushchenko.
-
Preliminary Research
- Study the Address Language specifications in detail.
- Understand the underlying architecture for which the code will be compiled.
-
Lexer Development
- Design token specifications for the Address Language.
- Implement the lexer using libraries like
nom
orpest
. - Test lexer against various Address Language code snippets.
-
Parser Development
- Define grammar for the Address Language.
- Implement the parser which generates a parse tree from tokens.
- Test parser with diverse program constructs.
-
Semantic Analysis
- Implement type checking, variable binding, and other semantic checks.
- Design appropriate error messages for semantic errors.
-
Intermediate Representation (IR) Generation
- Define an appropriate IR for the compiler.
- Implement translation from parse tree to IR.
-
Code Optimization (optional)
- Implement basic optimization techniques on the IR.
- Ensure optimization correctness with tests.
-
Code Generation
- Design the target architecture's machine code or bytecode specifications.
- Translate IR to machine code or bytecode.
-
Testing
- Write unit tests for each module: lexer, parser, semantic analyzer, and code generator.
- Implement integration tests with sample Address Language programs.
-
Documentation
- Document functions, structures, and other important constructs.
- Write a user guide for the compiler with examples and usage guidelines.
-
Deployment and Packaging
- Decide on a distribution method (e.g., Cargo package, binary release).
- Package the compiler for release.