Academic project for the "Programming Language Theory" course (2026)
An interpreter implementation for a formal programming language with simplified Go-like syntax. Created to explore programming language internals through hands-on development.
- Lexer - source code analysis and tokenization
- Parser - abstract syntax tree (AST) construction
- Interpreter - program execution
- Basic constructs: variables, arrays, loops, conditionals
- Block scoping
- Simple type system: integers, floats, boolean, string
- Go-inspired syntax
ProgramStmnt :: = statement+
statement ::= ExpressionStmnt | VarDeclStmnt | IfStmt | ForRangeStmt | MrVoiceStmnt
VarDeclStmnt ::= ("little_lady" | "little_lady_you_know") identifier (type)? "=" expression
MrVoiceStmnt ::= "Mr_Voice" "(" expression ("," expression)* ")"
IfStmt ::= "if" expression BlockStmnt ("else" BlockStmnt)?
ForStmt ::= "for" identifier "," identifier ":=" "range" expression BlockStmnt
BlockStmnt ::= "{" statement* "}"
type ::= "integer" | "float" | "bool" | "string"
ExpressionStmnt ::= Expression
Expression ::= IntegerExpr
| FloatExpr
| StringExpr
| BoolExpr
| AssignmentExpr
| BinaryExpr
| UnaryExpr
| PostfixExpr
| ArrayExpr
| IdentifierExpr
| "(" Expression ")"
AssignmentExpr ::= IdentifierExpr ("="|"+="|"-="|"*="|"/=") Expression
IntegerExpr ::= digit+
FloatExpr ::= digit+ "." digit+
StringExpr ::= '"' character* '"'
BoolExpr ::= "true" | "false"
BinaryExpr ::= Expression ("+" | "-" | "*" | "/" | "&&" | "||" | "AND" | "OR"| "NOT") Expression
UnaryExpr ::= ("-" | "!") Expression
PostfixExpr ::= Expression ("++" | "--")
ArrayExpr ::= "[" "]" type "{" Expression ( "," Expression )* "}"
IdentifierExpr ::= identifier
identifier ::= ( letter | "_" ) ( letter | digit | "_" )*
letter ::= [a-zA-Z]
digit ::= [0-9]
character ::= [^\n\r\t\"]
The Go Programming Language Specification - language reference and design principles
YouTube programming tutorials