Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If this expression parser is given an input file containing
- a = b + c * d;
- x = -y;
- p = --q;
- e = f + g + h + i;
- j = k * l * m * n;
- q = 3 + 4 * 5;
- it will print
- <n_expr_list
- <n_assign n_id[a]
- <n_plus n_id[b]
- <n_times n_id[c] n_id[d] >
- >
- >
- <n_assign n_id[x]
- <n_uminus n_id[y] >
- >
- <n_assign n_id[p]
- <n_uminus n_uminus n_id[q] >
- >
- <n_assign n_id[e]
- <n_plus
- <n_plus
- <n_plus n_id[f] n_id[g] > n_id[h]
- > n_id[i]
- >
- >
- <n_assign n_id[j]
- <n_times
- <n_times
- <n_times n_id[k] n_id[l] > n_id[m]
- > n_id[n]
- >
- >
- <n_assign n_id[q]
- <n_plus n_icon[3]
- <n_times n_icon[4] n_icon[5] >
- >
- >
- >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement