In a team of three or four students, convert the input program (below) into a series of tokens then place each token in an LCRS (left-child, right-sibling) binary tree. There should be one token per tree node. The program below is defined by the ChagaLite programming programming language.
Please use the BNF document for the ChagaLite programming language. Since this is an in-class exercise, please ask me questions if you need any help.
function int sum_of_first_n_squares (int n) { int sum; sum = 0; if (n >= 1) { sum = n * (n + 1) * (2 * n + 1) / 6; } return sum; } procedure main (void) { int n; int sum; n = 100; sum = sum_of_first_n_squares (n); printf ("sum of the squares of the first %d numbers = %d\n", n, sum); }
Since this is a group assignment, please write the names of each member of the team student on your assignment submission along with "Exercise 3b: Concrete Syntax Tree".