Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. If this expression parser is given an input file containing
  2.  
  3. a = b + c * d;
  4.  
  5. x = -y;
  6.  
  7. p = --q;
  8.  
  9. e = f + g + h + i;
  10.  
  11. j = k * l * m * n;
  12.  
  13. q = 3 + 4 * 5;
  14.  
  15. it will print
  16.  
  17. <n_expr_list
  18. <n_assign n_id[a]
  19. <n_plus n_id[b]
  20. <n_times n_id[c] n_id[d] >
  21. >
  22. >
  23. <n_assign n_id[x]
  24. <n_uminus n_id[y] >
  25. >
  26. <n_assign n_id[p]
  27. <n_uminus n_uminus n_id[q] >
  28. >
  29. <n_assign n_id[e]
  30. <n_plus
  31. <n_plus
  32. <n_plus n_id[f] n_id[g] > n_id[h]
  33. > n_id[i]
  34. >
  35. >
  36. <n_assign n_id[j]
  37. <n_times
  38. <n_times
  39. <n_times n_id[k] n_id[l] > n_id[m]
  40. > n_id[n]
  41. >
  42. >
  43. <n_assign n_id[q]
  44. <n_plus n_icon[3]
  45. <n_times n_icon[4] n_icon[5] >
  46. >
  47. >
  48. >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement