Main steps for the design and implementation of a compiler

Abstract

Ovaj završni rad prikazuje korake i teorijsku pozadinu implementacije jednostavnog programskog prevoditelja za probni jezik Kaleidoscope. Rad opisuje tri osnovne faze prevođenja programa: leksičku analiza, sintaksnu analizu i generiranje koda. Također prikazuje implementaciju jednostavnog prevoditelja napisanu u jeziku Swiftu, koja koristi LLVM set alata za generiranje i izvođenje koda. Rezultat rada je programski prevoditelj koji se može koristiti preko komandnog sučelja za izvršavanje programskog koda.This bachelor thesis shows the steps and theoretical background of implementing a simple compiler for a toy programming language called Kaleidoscope. The thesis describes the three main steps of compiling a program: lexical analysis, parsing and code generation. It also shows an implementation of a simple compiler written in Swift, using the LLVM toolset for code generation and interpretation. The result of this thesis is a working compiler that can be used as a command line tool to execute code

    Similar works