Author Topic: A tiny compiler written in pure C  (Read 1500 times)

0 Members and 1 Guest are viewing this topic.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2659
    • Geeks3D.com
A tiny compiler written in pure C
« on: January 08, 2020, 01:46:06 PM »
Quote
A tiny compiler for a simple synthetic language featuring LL(2) grammar, written in pure C, with Lexer, Parser, ASM-like code generator and Virtual machine implemented

The compiler consist of typical parts, known as:

    Lexer (lexer.h)
    Parser (parser.h)
    Assembler like code generator (generator.h)
    Virtual machine (virtual_machine.h)
    Symbol table (symbol_table.h)
    Abstract syntax tree (ast.h)

The compiler is implemented for educational purposes. Some parts are simplified for the sake of better understanding

Links:
- https://github.com/zakirullin/tiny-compiler
- https://en.wikipedia.org/wiki/LL_grammar