Lexical and syntax analysis
Python lexical analysis recognizes identifiers, keywords, operators and nested comments. Recursive-descent parsing checks the grammar and works with symbol information for semantic checks.
Taking Greek-language source code all the way to RISC-V assembly.
A university team project implementing a compiler for Greek++, an educational procedural language with Greek keywords, functions, procedures, control flow and parameter passing.
View repository ↗The compiler produces intermediate code, symbol-table output and final assembly files.
Python lexical analysis recognizes identifiers, keywords, operators and nested comments. Recursive-descent parsing checks the grammar and works with symbol information for semantic checks.
Quadruples represent operations and control flow. Backpatching resolves branches, while temporary variables represent intermediate expression results.
RISC-V code generation handles activation records, parameters and access to non-local variables. Functions and procedures support call-by-value and call-by-reference behavior.