MiniPascalCompiler

Mini Pascal Compiler from Pascal to MIPS. Generate abstract syntax tree and intermediate representation. Including semantic analysis, optimization and error recovery.

Functions

  • Constant definition of the basic type
  • All basic types, as well as arrays, type definitions for custom structures
  • Arithmetic expressions and logical expressions
  • Variable assignment statement
  • If-then , If-then-else conditional statement
  • While, for, repeat loop statement
  • Functions and procedures with basic type parameters
  • Nested definition of functions and procedures
  • Subfunction or subroutine access to parent function or parent process variable
  • Nested calls to functions and procedures

Install

$ cmake .
$ make
$ ./src test/test.pas

Team Members

  • Xuandong Zhao
  • Yangsibo Huang
  • Ding Song