Input code to lexical analysis to syntactic analysis to semantic analysis to code generation.
-
Updated
Aug 8, 2016 - C++
A grammar describes the syntax of a programming language, and might be defined in Backus-Naur form (BNF). A lexer performs lexical analysis, turning text into tokens. A parser takes tokens and builds a data structure like an abstract syntax tree (AST). The parser is concerned with context: does the sequence of tokens fit the grammar? A compiler is a combined lexer and parser, built for a specific grammar.
Input code to lexical analysis to syntactic analysis to semantic analysis to code generation.
This is a parser that I created using ANTLR. This parses the translation unit file generated by GCC when using the -fdump-translation-unit flag.
Some toy code to manipulate Abstract Syntax Tree structures, written in C++
Compiler for a subset of ANSI C, base on virtual machine (unfinished)
Compilers course project. Developed a compiler for a subset of C programming language (Decaf).
libpypa is a Python parser implemented in pure C++
C# Compiler, DU university project.
JavaScript AST in C++
Yet Another Compiler for C
Text index with support for complex queries
This is a project me and @jovanovic16942 have done for Compiler Construction course (2018) at Computer Science Department of Faculty of Mathematics, University of Belgrade in Serbia. Its general purpose is to preview some basic statistics of arbitrary C code.