roterdam / 6035-compiler Goto Github PK
View Code? Open in Web Editor NEWThis project forked from skishore/6035-compiler
This project forked from skishore/6035-compiler
Code is organized in the following structure: build.xml - The master build file for the project. src |-edu/mit/compilers/tools/CLI.java: | command-line parsing libraries, modified from originally provided CLI.java |-edu/mit/compilers/le02/Main.java: | the main entry point for the compiler |-edu/mit/compilers/le02/CompilerException.java | the base SourceLocation-aware exception class for the compiler |----------------Previous phases---------------- |-src/edu/mit/compilers/le02/SourceLocation.java | encodes input locations for use in error reporting |-src/edu/mit/compilers/le02/ErrorReporting.java | collects errors and pretty-prints them with context |-src/edu/mit/compilers/le02/Util.java | miscellaneous utility methods |-src/edu/mit/compilers/le02/DecafType.java | enum containing the valid types of the Decaf language |-src/edu/mit/compilers/le02/symboltable/*Descriptor.java | different kinds of descriptors used in symbol tables |-src/edu/mit/compilers/le02/symboltable/SymbolTable.java | symbol tables used in each context in the CodeIR |-src/edu/mit/compilers/le02/semanticchecks/*.java | semantic checks that the compiler runs upon the populated CodeIR |-src/edu/mit/compilers/le02/ir/IrGenerator.java | generates the CodeIR/AST based on the concrete parse tree |-src/edu/mit/compilers/le02/ir/IntRangeChecker.java | checks integer ranges after processing of unary minus on raw ints |-src/edu/mit/compilers/le02/grammar/scanner.g | scanner ANTLR grammar, used to create autogenerated scanner |-src/edu/mit/compilers/le02/grammar/parser.g | parser ANTLR grammar, used to create autogenerated parser |-src/edu/mit/compilers/le02/stgenerator/ASTDescriptorVisitor.java | walks the AST and populates symbol tables and adds descriptors to each | node in the AST that has a descriptor |-src/edu/mit/compilers/le02/ast/*Node.java | node classes that are used to build up the AST | see src/edu/mit/compilers/le02/ast/AstDesign.txt for documentation |-src/edu/mit/compilers/le02/ast/ASTNodeVisitor.java | base AST walking class, used for semantic checks/symbol table generation |-src/edu/mit/compilers/le02/ast/AstPrettyPrinter.java | pretty-prints the AST |----------------Codegen---------------- |-src/edu/mit/compilers/cfg/*Statement.java | Classes roughly encapsulating flattened low-level IR statements. |-src/edu/mit/compilers/cfg/CFGGenerator.java | The first pass CFG generator that flattens the AST tree |-src/edu/mit/compilers/cfg/BasicBlockGraph.java | The second pass CFG generator that merges adjacent non-branching blocks | of BasicStatements into single BasicBlockNodes. |-src/edu/mit/compilers/cfg/CFGFragment.java | A non-branching fragment of the control flow graph; mergeable |-src/edu/mit/compilers/cfg/*Argument.java | Represents a single memory location or register location. |-src/edu/mit/compilers/cfg/BasicBlockNode.java | Represents a single element of the final CFG structure. Contains a target | and optionally a branch target and a conditional at the end to evaluate |-src/edu/mit/compilers/cfg/CFGVisualizer.java | Generates a .dot graphviz file from a first or second-stage CFG. |-src/edu/mit/compilers/cfg/ControlFlowGraph.java | Encapsulates a Control Flow Graph. Contains a list of functions and their | start nodes, and all globals and strings. |-src/edu/mit/compilers/cfg/AsmWriter.java | Transforms a second-stage ControlFlowGraph into a set of assembly | instructions that are written to the output file. tests |-src/**/*.java | unit tests for code |-tests/codegen | contains .dcf programs to compile, and the expected output of those | programs' output when compiled and run. |-tests/semantics | contains legal and illegal programs, and verifies that they pass or fail | semantic checks appropriately |-tests/parser | contains legal and illegal programs, and verifies that they pass or fail | parsing appropriately |-tests/scanner | contains legal and illegal programs, and verifies that they pass or fail | scanning appropriately and produce correct golden outputs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.