Giter Club home page Giter Club logo

io-llvm's Introduction

Stream-based language designed mainly as a testbed for new concepts in Compiler design.

Parser, Lexer and ParseTree

The entire pipeline from Parser, Lexer to ParseTree is handled by PEG. We consume the ParseTree into an AST in the simplest form possible and run optimizations only on the IR which goes hand in hand with the ways of LLVM. The main use of the AST in this case would be for validation and CodeGen.

The entire grammar for the core language is defined in a single header file, this is currently a terrible experiment to keep the complexity of the developer written part to a minimum with the idea behind it being that it is preferable that the grammar and part of the vocabulary of a language (spoken, written or otherwise) should fit within a pamphlet or two, albeit source lines of code for a grammar doesn't represent its complexity, nor an easily written language equates to one that is less complex (Brainfuck being a good example here).

CodeGen

We break tradition here by moving away from the well-known and accepted visitor-pattern and into a multi-methods structure. This is partly for experimentation and partly for allowing clean and quick expansion of the AST to solve the Expression problem. Since C++ does not have native support for multimethods, we have opted to use YOMM2 with a slight performance overhead towards calls to the CodeGen.

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.