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

For, While, Do-While Loops

Source

int main()
{
    int i;
    for(i = 0; ;) {}
}

Generated AST

Source

int main()
{
    int i;
    for(i = 0; ; i++) {}
}

Generated AST

Source

int main()
{
    int i;
    for(i = 0; i < 1; i++) {}
}

Generated AST

Source

int main()
{
    int i;
    while(i < 5){}
}

Generated AST

Source

int main()
{
    int i;
    do {} while (i > 10);
}

Generated AST