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

If, Else If, Else

Source

int main()
{
  int i;
  if (i == 5)
  {
    i = 6;
  }
}

Generated AST

Source

int main()
{
  int i;
  if (/*i ==*/ 5)
  {
    //i = 6;
  }
  else
  {
    i = 5;
  }
}

Generated AST

Source

int main()
{
  //int i;
  if (i == 5)
  {
    //i = 6;
  }
  else if (i == 6)
  {
    //i = 7;
  }
  else
  {
    //i = 5;
  }
}

Generated AST