Logo webu
Are you interested in studying at Unicorn University? Sign up for an open day and find out more.

Fundamentals and Implementation of Programming Languages

6 ECTS
Master's
Czech
Karel Šafr

The course is designed for beginners who want to gain a deeper understanding of programming rather than simply writing commands in an existing programming language. Students will gradually become familiar with both basic and more advanced programming concepts, such as variables, expressions, conditions, loops, functions, data types, variable scope, and error handling.

Course outline

Introduction to Programming Languages and the First C++ Project

What is a programming language, what is source code, and what are an interpreter and a compiler? Why can’t a computer understand a program directly? Students will create a C++ project and learn how to compile and run it. At the same time, they will choose a working name for their future programming language.

Program Text as Input: Reading a File and Working with Characters
Students will learn how to load the source file of their language into a C++ program. They will understand that a program is initially just plain text that needs to be processed. They will practice working with strings, characters, files, and command-line arguments.
Tokens and Lexers: Breaking a Program into Meaningful Parts
Students will create the first component of their own programming language — a lexer. It will convert the program text into tokens, such as numbers, variable names, keywords, operators, and parentheses. In this module, students will understand the difference between plain text and the structure of a program.
Expressions and Mathematical Operations
Students will add support for simple expressions, such as 1 + 2, x * 5, and (3 + 4) * 2. They will learn how operator precedence works and how a programming language determines the order in which expressions are evaluated.
Parser and Abstract Syntax Tree
Students will learn how a parser works and be introduced to the concept of an Abstract Syntax Tree (AST). They will understand that a program is not simply a sequence of words, but a structured representation that can be evaluated. In C++, they will begin building representations of expressions and statements using structs or classes.
Variables and Program Memory
Students will add variable declarations to their programming language, using syntax such as let x = 10. They will learn how values are stored and associated with variable names, how assignment works, and how variables can be referenced later in expressions.
Data Types and Values
Students will add basic data types to their programming language, including numbers, strings, and Boolean values (true / false). They will learn the difference between a value and its type, understand how type errors occur, and explore why certain operations are only valid for specific data types.
Conditionals: if, else, and Program Decision-Making
Students will extend their programming language with conditional statements using constructs such as if, else, and end. They will learn how conditional logic controls the flow of a program and how Boolean values and expressions determine which branch of the program is executed.
Loops: Repetition with while and for
Students will add looping constructs to their programming language, starting with a simple while loop and then introducing a basic for loop, such as for i in range(0, 10). They will learn how a section of code can be evaluated repeatedly, how to work with loop counters, and how infinite loops can occur.
Functions, Parameters, and Return Values
Students will add support for user-defined functions to their programming language, using syntax such as fun add(a, b) do ... return ... end. They will learn the difference between parameters and arguments, understand return values and function calls, and explore how a new execution environment is created when a function is called.
Scope, Local Variables, and Error Messages
Students will learn the difference between global and local variables and understand how variable scope determines where a variable can be accessed. They will explore how the language looks up values across different levels of scope and improve error messages so that the language can clearly indicate where and why a program failed.
Finalizing the Programming Language, Compilation, and Presentation
In the final module, students will complete their own programming language. They will choose its name, file extension, keywords, and a small custom feature. The final result will be a compiled C++ program capable of running programs written in the student’s own language. The course will conclude with a short presentation and demonstration of a working program written in their language.
document_check.svg
We use cookies on this website to ensure its functionality and to personalise ads, solely with your consent and in accordance with our Cookies Policy.

By clicking on the "Accept cookies" button, you consent to the use of selected cookies and agree to the transfer of behavioural data for the display of targeted advertising on social and advertising networks. You can choose which information you want to share with us by clicking on the Cookie settings button.