Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.60 KB | None | 0 0
  1. Starting parse
  2. Entering state 0
  3. Reducing stack by rule 3 (line 99):
  4. -> $$ = nterm assignments (:1.1: )
  5. Stack now 0
  6. Entering state 2
  7. Reading a token: yylex returning 1000
  8. Next token is token "identifier" (:1.1: three)
  9. Shifting token "identifier" (:1.1: three)
  10. Entering state 4
  11. Reading a token: yylex returning 61
  12. Next token is token '=' (:1.1: )
  13. Shifting token '=' (:1.1: )
  14. Entering state 8
  15. Reading a token: yylex returning 5000
  16. Next token is token "integer-const" (:1.1: 3)
  17. Shifting token "integer-const" (:1.1: 3)
  18. Entering state 5
  19. Reducing stack by rule 10 (line 112):
  20. $1 = token "integer-const" (:1.1: 3)
  21. -> $$ = nterm exp (:1.1: 3)
  22. Stack now 0 2 4 8
  23. Entering state 14
  24. Reading a token: yylex returning 1000
  25. Next token is token "identifier" (:1.1: seven)
  26. Reducing stack by rule 4 (line 102):
  27. $1 = token "identifier" (:1.1: three)
  28. $2 = token '=' (:1.1: )
  29. $3 = nterm exp (:1.1: 3)
  30. -> $$ = nterm assignment (:1.1: )
  31. Stack now 0 2
  32. Entering state 6
  33. Reducing stack by rule 2 (line 98):
  34. $1 = nterm assignments (:1.1: )
  35. $2 = nterm assignment (:1.1: )
  36. -> $$ = nterm assignments (:1.1: )
  37. Stack now 0
  38. Entering state 2
  39. Next token is token "identifier" (:1.1: seven)
  40. Shifting token "identifier" (:1.1: seven)
  41. Entering state 4
  42. Reading a token: yylex returning 61
  43. Next token is token '=' (:1.1: )
  44. Shifting token '=' (:1.1: )
  45. Entering state 8
  46. Reading a token: yylex returning 5000
  47. Next token is token "integer-const" (:1.1: 1)
  48. Shifting token "integer-const" (:1.1: 1)
  49. Entering state 5
  50. Reducing stack by rule 10 (line 112):
  51. $1 = token "integer-const" (:1.1: 1)
  52. -> $$ = nterm exp (:1.1: 1)
  53. Stack now 0 2 4 8
  54. Entering state 14
  55. Reading a token: yylex returning 43
  56. Next token is token '+' (:1.1: )
  57. Shifting token '+' (:1.1: )
  58. Entering state 9
  59. Reading a token: yylex returning 5000
  60. Next token is token "integer-const" (:1.1: 2)
  61. Shifting token "integer-const" (:1.1: 2)
  62. Entering state 5
  63. Reducing stack by rule 10 (line 112):
  64. $1 = token "integer-const" (:1.1: 2)
  65. -> $$ = nterm exp (:1.1: 2)
  66. Stack now 0 2 4 8 14 9
  67. Entering state 15
  68. Reading a token: yylex returning 42
  69. Next token is token '*' (:1.1: )
  70. Shifting token '*' (:1.1: )
  71. Entering state 11
  72. Reading a token: yylex returning 1000
  73. Next token is token "identifier" (:1.1: three)
  74. Shifting token "identifier" (:1.1: three)
  75. Entering state 13
  76. Reducing stack by rule 9 (line 111):
  77. $1 = token "identifier" (:1.1: three)
  78. -> $$ = nterm exp (:1.1: 3)
  79. Stack now 0 2 4 8 14 9 15 11
  80. Entering state 17
  81. Reducing stack by rule 7 (line 109):
  82. $1 = nterm exp (:1.1: 2)
  83. $2 = token '*' (:1.1: )
  84. $3 = nterm exp (:1.1: 3)
  85. -> $$ = nterm exp (:1.1: 6)
  86. Stack now 0 2 4 8 14 9
  87. Entering state 15
  88. Reading a token: yylex returning 1000
  89. Next token is token "identifier" (:1.1: seven)
  90. Reducing stack by rule 5 (line 107):
  91. $1 = nterm exp (:1.1: 1)
  92. $2 = token '+' (:1.1: )
  93. $3 = nterm exp (:1.1: 6)
  94. -> $$ = nterm exp (:1.1: 7)
  95. Stack now 0 2 4 8
  96. Entering state 14
  97. Next token is token "identifier" (:1.1: seven)
  98. Reducing stack by rule 4 (line 102):
  99. $1 = token "identifier" (:1.1: seven)
  100. $2 = token '=' (:1.1: )
  101. $3 = nterm exp (:1.1: 7)
  102. -> $$ = nterm assignment (:1.1: )
  103. Stack now 0 2
  104. Entering state 6
  105. Reducing stack by rule 2 (line 98):
  106. $1 = nterm assignments (:1.1: )
  107. $2 = nterm assignment (:1.1: )
  108. -> $$ = nterm assignments (:1.1: )
  109. Stack now 0
  110. Entering state 2
  111. Next token is token "identifier" (:1.1: seven)
  112. Shifting token "identifier" (:1.1: seven)
  113. Entering state 4
  114. Reading a token: yylex returning 42
  115. Next token is token '*' (:1.1: )
  116. Reducing stack by rule 9 (line 111):
  117. $1 = token "identifier" (:1.1: seven)
  118. -> $$ = nterm exp (:1.1: 7)
  119. Stack now 0 2
  120. Entering state 7
  121. Next token is token '*' (:1.1: )
  122. Shifting token '*' (:1.1: )
  123. Entering state 11
  124. Reading a token: yylex returning 1000
  125. Next token is token "identifier" (:1.1: seven)
  126. Shifting token "identifier" (:1.1: seven)
  127. Entering state 13
  128. Reducing stack by rule 9 (line 111):
  129. $1 = token "identifier" (:1.1: seven)
  130. -> $$ = nterm exp (:1.1: 7)
  131. Stack now 0 2 7 11
  132. Entering state 17
  133. Reducing stack by rule 7 (line 109):
  134. $1 = nterm exp (:1.1: 7)
  135. $2 = token '*' (:1.1: )
  136. $3 = nterm exp (:1.1: 7)
  137. -> $$ = nterm exp (:1.1: 49)
  138. Stack now 0 2
  139. Entering state 7
  140. Reading a token: yylex returning 0
  141. Now at end of input.
  142. Reducing stack by rule 1 (line 96):
  143. $1 = nterm assignments (:1.1: )
  144. $2 = nterm exp (:1.1: 49)
  145. -> $$ = nterm unit (:1.1: )
  146. Stack now 0
  147. Entering state 1
  148. Now at end of input.
  149. Shifting token "end of file" (:1.1: )
  150. Entering state 3
  151. Cleanup: popping token "end of file" (:1.1: )
  152. Cleanup: popping nterm unit (:1.1: )
  153. result: 49
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement