let s1 = n(NT_LET, n(NT_VAR, id("n")), n(NT_VAR, id("fac")), n(NT_VAR, id("i"))); let s2 = n(NT_ASSIGN, n(NT_VAR, id("n")), n(NT_NUMBER, 7)); let s3 = n(NT_ASSIGN, n(NT_VAR, id("fac")), n(NT_NUMBER, 1)); let s4 = n(NT_ASSIGN, n(NT_VAR, id("i")), n(NT_NUMBER, 1)); let s5 = n(NT_ASSIGN, n(NT_VAR, id("fac")), n(NT_MUL, n(NT_VAR, id("fac")), n(NT_VAR, id("i")))); let s6 = n(NT_ASSIGN, n(NT_VAR, id("i")), n(NT_ADD, n(NT_VAR, id("i")), n(NT_NUMBER, 1))); let s7 = n(NT_WHILE, n(NT_LESSEQ, n(NT_VAR, id("i")), n(NT_VAR, id("n"))), n(NT_SEQ, s5, s6)); let s = n(NT_SEQ, s1, s2, s3, s4, s7); /* equivalent to { let n, fac, i; n := 7; fac := 1; i := 1; while i <= n do { fac := fac * i; i := i - 1 } } */