- Course: Programming Language
- Project: Term Project
- Implementation Language: Java
This project is a mini programming language inspired by Turkish syntax and keywords. The goal is to design and implement the core front-end components of a compiler.
- Lexical Analyzer (Lexer)
- Recursive Descent Parser
- Symbol Table
- Syntax Error Detection
- Test Case Execution with Sample Source Files
- Variable Declarations
- Assignment Statements
- Arithmetic Expressions
- Conditional Statements (
if / else) - Loop Structures (
while) - Block Scope with Braces
src/
├── Main.java
├── Lexer.java
├── Parser.java
├── Token.java
├── TokenType.java
└── SymbolTable.java
tests/
├── ArithmeticExample.txt
├── ConditionalExample.txt
├── LoopExample.txt
└── VariableDeclarationExample.txt
Sample source codes are located in the tests/ folder.
javac src/*.java
java -cp src Maintam x;
x = 5 + 3;
eger (x > 5) {
yaz x;
}
+-------------------+
| Main.java |
| Program Entry |
+---------+---------+
|
v
+-------------------+
| Lexer.java |
| Source Scanner |
+---------+---------+
|
v
+-------------------+
| Token.java |
| Token Objects |
+---------+---------+
|
v
+-------------------+
| Parser.java |
| Syntax Analyzer |
+----+---------+----+
| |
v v
+---------+ +------------------+
|TokenType| | SymbolTable.java |
| Enum | | Variable Storage |
+---------+ +------------------+
- Main.java → Starts program execution and loads input files.
- Lexer.java → Converts source code into tokens.
- Token.java → Stores token type and value.
- TokenType.java → Defines all token categories using enum.
- Parser.java → Validates syntax using Recursive Descent Parsing.
- SymbolTable.java → Stores declared identifiers and metadata.
In Progress 🚧
Programming Languages Course Project Team