Spring 2025 | 程式語言課程專題 Programming Language Course Project
Spring 2025 | 程式語言課程專題 Programming Language Course Project
以C++語言撰寫,類Scheme語言直譯器。輸入OurScheme語法指令,系統可以輸出該指令的執行結果。從輸入的高階語言開始,進行詞彙切片、語法剖析、建立抽象語法樹,並執行像是四則運算、字串操作、條件判斷、定義函式、呼叫函式、區域變數綁定等指令功能。完整學習處理多層嵌套、遞迴高階函式的程式運作邏輯。
Implemented a Scheme-like interpreter in C++. The system takes OurScheme language commands as input and outputs their execution results. Starting from high-level language input, it performs lexical analysis, syntax parsing, constructs an abstract syntax tree, and executes operations such as arithmetic, string manipulation, conditional evaluation, function definition and invocation, and local variable binding. Gained comprehensive experience handling nested expressions and recursive higher-order functions.