Skip to content

lmxyy/Mx_star-Compiler

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
asm
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Mx_star Compiler

Overview

Mx*Compiler is a compiler for course Compiler 2018 at ACM Class, Shanghai Jiao Tong University.

Source LanguageTarget Language
Mx* (a C-and-Java-like language)Linux x86-64 Assembly in NASM

Features

  • Warnings

Todo List

parser [100%]

  • [X] Mx_star.g4

ast [100%]

Vistor

Location

Node [100%]

  • [X] ProgNode
  • [X] VartypeNode
  • [X] VartypePlusNode
  • [X] Definitions
    • [X] DefNode
    • [X] DefunNode
    • [X] DefvarNode
    • [X] DefclassNode
    • [X] DefvarlistNode
  • [X] Statements
    • [X] StmtNode
    • [X] IfStmtNode
    • [X] WhileStmtNode
    • [X] ForStmtNode
    • [X] BreakStmtNode
    • [X] ContinueStmtNode
    • [X] ReturnStmtNode
    • [X] BlankStmtNode
    • [X] BlockNode
  • [X] Expressions
    • [X] ExprNode
    • [X] ExpressionNode
    • [X] TermNode
    • [X] IdentifierNode
    • [X] CallfunNode
    • [X] VariableNode
    • [X] LiteralNode
    • [X] IntegerliteralNode
    • [X] StringliteralNode
    • [X] BooleanliteralNode
    • [X] NullNode
    • [X] AssignmentNode

symbol [100%]

  • [X] Type
  • [X] ExprOperator

Optimization

  • Dominator Tree
  • Register Coloring
  • Print/Println
  • Inliner
  • Remove useless basic block

Reference

Tools

LLIRInterpreter

About

A Compiler for Compiler 2018 Course at ACM Class, SJTU

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published