View on GitHub

JST

By Janelle Blankenburg, Shubham Gogna, and Terence Henriod
UNR CS 660: Compiler Construction

Download this project as a .zip file Download this project as a tar.gz file

Array Operations

Source

int main()
{
  int a[10];
  a[1] = 4;
}

Generated AST

Source

int main()
{
  int g;
  int a[10];
  a[1] = 4;
  g = a[1];
}

Generated AST

Source

int main()
{
  int g;
  int a[10];
  a[6] = 4;
  g = a[5 + 1];
}

Generated AST

Source

int main()
{
  int g;
  int a[10];
  a[1] = 4;
  g = a[1];
  g = a[g + 1];
}

Generated AST