GithubHelp home page GithubHelp logo

rallahaseh / own-toy-compiler Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 977 KB

Toy programming language for the compiler construction course.

License: MIT License

Makefile 2.56% C++ 76.22% Yacc 16.76% Lex 4.45%

own-toy-compiler's Introduction

Compiler Construction Course

Semester: SS-2021

Instructor: Prof. Dr. Peter Faber

Project: Introduce a different type (suggested: void type) that can be used at least for function declarations and definitions c++

Student

  • Rashed Al-Lahaseh – 00821573

Conclusion

This project consists of different tasks, where each task is a stepping stone for the next task. In the first task, we will start with the Lex (lexical analysis), where we have to split our input data into a set of tokens such as identifiers, keywords, brackets, etc. This helped us understand how Flex works. In the second task, we deal with the semantic parsing, where we use Bison to generate an AST while parsing the tokens, and what’s nice here is that Bison is going to do most of the legwork here, as we will notice we are only going to define our needed AST.

In the third task, we further interact with our assembly using LLVM. This part is responsible for generating the machine code for each node where it walks over our AST. In general, this workshop (project) is a good experience for learning new things, solving problems, and understanding how programming languages work, as long as you get deeper into them and start realizing that not all the parts are hard to understand.

So, in the end, I would like to thank you Prof. Dr. Ing. Peter Faber for the material was provided through the course and for your help during our classes. Because we believe that this course gave us the good knowledge to dig in more on this field because as I believe this field is very important and still actively in the market with the new languages being provided in our days such as (Kotlin, Dark, Elm, etc.).

own-toy-compiler's People

Contributors

rallahaseh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.