Advertisement
Guest User

Untitled

a guest
Feb 5th, 2011
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 106.79 KB | None | 0 0
  1. State 74 conflicts: 1 shift/reduce
  2.  
  3.  
  4. Grammar
  5.  
  6. 0 $accept: Program $end
  7.  
  8. 1 Program: DeclList
  9.  
  10. 2 DeclList: DeclList Decl
  11. 3 | Decl
  12.  
  13. 4 Decl: VariableDecl
  14. 5 | FunctionDecl
  15. 6 | ClassDecl
  16. 7 | InterfaceDecl
  17.  
  18. 8 VariableDecl: Variable ';'
  19.  
  20. 9 Variable: Type T_Identifier
  21.  
  22. 10 VariableList: VariableList ',' Variable
  23. 11 | Variable
  24.  
  25. 12 Type: T_Int
  26. 13 | T_Double
  27. 14 | T_Bool
  28. 15 | T_String
  29. 16 | T_Identifier
  30. 17 | Type T_Dims
  31.  
  32. 18 Epsilon: /* empty */
  33.  
  34. 19 FunctionDecl: Type T_Identifier '(' Formals ')' StmtBlock
  35. 20 | T_Void T_Identifier '(' Formals ')' StmtBlock
  36.  
  37. 21 Formals: VariableList
  38. 22 | Epsilon
  39.  
  40. 23 ClassDecl: T_Class T_Identifier T_Extends T_Identifier T_Implements IdentifierList '{' FieldList '}'
  41. 24 | T_Class T_Identifier '{' FieldList '}'
  42. 25 | T_Class T_Identifier T_Extends T_Identifier '{' FieldList '}'
  43. 26 | T_Class T_Identifier T_Implements IdentifierList '{' FieldList '}'
  44.  
  45. 27 IdentifierList: IdentifierList ',' T_Identifier
  46. 28 | T_Identifier
  47.  
  48. 29 Field: VariableDecl
  49. 30 | FunctionDecl
  50.  
  51. 31 FieldList: FieldList Field
  52. 32 | Field
  53.  
  54. 33 InterfaceDecl: T_Interface T_Identifier '{' PrototypeList '}'
  55.  
  56. 34 Prototype: Type T_Identifier '(' Formals ')' ';'
  57. 35 | T_Void T_Identifier '(' Formals ')' ';'
  58.  
  59. 36 PrototypeList: PrototypeList Prototype
  60. 37 | Prototype
  61.  
  62. 38 StmtBlock: '{' VariableDeclList StmtList '}'
  63.  
  64. 39 VariableDeclList: VariableDeclList VariableDecl
  65. 40 | Epsilon
  66.  
  67. 41 Stmt: Expr ';'
  68. 42 | ';'
  69. 43 | IfStmt
  70. 44 | WhileStmt
  71. 45 | ForStmt
  72. 46 | BreakStmt
  73. 47 | ReturnStmt
  74. 48 | PrintStmt
  75. 49 | StmtBlock
  76.  
  77. 50 StmtList: StmtList Stmt
  78. 51 | Epsilon
  79.  
  80. 52 IfStmt: T_If '(' Expr ')' Stmt
  81. 53 | T_If '(' Expr ')' Stmt T_Else Stmt
  82.  
  83. 54 WhileStmt: T_While '(' Expr ')' Stmt
  84.  
  85. 55 ForStmt: T_For '(' Expr ';' Expr ';' Expr ')' Stmt
  86. 56 | T_For '(' ';' Expr ';' ')' Stmt
  87. 57 | T_For '(' Expr ';' Expr ';' ')' Stmt
  88. 58 | T_For '(' ';' Expr ';' Expr ')' Stmt
  89.  
  90. 59 ReturnStmt: T_Return Expr ';'
  91. 60 | T_Return ';'
  92.  
  93. 61 BreakStmt: T_Break ';'
  94.  
  95. 62 PrintStmt: T_Print '(' ExprList ')' ';'
  96.  
  97. 63 Expr: LValue '=' Expr
  98. 64 | Constant
  99. 65 | LValue
  100. 66 | T_This
  101. 67 | Call
  102. 68 | '(' Expr ')'
  103. 69 | Expr '+' Expr
  104. 70 | Expr '-' Expr
  105. 71 | Expr '*' Expr
  106. 72 | Expr '/' Expr
  107. 73 | Expr '%' Expr
  108. 74 | '-' Expr
  109. 75 | Expr '<' Expr
  110. 76 | Expr T_LessEqual Expr
  111. 77 | Expr '>' Expr
  112. 78 | Expr T_GreaterEqual Expr
  113. 79 | Expr T_Equal Expr
  114. 80 | Expr T_NotEqual Expr
  115. 81 | Expr T_And Expr
  116. 82 | Expr T_Or Expr
  117. 83 | '!' Expr
  118. 84 | T_ReadInteger '(' ')'
  119. 85 | T_ReadLine '(' ')'
  120. 86 | T_New '(' T_Identifier ')'
  121. 87 | T_NewArray '(' Expr ',' Type ')'
  122.  
  123. 88 ExprList: ExprList ',' Expr
  124. 89 | Expr
  125.  
  126. 90 LValue: T_Identifier
  127. 91 | Expr '.' T_Identifier
  128. 92 | Expr '[' Expr ']'
  129.  
  130. 93 Call: T_Identifier '(' Actuals ')'
  131. 94 | Expr '.' T_Identifier '(' Actuals ')'
  132.  
  133. 95 Actuals: ExprList
  134. 96 | Epsilon
  135.  
  136. 97 Constant: T_IntConstant
  137. 98 | T_DoubleConstant
  138. 99 | T_BoolConstant
  139. 100 | T_StringConstant
  140. 101 | T_Null
  141.  
  142.  
  143. Terminals, with rules where they appear
  144.  
  145. $end (0) 0
  146. '!' (33) 83
  147. '%' (37) 73
  148. '(' (40) 19 20 34 35 52 53 54 55 56 57 58 62 68 84 85 86 87 93 94
  149. ')' (41) 19 20 34 35 52 53 54 55 56 57 58 62 68 84 85 86 87 93 94
  150. '*' (42) 71
  151. '+' (43) 69
  152. ',' (44) 10 27 87 88
  153. '-' (45) 70 74
  154. '.' (46) 91 94
  155. '/' (47) 72
  156. ';' (59) 8 34 35 41 42 55 56 57 58 59 60 61 62
  157. '<' (60) 75
  158. '=' (61) 63
  159. '>' (62) 77
  160. '[' (91) 92
  161. ']' (93) 92
  162. '{' (123) 23 24 25 26 33 38
  163. '}' (125) 23 24 25 26 33 38
  164. error (256)
  165. T_Void (258) 20 35
  166. T_Bool (259) 14
  167. T_Int (260) 12
  168. T_Double (261) 13
  169. T_String (262) 15
  170. T_Class (263) 23 24 25 26
  171. T_LessEqual (264) 76
  172. T_GreaterEqual (265) 78
  173. T_Equal (266) 79
  174. T_NotEqual (267) 80
  175. T_Dims (268) 17
  176. T_And (269) 81
  177. T_Or (270) 82
  178. T_Null (271) 101
  179. T_Extends (272) 23 25
  180. T_This (273) 66
  181. T_Interface (274) 33
  182. T_Implements (275) 23 26
  183. T_While (276) 54
  184. T_For (277) 55 56 57 58
  185. T_If (278) 52 53
  186. T_Else (279) 53
  187. T_Return (280) 59 60
  188. T_Break (281) 61
  189. T_New (282) 86
  190. T_NewArray (283) 87
  191. T_Print (284) 62
  192. T_ReadInteger (285) 84
  193. T_ReadLine (286) 85
  194. T_Identifier (287) 9 16 19 20 23 24 25 26 27 28 33 34 35 86 90 91 93
  195. 94
  196. T_StringConstant (288) 100
  197. T_IntConstant (289) 97
  198. T_DoubleConstant (290) 98
  199. T_BoolConstant (291) 99
  200. LOWER_THAN_ELSE (292)
  201.  
  202.  
  203. Nonterminals, with rules where they appear
  204.  
  205. $accept (56)
  206. on left: 0
  207. Program (57)
  208. on left: 1, on right: 0
  209. DeclList (58)
  210. on left: 2 3, on right: 1 2
  211. Decl (59)
  212. on left: 4 5 6 7, on right: 2 3
  213. VariableDecl (60)
  214. on left: 8, on right: 4 29 39
  215. Variable (61)
  216. on left: 9, on right: 8 10 11
  217. VariableList (62)
  218. on left: 10 11, on right: 10 21
  219. Type (63)
  220. on left: 12 13 14 15 16 17, on right: 9 17 19 34 87
  221. Epsilon (64)
  222. on left: 18, on right: 22 40 51 96
  223. FunctionDecl (65)
  224. on left: 19 20, on right: 5 30
  225. Formals (66)
  226. on left: 21 22, on right: 19 20 34 35
  227. ClassDecl (67)
  228. on left: 23 24 25 26, on right: 6
  229. IdentifierList (68)
  230. on left: 27 28, on right: 23 26 27
  231. Field (69)
  232. on left: 29 30, on right: 31 32
  233. FieldList (70)
  234. on left: 31 32, on right: 23 24 25 26 31
  235. InterfaceDecl (71)
  236. on left: 33, on right: 7
  237. Prototype (72)
  238. on left: 34 35, on right: 36 37
  239. PrototypeList (73)
  240. on left: 36 37, on right: 33 36
  241. StmtBlock (74)
  242. on left: 38, on right: 19 20 49
  243. VariableDeclList (75)
  244. on left: 39 40, on right: 38 39
  245. Stmt (76)
  246. on left: 41 42 43 44 45 46 47 48 49, on right: 50 52 53 54 55 56
  247. 57 58
  248. StmtList (77)
  249. on left: 50 51, on right: 38 50
  250. IfStmt (78)
  251. on left: 52 53, on right: 43
  252. WhileStmt (79)
  253. on left: 54, on right: 44
  254. ForStmt (80)
  255. on left: 55 56 57 58, on right: 45
  256. ReturnStmt (81)
  257. on left: 59 60, on right: 47
  258. BreakStmt (82)
  259. on left: 61, on right: 46
  260. PrintStmt (83)
  261. on left: 62, on right: 48
  262. Expr (84)
  263. on left: 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
  264. 81 82 83 84 85 86 87, on right: 41 52 53 54 55 56 57 58 59 63 68
  265. 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 87 88 89 91 92 94
  266. ExprList (85)
  267. on left: 88 89, on right: 62 88 95
  268. LValue (86)
  269. on left: 90 91 92, on right: 63 65
  270. Call (87)
  271. on left: 93 94, on right: 67
  272. Actuals (88)
  273. on left: 95 96, on right: 93 94
  274. Constant (89)
  275. on left: 97 98 99 100 101, on right: 64
  276.  
  277.  
  278. state 0
  279.  
  280. 0 $accept: . Program $end
  281.  
  282. T_Void shift, and go to state 1
  283. T_Bool shift, and go to state 2
  284. T_Int shift, and go to state 3
  285. T_Double shift, and go to state 4
  286. T_String shift, and go to state 5
  287. T_Class shift, and go to state 6
  288. T_Interface shift, and go to state 7
  289. T_Identifier shift, and go to state 8
  290.  
  291. Program go to state 9
  292. DeclList go to state 10
  293. Decl go to state 11
  294. VariableDecl go to state 12
  295. Variable go to state 13
  296. Type go to state 14
  297. FunctionDecl go to state 15
  298. ClassDecl go to state 16
  299. InterfaceDecl go to state 17
  300.  
  301.  
  302. state 1
  303.  
  304. 20 FunctionDecl: T_Void . T_Identifier '(' Formals ')' StmtBlock
  305.  
  306. T_Identifier shift, and go to state 18
  307.  
  308.  
  309. state 2
  310.  
  311. 14 Type: T_Bool .
  312.  
  313. $default reduce using rule 14 (Type)
  314.  
  315.  
  316. state 3
  317.  
  318. 12 Type: T_Int .
  319.  
  320. $default reduce using rule 12 (Type)
  321.  
  322.  
  323. state 4
  324.  
  325. 13 Type: T_Double .
  326.  
  327. $default reduce using rule 13 (Type)
  328.  
  329.  
  330. state 5
  331.  
  332. 15 Type: T_String .
  333.  
  334. $default reduce using rule 15 (Type)
  335.  
  336.  
  337. state 6
  338.  
  339. 23 ClassDecl: T_Class . T_Identifier T_Extends T_Identifier T_Implements IdentifierList '{' FieldList '}'
  340. 24 | T_Class . T_Identifier '{' FieldList '}'
  341. 25 | T_Class . T_Identifier T_Extends T_Identifier '{' FieldList '}'
  342. 26 | T_Class . T_Identifier T_Implements IdentifierList '{' FieldList '}'
  343.  
  344. T_Identifier shift, and go to state 19
  345.  
  346.  
  347. state 7
  348.  
  349. 33 InterfaceDecl: T_Interface . T_Identifier '{' PrototypeList '}'
  350.  
  351. T_Identifier shift, and go to state 20
  352.  
  353.  
  354. state 8
  355.  
  356. 16 Type: T_Identifier .
  357.  
  358. $default reduce using rule 16 (Type)
  359.  
  360.  
  361. state 9
  362.  
  363. 0 $accept: Program . $end
  364.  
  365. $end shift, and go to state 21
  366.  
  367.  
  368. state 10
  369.  
  370. 1 Program: DeclList .
  371. 2 DeclList: DeclList . Decl
  372.  
  373. T_Void shift, and go to state 1
  374. T_Bool shift, and go to state 2
  375. T_Int shift, and go to state 3
  376. T_Double shift, and go to state 4
  377. T_String shift, and go to state 5
  378. T_Class shift, and go to state 6
  379. T_Interface shift, and go to state 7
  380. T_Identifier shift, and go to state 8
  381.  
  382. $default reduce using rule 1 (Program)
  383.  
  384. Decl go to state 22
  385. VariableDecl go to state 12
  386. Variable go to state 13
  387. Type go to state 14
  388. FunctionDecl go to state 15
  389. ClassDecl go to state 16
  390. InterfaceDecl go to state 17
  391.  
  392.  
  393. state 11
  394.  
  395. 3 DeclList: Decl .
  396.  
  397. $default reduce using rule 3 (DeclList)
  398.  
  399.  
  400. state 12
  401.  
  402. 4 Decl: VariableDecl .
  403.  
  404. $default reduce using rule 4 (Decl)
  405.  
  406.  
  407. state 13
  408.  
  409. 8 VariableDecl: Variable . ';'
  410.  
  411. ';' shift, and go to state 23
  412.  
  413.  
  414. state 14
  415.  
  416. 9 Variable: Type . T_Identifier
  417. 17 Type: Type . T_Dims
  418. 19 FunctionDecl: Type . T_Identifier '(' Formals ')' StmtBlock
  419.  
  420. T_Dims shift, and go to state 24
  421. T_Identifier shift, and go to state 25
  422.  
  423.  
  424. state 15
  425.  
  426. 5 Decl: FunctionDecl .
  427.  
  428. $default reduce using rule 5 (Decl)
  429.  
  430.  
  431. state 16
  432.  
  433. 6 Decl: ClassDecl .
  434.  
  435. $default reduce using rule 6 (Decl)
  436.  
  437.  
  438. state 17
  439.  
  440. 7 Decl: InterfaceDecl .
  441.  
  442. $default reduce using rule 7 (Decl)
  443.  
  444.  
  445. state 18
  446.  
  447. 20 FunctionDecl: T_Void T_Identifier . '(' Formals ')' StmtBlock
  448.  
  449. '(' shift, and go to state 26
  450.  
  451.  
  452. state 19
  453.  
  454. 23 ClassDecl: T_Class T_Identifier . T_Extends T_Identifier T_Implements IdentifierList '{' FieldList '}'
  455. 24 | T_Class T_Identifier . '{' FieldList '}'
  456. 25 | T_Class T_Identifier . T_Extends T_Identifier '{' FieldList '}'
  457. 26 | T_Class T_Identifier . T_Implements IdentifierList '{' FieldList '}'
  458.  
  459. T_Extends shift, and go to state 27
  460. T_Implements shift, and go to state 28
  461. '{' shift, and go to state 29
  462.  
  463.  
  464. state 20
  465.  
  466. 33 InterfaceDecl: T_Interface T_Identifier . '{' PrototypeList '}'
  467.  
  468. '{' shift, and go to state 30
  469.  
  470.  
  471. state 21
  472.  
  473. 0 $accept: Program $end .
  474.  
  475. $default accept
  476.  
  477.  
  478. state 22
  479.  
  480. 2 DeclList: DeclList Decl .
  481.  
  482. $default reduce using rule 2 (DeclList)
  483.  
  484.  
  485. state 23
  486.  
  487. 8 VariableDecl: Variable ';' .
  488.  
  489. $default reduce using rule 8 (VariableDecl)
  490.  
  491.  
  492. state 24
  493.  
  494. 17 Type: Type T_Dims .
  495.  
  496. $default reduce using rule 17 (Type)
  497.  
  498.  
  499. state 25
  500.  
  501. 9 Variable: Type T_Identifier .
  502. 19 FunctionDecl: Type T_Identifier . '(' Formals ')' StmtBlock
  503.  
  504. '(' shift, and go to state 31
  505.  
  506. $default reduce using rule 9 (Variable)
  507.  
  508.  
  509. state 26
  510.  
  511. 20 FunctionDecl: T_Void T_Identifier '(' . Formals ')' StmtBlock
  512.  
  513. T_Bool shift, and go to state 2
  514. T_Int shift, and go to state 3
  515. T_Double shift, and go to state 4
  516. T_String shift, and go to state 5
  517. T_Identifier shift, and go to state 8
  518.  
  519. $default reduce using rule 18 (Epsilon)
  520.  
  521. Variable go to state 32
  522. VariableList go to state 33
  523. Type go to state 34
  524. Epsilon go to state 35
  525. Formals go to state 36
  526.  
  527.  
  528. state 27
  529.  
  530. 23 ClassDecl: T_Class T_Identifier T_Extends . T_Identifier T_Implements IdentifierList '{' FieldList '}'
  531. 25 | T_Class T_Identifier T_Extends . T_Identifier '{' FieldList '}'
  532.  
  533. T_Identifier shift, and go to state 37
  534.  
  535.  
  536. state 28
  537.  
  538. 26 ClassDecl: T_Class T_Identifier T_Implements . IdentifierList '{' FieldList '}'
  539.  
  540. T_Identifier shift, and go to state 38
  541.  
  542. IdentifierList go to state 39
  543.  
  544.  
  545. state 29
  546.  
  547. 24 ClassDecl: T_Class T_Identifier '{' . FieldList '}'
  548.  
  549. T_Void shift, and go to state 1
  550. T_Bool shift, and go to state 2
  551. T_Int shift, and go to state 3
  552. T_Double shift, and go to state 4
  553. T_String shift, and go to state 5
  554. T_Identifier shift, and go to state 8
  555.  
  556. VariableDecl go to state 40
  557. Variable go to state 13
  558. Type go to state 14
  559. FunctionDecl go to state 41
  560. Field go to state 42
  561. FieldList go to state 43
  562.  
  563.  
  564. state 30
  565.  
  566. 33 InterfaceDecl: T_Interface T_Identifier '{' . PrototypeList '}'
  567.  
  568. T_Void shift, and go to state 44
  569. T_Bool shift, and go to state 2
  570. T_Int shift, and go to state 3
  571. T_Double shift, and go to state 4
  572. T_String shift, and go to state 5
  573. T_Identifier shift, and go to state 8
  574.  
  575. Type go to state 45
  576. Prototype go to state 46
  577. PrototypeList go to state 47
  578.  
  579.  
  580. state 31
  581.  
  582. 19 FunctionDecl: Type T_Identifier '(' . Formals ')' StmtBlock
  583.  
  584. T_Bool shift, and go to state 2
  585. T_Int shift, and go to state 3
  586. T_Double shift, and go to state 4
  587. T_String shift, and go to state 5
  588. T_Identifier shift, and go to state 8
  589.  
  590. $default reduce using rule 18 (Epsilon)
  591.  
  592. Variable go to state 32
  593. VariableList go to state 33
  594. Type go to state 34
  595. Epsilon go to state 35
  596. Formals go to state 48
  597.  
  598.  
  599. state 32
  600.  
  601. 11 VariableList: Variable .
  602.  
  603. $default reduce using rule 11 (VariableList)
  604.  
  605.  
  606. state 33
  607.  
  608. 10 VariableList: VariableList . ',' Variable
  609. 21 Formals: VariableList .
  610.  
  611. ',' shift, and go to state 49
  612.  
  613. $default reduce using rule 21 (Formals)
  614.  
  615.  
  616. state 34
  617.  
  618. 9 Variable: Type . T_Identifier
  619. 17 Type: Type . T_Dims
  620.  
  621. T_Dims shift, and go to state 24
  622. T_Identifier shift, and go to state 50
  623.  
  624.  
  625. state 35
  626.  
  627. 22 Formals: Epsilon .
  628.  
  629. $default reduce using rule 22 (Formals)
  630.  
  631.  
  632. state 36
  633.  
  634. 20 FunctionDecl: T_Void T_Identifier '(' Formals . ')' StmtBlock
  635.  
  636. ')' shift, and go to state 51
  637.  
  638.  
  639. state 37
  640.  
  641. 23 ClassDecl: T_Class T_Identifier T_Extends T_Identifier . T_Implements IdentifierList '{' FieldList '}'
  642. 25 | T_Class T_Identifier T_Extends T_Identifier . '{' FieldList '}'
  643.  
  644. T_Implements shift, and go to state 52
  645. '{' shift, and go to state 53
  646.  
  647.  
  648. state 38
  649.  
  650. 28 IdentifierList: T_Identifier .
  651.  
  652. $default reduce using rule 28 (IdentifierList)
  653.  
  654.  
  655. state 39
  656.  
  657. 26 ClassDecl: T_Class T_Identifier T_Implements IdentifierList . '{' FieldList '}'
  658. 27 IdentifierList: IdentifierList . ',' T_Identifier
  659.  
  660. ',' shift, and go to state 54
  661. '{' shift, and go to state 55
  662.  
  663.  
  664. state 40
  665.  
  666. 29 Field: VariableDecl .
  667.  
  668. $default reduce using rule 29 (Field)
  669.  
  670.  
  671. state 41
  672.  
  673. 30 Field: FunctionDecl .
  674.  
  675. $default reduce using rule 30 (Field)
  676.  
  677.  
  678. state 42
  679.  
  680. 32 FieldList: Field .
  681.  
  682. $default reduce using rule 32 (FieldList)
  683.  
  684.  
  685. state 43
  686.  
  687. 24 ClassDecl: T_Class T_Identifier '{' FieldList . '}'
  688. 31 FieldList: FieldList . Field
  689.  
  690. T_Void shift, and go to state 1
  691. T_Bool shift, and go to state 2
  692. T_Int shift, and go to state 3
  693. T_Double shift, and go to state 4
  694. T_String shift, and go to state 5
  695. T_Identifier shift, and go to state 8
  696. '}' shift, and go to state 56
  697.  
  698. VariableDecl go to state 40
  699. Variable go to state 13
  700. Type go to state 14
  701. FunctionDecl go to state 41
  702. Field go to state 57
  703.  
  704.  
  705. state 44
  706.  
  707. 35 Prototype: T_Void . T_Identifier '(' Formals ')' ';'
  708.  
  709. T_Identifier shift, and go to state 58
  710.  
  711.  
  712. state 45
  713.  
  714. 17 Type: Type . T_Dims
  715. 34 Prototype: Type . T_Identifier '(' Formals ')' ';'
  716.  
  717. T_Dims shift, and go to state 24
  718. T_Identifier shift, and go to state 59
  719.  
  720.  
  721. state 46
  722.  
  723. 37 PrototypeList: Prototype .
  724.  
  725. $default reduce using rule 37 (PrototypeList)
  726.  
  727.  
  728. state 47
  729.  
  730. 33 InterfaceDecl: T_Interface T_Identifier '{' PrototypeList . '}'
  731. 36 PrototypeList: PrototypeList . Prototype
  732.  
  733. T_Void shift, and go to state 44
  734. T_Bool shift, and go to state 2
  735. T_Int shift, and go to state 3
  736. T_Double shift, and go to state 4
  737. T_String shift, and go to state 5
  738. T_Identifier shift, and go to state 8
  739. '}' shift, and go to state 60
  740.  
  741. Type go to state 45
  742. Prototype go to state 61
  743.  
  744.  
  745. state 48
  746.  
  747. 19 FunctionDecl: Type T_Identifier '(' Formals . ')' StmtBlock
  748.  
  749. ')' shift, and go to state 62
  750.  
  751.  
  752. state 49
  753.  
  754. 10 VariableList: VariableList ',' . Variable
  755.  
  756. T_Bool shift, and go to state 2
  757. T_Int shift, and go to state 3
  758. T_Double shift, and go to state 4
  759. T_String shift, and go to state 5
  760. T_Identifier shift, and go to state 8
  761.  
  762. Variable go to state 63
  763. Type go to state 34
  764.  
  765.  
  766. state 50
  767.  
  768. 9 Variable: Type T_Identifier .
  769.  
  770. $default reduce using rule 9 (Variable)
  771.  
  772.  
  773. state 51
  774.  
  775. 20 FunctionDecl: T_Void T_Identifier '(' Formals ')' . StmtBlock
  776.  
  777. '{' shift, and go to state 64
  778.  
  779. StmtBlock go to state 65
  780.  
  781.  
  782. state 52
  783.  
  784. 23 ClassDecl: T_Class T_Identifier T_Extends T_Identifier T_Implements . IdentifierList '{' FieldList '}'
  785.  
  786. T_Identifier shift, and go to state 38
  787.  
  788. IdentifierList go to state 66
  789.  
  790.  
  791. state 53
  792.  
  793. 25 ClassDecl: T_Class T_Identifier T_Extends T_Identifier '{' . FieldList '}'
  794.  
  795. T_Void shift, and go to state 1
  796. T_Bool shift, and go to state 2
  797. T_Int shift, and go to state 3
  798. T_Double shift, and go to state 4
  799. T_String shift, and go to state 5
  800. T_Identifier shift, and go to state 8
  801.  
  802. VariableDecl go to state 40
  803. Variable go to state 13
  804. Type go to state 14
  805. FunctionDecl go to state 41
  806. Field go to state 42
  807. FieldList go to state 67
  808.  
  809.  
  810. state 54
  811.  
  812. 27 IdentifierList: IdentifierList ',' . T_Identifier
  813.  
  814. T_Identifier shift, and go to state 68
  815.  
  816.  
  817. state 55
  818.  
  819. 26 ClassDecl: T_Class T_Identifier T_Implements IdentifierList '{' . FieldList '}'
  820.  
  821. T_Void shift, and go to state 1
  822. T_Bool shift, and go to state 2
  823. T_Int shift, and go to state 3
  824. T_Double shift, and go to state 4
  825. T_String shift, and go to state 5
  826. T_Identifier shift, and go to state 8
  827.  
  828. VariableDecl go to state 40
  829. Variable go to state 13
  830. Type go to state 14
  831. FunctionDecl go to state 41
  832. Field go to state 42
  833. FieldList go to state 69
  834.  
  835.  
  836. state 56
  837.  
  838. 24 ClassDecl: T_Class T_Identifier '{' FieldList '}' .
  839.  
  840. $default reduce using rule 24 (ClassDecl)
  841.  
  842.  
  843. state 57
  844.  
  845. 31 FieldList: FieldList Field .
  846.  
  847. $default reduce using rule 31 (FieldList)
  848.  
  849.  
  850. state 58
  851.  
  852. 35 Prototype: T_Void T_Identifier . '(' Formals ')' ';'
  853.  
  854. '(' shift, and go to state 70
  855.  
  856.  
  857. state 59
  858.  
  859. 34 Prototype: Type T_Identifier . '(' Formals ')' ';'
  860.  
  861. '(' shift, and go to state 71
  862.  
  863.  
  864. state 60
  865.  
  866. 33 InterfaceDecl: T_Interface T_Identifier '{' PrototypeList '}' .
  867.  
  868. $default reduce using rule 33 (InterfaceDecl)
  869.  
  870.  
  871. state 61
  872.  
  873. 36 PrototypeList: PrototypeList Prototype .
  874.  
  875. $default reduce using rule 36 (PrototypeList)
  876.  
  877.  
  878. state 62
  879.  
  880. 19 FunctionDecl: Type T_Identifier '(' Formals ')' . StmtBlock
  881.  
  882. '{' shift, and go to state 64
  883.  
  884. StmtBlock go to state 72
  885.  
  886.  
  887. state 63
  888.  
  889. 10 VariableList: VariableList ',' Variable .
  890.  
  891. $default reduce using rule 10 (VariableList)
  892.  
  893.  
  894. state 64
  895.  
  896. 38 StmtBlock: '{' . VariableDeclList StmtList '}'
  897.  
  898. $default reduce using rule 18 (Epsilon)
  899.  
  900. Epsilon go to state 73
  901. VariableDeclList go to state 74
  902.  
  903.  
  904. state 65
  905.  
  906. 20 FunctionDecl: T_Void T_Identifier '(' Formals ')' StmtBlock .
  907.  
  908. $default reduce using rule 20 (FunctionDecl)
  909.  
  910.  
  911. state 66
  912.  
  913. 23 ClassDecl: T_Class T_Identifier T_Extends T_Identifier T_Implements IdentifierList . '{' FieldList '}'
  914. 27 IdentifierList: IdentifierList . ',' T_Identifier
  915.  
  916. ',' shift, and go to state 54
  917. '{' shift, and go to state 75
  918.  
  919.  
  920. state 67
  921.  
  922. 25 ClassDecl: T_Class T_Identifier T_Extends T_Identifier '{' FieldList . '}'
  923. 31 FieldList: FieldList . Field
  924.  
  925. T_Void shift, and go to state 1
  926. T_Bool shift, and go to state 2
  927. T_Int shift, and go to state 3
  928. T_Double shift, and go to state 4
  929. T_String shift, and go to state 5
  930. T_Identifier shift, and go to state 8
  931. '}' shift, and go to state 76
  932.  
  933. VariableDecl go to state 40
  934. Variable go to state 13
  935. Type go to state 14
  936. FunctionDecl go to state 41
  937. Field go to state 57
  938.  
  939.  
  940. state 68
  941.  
  942. 27 IdentifierList: IdentifierList ',' T_Identifier .
  943.  
  944. $default reduce using rule 27 (IdentifierList)
  945.  
  946.  
  947. state 69
  948.  
  949. 26 ClassDecl: T_Class T_Identifier T_Implements IdentifierList '{' FieldList . '}'
  950. 31 FieldList: FieldList . Field
  951.  
  952. T_Void shift, and go to state 1
  953. T_Bool shift, and go to state 2
  954. T_Int shift, and go to state 3
  955. T_Double shift, and go to state 4
  956. T_String shift, and go to state 5
  957. T_Identifier shift, and go to state 8
  958. '}' shift, and go to state 77
  959.  
  960. VariableDecl go to state 40
  961. Variable go to state 13
  962. Type go to state 14
  963. FunctionDecl go to state 41
  964. Field go to state 57
  965.  
  966.  
  967. state 70
  968.  
  969. 35 Prototype: T_Void T_Identifier '(' . Formals ')' ';'
  970.  
  971. T_Bool shift, and go to state 2
  972. T_Int shift, and go to state 3
  973. T_Double shift, and go to state 4
  974. T_String shift, and go to state 5
  975. T_Identifier shift, and go to state 8
  976.  
  977. $default reduce using rule 18 (Epsilon)
  978.  
  979. Variable go to state 32
  980. VariableList go to state 33
  981. Type go to state 34
  982. Epsilon go to state 35
  983. Formals go to state 78
  984.  
  985.  
  986. state 71
  987.  
  988. 34 Prototype: Type T_Identifier '(' . Formals ')' ';'
  989.  
  990. T_Bool shift, and go to state 2
  991. T_Int shift, and go to state 3
  992. T_Double shift, and go to state 4
  993. T_String shift, and go to state 5
  994. T_Identifier shift, and go to state 8
  995.  
  996. $default reduce using rule 18 (Epsilon)
  997.  
  998. Variable go to state 32
  999. VariableList go to state 33
  1000. Type go to state 34
  1001. Epsilon go to state 35
  1002. Formals go to state 79
  1003.  
  1004.  
  1005. state 72
  1006.  
  1007. 19 FunctionDecl: Type T_Identifier '(' Formals ')' StmtBlock .
  1008.  
  1009. $default reduce using rule 19 (FunctionDecl)
  1010.  
  1011.  
  1012. state 73
  1013.  
  1014. 40 VariableDeclList: Epsilon .
  1015.  
  1016. $default reduce using rule 40 (VariableDeclList)
  1017.  
  1018.  
  1019. state 74
  1020.  
  1021. 38 StmtBlock: '{' VariableDeclList . StmtList '}'
  1022. 39 VariableDeclList: VariableDeclList . VariableDecl
  1023.  
  1024. T_Bool shift, and go to state 2
  1025. T_Int shift, and go to state 3
  1026. T_Double shift, and go to state 4
  1027. T_String shift, and go to state 5
  1028. T_Identifier shift, and go to state 8
  1029.  
  1030. T_Identifier [reduce using rule 18 (Epsilon)]
  1031. $default reduce using rule 18 (Epsilon)
  1032.  
  1033. VariableDecl go to state 80
  1034. Variable go to state 13
  1035. Type go to state 34
  1036. Epsilon go to state 81
  1037. StmtList go to state 82
  1038.  
  1039.  
  1040. state 75
  1041.  
  1042. 23 ClassDecl: T_Class T_Identifier T_Extends T_Identifier T_Implements IdentifierList '{' . FieldList '}'
  1043.  
  1044. T_Void shift, and go to state 1
  1045. T_Bool shift, and go to state 2
  1046. T_Int shift, and go to state 3
  1047. T_Double shift, and go to state 4
  1048. T_String shift, and go to state 5
  1049. T_Identifier shift, and go to state 8
  1050.  
  1051. VariableDecl go to state 40
  1052. Variable go to state 13
  1053. Type go to state 14
  1054. FunctionDecl go to state 41
  1055. Field go to state 42
  1056. FieldList go to state 83
  1057.  
  1058.  
  1059. state 76
  1060.  
  1061. 25 ClassDecl: T_Class T_Identifier T_Extends T_Identifier '{' FieldList '}' .
  1062.  
  1063. $default reduce using rule 25 (ClassDecl)
  1064.  
  1065.  
  1066. state 77
  1067.  
  1068. 26 ClassDecl: T_Class T_Identifier T_Implements IdentifierList '{' FieldList '}' .
  1069.  
  1070. $default reduce using rule 26 (ClassDecl)
  1071.  
  1072.  
  1073. state 78
  1074.  
  1075. 35 Prototype: T_Void T_Identifier '(' Formals . ')' ';'
  1076.  
  1077. ')' shift, and go to state 84
  1078.  
  1079.  
  1080. state 79
  1081.  
  1082. 34 Prototype: Type T_Identifier '(' Formals . ')' ';'
  1083.  
  1084. ')' shift, and go to state 85
  1085.  
  1086.  
  1087. state 80
  1088.  
  1089. 39 VariableDeclList: VariableDeclList VariableDecl .
  1090.  
  1091. $default reduce using rule 39 (VariableDeclList)
  1092.  
  1093.  
  1094. state 81
  1095.  
  1096. 51 StmtList: Epsilon .
  1097.  
  1098. $default reduce using rule 51 (StmtList)
  1099.  
  1100.  
  1101. state 82
  1102.  
  1103. 38 StmtBlock: '{' VariableDeclList StmtList . '}'
  1104. 50 StmtList: StmtList . Stmt
  1105.  
  1106. T_Null shift, and go to state 86
  1107. T_This shift, and go to state 87
  1108. T_While shift, and go to state 88
  1109. T_For shift, and go to state 89
  1110. T_If shift, and go to state 90
  1111. T_Return shift, and go to state 91
  1112. T_Break shift, and go to state 92
  1113. T_New shift, and go to state 93
  1114. T_NewArray shift, and go to state 94
  1115. T_Print shift, and go to state 95
  1116. T_ReadInteger shift, and go to state 96
  1117. T_ReadLine shift, and go to state 97
  1118. T_Identifier shift, and go to state 98
  1119. T_StringConstant shift, and go to state 99
  1120. T_IntConstant shift, and go to state 100
  1121. T_DoubleConstant shift, and go to state 101
  1122. T_BoolConstant shift, and go to state 102
  1123. '-' shift, and go to state 103
  1124. '!' shift, and go to state 104
  1125. ';' shift, and go to state 105
  1126. '(' shift, and go to state 106
  1127. '{' shift, and go to state 64
  1128. '}' shift, and go to state 107
  1129.  
  1130. StmtBlock go to state 108
  1131. Stmt go to state 109
  1132. IfStmt go to state 110
  1133. WhileStmt go to state 111
  1134. ForStmt go to state 112
  1135. ReturnStmt go to state 113
  1136. BreakStmt go to state 114
  1137. PrintStmt go to state 115
  1138. Expr go to state 116
  1139. LValue go to state 117
  1140. Call go to state 118
  1141. Constant go to state 119
  1142.  
  1143.  
  1144. state 83
  1145.  
  1146. 23 ClassDecl: T_Class T_Identifier T_Extends T_Identifier T_Implements IdentifierList '{' FieldList . '}'
  1147. 31 FieldList: FieldList . Field
  1148.  
  1149. T_Void shift, and go to state 1
  1150. T_Bool shift, and go to state 2
  1151. T_Int shift, and go to state 3
  1152. T_Double shift, and go to state 4
  1153. T_String shift, and go to state 5
  1154. T_Identifier shift, and go to state 8
  1155. '}' shift, and go to state 120
  1156.  
  1157. VariableDecl go to state 40
  1158. Variable go to state 13
  1159. Type go to state 14
  1160. FunctionDecl go to state 41
  1161. Field go to state 57
  1162.  
  1163.  
  1164. state 84
  1165.  
  1166. 35 Prototype: T_Void T_Identifier '(' Formals ')' . ';'
  1167.  
  1168. ';' shift, and go to state 121
  1169.  
  1170.  
  1171. state 85
  1172.  
  1173. 34 Prototype: Type T_Identifier '(' Formals ')' . ';'
  1174.  
  1175. ';' shift, and go to state 122
  1176.  
  1177.  
  1178. state 86
  1179.  
  1180. 101 Constant: T_Null .
  1181.  
  1182. $default reduce using rule 101 (Constant)
  1183.  
  1184.  
  1185. state 87
  1186.  
  1187. 66 Expr: T_This .
  1188.  
  1189. $default reduce using rule 66 (Expr)
  1190.  
  1191.  
  1192. state 88
  1193.  
  1194. 54 WhileStmt: T_While . '(' Expr ')' Stmt
  1195.  
  1196. '(' shift, and go to state 123
  1197.  
  1198.  
  1199. state 89
  1200.  
  1201. 55 ForStmt: T_For . '(' Expr ';' Expr ';' Expr ')' Stmt
  1202. 56 | T_For . '(' ';' Expr ';' ')' Stmt
  1203. 57 | T_For . '(' Expr ';' Expr ';' ')' Stmt
  1204. 58 | T_For . '(' ';' Expr ';' Expr ')' Stmt
  1205.  
  1206. '(' shift, and go to state 124
  1207.  
  1208.  
  1209. state 90
  1210.  
  1211. 52 IfStmt: T_If . '(' Expr ')' Stmt
  1212. 53 | T_If . '(' Expr ')' Stmt T_Else Stmt
  1213.  
  1214. '(' shift, and go to state 125
  1215.  
  1216.  
  1217. state 91
  1218.  
  1219. 59 ReturnStmt: T_Return . Expr ';'
  1220. 60 | T_Return . ';'
  1221.  
  1222. T_Null shift, and go to state 86
  1223. T_This shift, and go to state 87
  1224. T_New shift, and go to state 93
  1225. T_NewArray shift, and go to state 94
  1226. T_ReadInteger shift, and go to state 96
  1227. T_ReadLine shift, and go to state 97
  1228. T_Identifier shift, and go to state 98
  1229. T_StringConstant shift, and go to state 99
  1230. T_IntConstant shift, and go to state 100
  1231. T_DoubleConstant shift, and go to state 101
  1232. T_BoolConstant shift, and go to state 102
  1233. '-' shift, and go to state 103
  1234. '!' shift, and go to state 104
  1235. ';' shift, and go to state 126
  1236. '(' shift, and go to state 106
  1237.  
  1238. Expr go to state 127
  1239. LValue go to state 117
  1240. Call go to state 118
  1241. Constant go to state 119
  1242.  
  1243.  
  1244. state 92
  1245.  
  1246. 61 BreakStmt: T_Break . ';'
  1247.  
  1248. ';' shift, and go to state 128
  1249.  
  1250.  
  1251. state 93
  1252.  
  1253. 86 Expr: T_New . '(' T_Identifier ')'
  1254.  
  1255. '(' shift, and go to state 129
  1256.  
  1257.  
  1258. state 94
  1259.  
  1260. 87 Expr: T_NewArray . '(' Expr ',' Type ')'
  1261.  
  1262. '(' shift, and go to state 130
  1263.  
  1264.  
  1265. state 95
  1266.  
  1267. 62 PrintStmt: T_Print . '(' ExprList ')' ';'
  1268.  
  1269. '(' shift, and go to state 131
  1270.  
  1271.  
  1272. state 96
  1273.  
  1274. 84 Expr: T_ReadInteger . '(' ')'
  1275.  
  1276. '(' shift, and go to state 132
  1277.  
  1278.  
  1279. state 97
  1280.  
  1281. 85 Expr: T_ReadLine . '(' ')'
  1282.  
  1283. '(' shift, and go to state 133
  1284.  
  1285.  
  1286. state 98
  1287.  
  1288. 90 LValue: T_Identifier .
  1289. 93 Call: T_Identifier . '(' Actuals ')'
  1290.  
  1291. '(' shift, and go to state 134
  1292.  
  1293. $default reduce using rule 90 (LValue)
  1294.  
  1295.  
  1296. state 99
  1297.  
  1298. 100 Constant: T_StringConstant .
  1299.  
  1300. $default reduce using rule 100 (Constant)
  1301.  
  1302.  
  1303. state 100
  1304.  
  1305. 97 Constant: T_IntConstant .
  1306.  
  1307. $default reduce using rule 97 (Constant)
  1308.  
  1309.  
  1310. state 101
  1311.  
  1312. 98 Constant: T_DoubleConstant .
  1313.  
  1314. $default reduce using rule 98 (Constant)
  1315.  
  1316.  
  1317. state 102
  1318.  
  1319. 99 Constant: T_BoolConstant .
  1320.  
  1321. $default reduce using rule 99 (Constant)
  1322.  
  1323.  
  1324. state 103
  1325.  
  1326. 74 Expr: '-' . Expr
  1327.  
  1328. T_Null shift, and go to state 86
  1329. T_This shift, and go to state 87
  1330. T_New shift, and go to state 93
  1331. T_NewArray shift, and go to state 94
  1332. T_ReadInteger shift, and go to state 96
  1333. T_ReadLine shift, and go to state 97
  1334. T_Identifier shift, and go to state 98
  1335. T_StringConstant shift, and go to state 99
  1336. T_IntConstant shift, and go to state 100
  1337. T_DoubleConstant shift, and go to state 101
  1338. T_BoolConstant shift, and go to state 102
  1339. '-' shift, and go to state 103
  1340. '!' shift, and go to state 104
  1341. '(' shift, and go to state 106
  1342.  
  1343. Expr go to state 135
  1344. LValue go to state 117
  1345. Call go to state 118
  1346. Constant go to state 119
  1347.  
  1348.  
  1349. state 104
  1350.  
  1351. 83 Expr: '!' . Expr
  1352.  
  1353. T_Null shift, and go to state 86
  1354. T_This shift, and go to state 87
  1355. T_New shift, and go to state 93
  1356. T_NewArray shift, and go to state 94
  1357. T_ReadInteger shift, and go to state 96
  1358. T_ReadLine shift, and go to state 97
  1359. T_Identifier shift, and go to state 98
  1360. T_StringConstant shift, and go to state 99
  1361. T_IntConstant shift, and go to state 100
  1362. T_DoubleConstant shift, and go to state 101
  1363. T_BoolConstant shift, and go to state 102
  1364. '-' shift, and go to state 103
  1365. '!' shift, and go to state 104
  1366. '(' shift, and go to state 106
  1367.  
  1368. Expr go to state 136
  1369. LValue go to state 117
  1370. Call go to state 118
  1371. Constant go to state 119
  1372.  
  1373.  
  1374. state 105
  1375.  
  1376. 42 Stmt: ';' .
  1377.  
  1378. $default reduce using rule 42 (Stmt)
  1379.  
  1380.  
  1381. state 106
  1382.  
  1383. 68 Expr: '(' . Expr ')'
  1384.  
  1385. T_Null shift, and go to state 86
  1386. T_This shift, and go to state 87
  1387. T_New shift, and go to state 93
  1388. T_NewArray shift, and go to state 94
  1389. T_ReadInteger shift, and go to state 96
  1390. T_ReadLine shift, and go to state 97
  1391. T_Identifier shift, and go to state 98
  1392. T_StringConstant shift, and go to state 99
  1393. T_IntConstant shift, and go to state 100
  1394. T_DoubleConstant shift, and go to state 101
  1395. T_BoolConstant shift, and go to state 102
  1396. '-' shift, and go to state 103
  1397. '!' shift, and go to state 104
  1398. '(' shift, and go to state 106
  1399.  
  1400. Expr go to state 137
  1401. LValue go to state 117
  1402. Call go to state 118
  1403. Constant go to state 119
  1404.  
  1405.  
  1406. state 107
  1407.  
  1408. 38 StmtBlock: '{' VariableDeclList StmtList '}' .
  1409.  
  1410. $default reduce using rule 38 (StmtBlock)
  1411.  
  1412.  
  1413. state 108
  1414.  
  1415. 49 Stmt: StmtBlock .
  1416.  
  1417. $default reduce using rule 49 (Stmt)
  1418.  
  1419.  
  1420. state 109
  1421.  
  1422. 50 StmtList: StmtList Stmt .
  1423.  
  1424. $default reduce using rule 50 (StmtList)
  1425.  
  1426.  
  1427. state 110
  1428.  
  1429. 43 Stmt: IfStmt .
  1430.  
  1431. $default reduce using rule 43 (Stmt)
  1432.  
  1433.  
  1434. state 111
  1435.  
  1436. 44 Stmt: WhileStmt .
  1437.  
  1438. $default reduce using rule 44 (Stmt)
  1439.  
  1440.  
  1441. state 112
  1442.  
  1443. 45 Stmt: ForStmt .
  1444.  
  1445. $default reduce using rule 45 (Stmt)
  1446.  
  1447.  
  1448. state 113
  1449.  
  1450. 47 Stmt: ReturnStmt .
  1451.  
  1452. $default reduce using rule 47 (Stmt)
  1453.  
  1454.  
  1455. state 114
  1456.  
  1457. 46 Stmt: BreakStmt .
  1458.  
  1459. $default reduce using rule 46 (Stmt)
  1460.  
  1461.  
  1462. state 115
  1463.  
  1464. 48 Stmt: PrintStmt .
  1465.  
  1466. $default reduce using rule 48 (Stmt)
  1467.  
  1468.  
  1469. state 116
  1470.  
  1471. 41 Stmt: Expr . ';'
  1472. 69 Expr: Expr . '+' Expr
  1473. 70 | Expr . '-' Expr
  1474. 71 | Expr . '*' Expr
  1475. 72 | Expr . '/' Expr
  1476. 73 | Expr . '%' Expr
  1477. 75 | Expr . '<' Expr
  1478. 76 | Expr . T_LessEqual Expr
  1479. 77 | Expr . '>' Expr
  1480. 78 | Expr . T_GreaterEqual Expr
  1481. 79 | Expr . T_Equal Expr
  1482. 80 | Expr . T_NotEqual Expr
  1483. 81 | Expr . T_And Expr
  1484. 82 | Expr . T_Or Expr
  1485. 91 LValue: Expr . '.' T_Identifier
  1486. 92 | Expr . '[' Expr ']'
  1487. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  1488.  
  1489. T_LessEqual shift, and go to state 138
  1490. T_GreaterEqual shift, and go to state 139
  1491. T_Equal shift, and go to state 140
  1492. T_NotEqual shift, and go to state 141
  1493. T_And shift, and go to state 142
  1494. T_Or shift, and go to state 143
  1495. '<' shift, and go to state 144
  1496. '>' shift, and go to state 145
  1497. '+' shift, and go to state 146
  1498. '-' shift, and go to state 147
  1499. '*' shift, and go to state 148
  1500. '/' shift, and go to state 149
  1501. '%' shift, and go to state 150
  1502. '[' shift, and go to state 151
  1503. '.' shift, and go to state 152
  1504. ';' shift, and go to state 153
  1505.  
  1506.  
  1507. state 117
  1508.  
  1509. 63 Expr: LValue . '=' Expr
  1510. 65 | LValue .
  1511.  
  1512. '=' shift, and go to state 154
  1513.  
  1514. $default reduce using rule 65 (Expr)
  1515.  
  1516.  
  1517. state 118
  1518.  
  1519. 67 Expr: Call .
  1520.  
  1521. $default reduce using rule 67 (Expr)
  1522.  
  1523.  
  1524. state 119
  1525.  
  1526. 64 Expr: Constant .
  1527.  
  1528. $default reduce using rule 64 (Expr)
  1529.  
  1530.  
  1531. state 120
  1532.  
  1533. 23 ClassDecl: T_Class T_Identifier T_Extends T_Identifier T_Implements IdentifierList '{' FieldList '}' .
  1534.  
  1535. $default reduce using rule 23 (ClassDecl)
  1536.  
  1537.  
  1538. state 121
  1539.  
  1540. 35 Prototype: T_Void T_Identifier '(' Formals ')' ';' .
  1541.  
  1542. $default reduce using rule 35 (Prototype)
  1543.  
  1544.  
  1545. state 122
  1546.  
  1547. 34 Prototype: Type T_Identifier '(' Formals ')' ';' .
  1548.  
  1549. $default reduce using rule 34 (Prototype)
  1550.  
  1551.  
  1552. state 123
  1553.  
  1554. 54 WhileStmt: T_While '(' . Expr ')' Stmt
  1555.  
  1556. T_Null shift, and go to state 86
  1557. T_This shift, and go to state 87
  1558. T_New shift, and go to state 93
  1559. T_NewArray shift, and go to state 94
  1560. T_ReadInteger shift, and go to state 96
  1561. T_ReadLine shift, and go to state 97
  1562. T_Identifier shift, and go to state 98
  1563. T_StringConstant shift, and go to state 99
  1564. T_IntConstant shift, and go to state 100
  1565. T_DoubleConstant shift, and go to state 101
  1566. T_BoolConstant shift, and go to state 102
  1567. '-' shift, and go to state 103
  1568. '!' shift, and go to state 104
  1569. '(' shift, and go to state 106
  1570.  
  1571. Expr go to state 155
  1572. LValue go to state 117
  1573. Call go to state 118
  1574. Constant go to state 119
  1575.  
  1576.  
  1577. state 124
  1578.  
  1579. 55 ForStmt: T_For '(' . Expr ';' Expr ';' Expr ')' Stmt
  1580. 56 | T_For '(' . ';' Expr ';' ')' Stmt
  1581. 57 | T_For '(' . Expr ';' Expr ';' ')' Stmt
  1582. 58 | T_For '(' . ';' Expr ';' Expr ')' Stmt
  1583.  
  1584. T_Null shift, and go to state 86
  1585. T_This shift, and go to state 87
  1586. T_New shift, and go to state 93
  1587. T_NewArray shift, and go to state 94
  1588. T_ReadInteger shift, and go to state 96
  1589. T_ReadLine shift, and go to state 97
  1590. T_Identifier shift, and go to state 98
  1591. T_StringConstant shift, and go to state 99
  1592. T_IntConstant shift, and go to state 100
  1593. T_DoubleConstant shift, and go to state 101
  1594. T_BoolConstant shift, and go to state 102
  1595. '-' shift, and go to state 103
  1596. '!' shift, and go to state 104
  1597. ';' shift, and go to state 156
  1598. '(' shift, and go to state 106
  1599.  
  1600. Expr go to state 157
  1601. LValue go to state 117
  1602. Call go to state 118
  1603. Constant go to state 119
  1604.  
  1605.  
  1606. state 125
  1607.  
  1608. 52 IfStmt: T_If '(' . Expr ')' Stmt
  1609. 53 | T_If '(' . Expr ')' Stmt T_Else Stmt
  1610.  
  1611. T_Null shift, and go to state 86
  1612. T_This shift, and go to state 87
  1613. T_New shift, and go to state 93
  1614. T_NewArray shift, and go to state 94
  1615. T_ReadInteger shift, and go to state 96
  1616. T_ReadLine shift, and go to state 97
  1617. T_Identifier shift, and go to state 98
  1618. T_StringConstant shift, and go to state 99
  1619. T_IntConstant shift, and go to state 100
  1620. T_DoubleConstant shift, and go to state 101
  1621. T_BoolConstant shift, and go to state 102
  1622. '-' shift, and go to state 103
  1623. '!' shift, and go to state 104
  1624. '(' shift, and go to state 106
  1625.  
  1626. Expr go to state 158
  1627. LValue go to state 117
  1628. Call go to state 118
  1629. Constant go to state 119
  1630.  
  1631.  
  1632. state 126
  1633.  
  1634. 60 ReturnStmt: T_Return ';' .
  1635.  
  1636. $default reduce using rule 60 (ReturnStmt)
  1637.  
  1638.  
  1639. state 127
  1640.  
  1641. 59 ReturnStmt: T_Return Expr . ';'
  1642. 69 Expr: Expr . '+' Expr
  1643. 70 | Expr . '-' Expr
  1644. 71 | Expr . '*' Expr
  1645. 72 | Expr . '/' Expr
  1646. 73 | Expr . '%' Expr
  1647. 75 | Expr . '<' Expr
  1648. 76 | Expr . T_LessEqual Expr
  1649. 77 | Expr . '>' Expr
  1650. 78 | Expr . T_GreaterEqual Expr
  1651. 79 | Expr . T_Equal Expr
  1652. 80 | Expr . T_NotEqual Expr
  1653. 81 | Expr . T_And Expr
  1654. 82 | Expr . T_Or Expr
  1655. 91 LValue: Expr . '.' T_Identifier
  1656. 92 | Expr . '[' Expr ']'
  1657. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  1658.  
  1659. T_LessEqual shift, and go to state 138
  1660. T_GreaterEqual shift, and go to state 139
  1661. T_Equal shift, and go to state 140
  1662. T_NotEqual shift, and go to state 141
  1663. T_And shift, and go to state 142
  1664. T_Or shift, and go to state 143
  1665. '<' shift, and go to state 144
  1666. '>' shift, and go to state 145
  1667. '+' shift, and go to state 146
  1668. '-' shift, and go to state 147
  1669. '*' shift, and go to state 148
  1670. '/' shift, and go to state 149
  1671. '%' shift, and go to state 150
  1672. '[' shift, and go to state 151
  1673. '.' shift, and go to state 152
  1674. ';' shift, and go to state 159
  1675.  
  1676.  
  1677. state 128
  1678.  
  1679. 61 BreakStmt: T_Break ';' .
  1680.  
  1681. $default reduce using rule 61 (BreakStmt)
  1682.  
  1683.  
  1684. state 129
  1685.  
  1686. 86 Expr: T_New '(' . T_Identifier ')'
  1687.  
  1688. T_Identifier shift, and go to state 160
  1689.  
  1690.  
  1691. state 130
  1692.  
  1693. 87 Expr: T_NewArray '(' . Expr ',' Type ')'
  1694.  
  1695. T_Null shift, and go to state 86
  1696. T_This shift, and go to state 87
  1697. T_New shift, and go to state 93
  1698. T_NewArray shift, and go to state 94
  1699. T_ReadInteger shift, and go to state 96
  1700. T_ReadLine shift, and go to state 97
  1701. T_Identifier shift, and go to state 98
  1702. T_StringConstant shift, and go to state 99
  1703. T_IntConstant shift, and go to state 100
  1704. T_DoubleConstant shift, and go to state 101
  1705. T_BoolConstant shift, and go to state 102
  1706. '-' shift, and go to state 103
  1707. '!' shift, and go to state 104
  1708. '(' shift, and go to state 106
  1709.  
  1710. Expr go to state 161
  1711. LValue go to state 117
  1712. Call go to state 118
  1713. Constant go to state 119
  1714.  
  1715.  
  1716. state 131
  1717.  
  1718. 62 PrintStmt: T_Print '(' . ExprList ')' ';'
  1719.  
  1720. T_Null shift, and go to state 86
  1721. T_This shift, and go to state 87
  1722. T_New shift, and go to state 93
  1723. T_NewArray shift, and go to state 94
  1724. T_ReadInteger shift, and go to state 96
  1725. T_ReadLine shift, and go to state 97
  1726. T_Identifier shift, and go to state 98
  1727. T_StringConstant shift, and go to state 99
  1728. T_IntConstant shift, and go to state 100
  1729. T_DoubleConstant shift, and go to state 101
  1730. T_BoolConstant shift, and go to state 102
  1731. '-' shift, and go to state 103
  1732. '!' shift, and go to state 104
  1733. '(' shift, and go to state 106
  1734.  
  1735. Expr go to state 162
  1736. ExprList go to state 163
  1737. LValue go to state 117
  1738. Call go to state 118
  1739. Constant go to state 119
  1740.  
  1741.  
  1742. state 132
  1743.  
  1744. 84 Expr: T_ReadInteger '(' . ')'
  1745.  
  1746. ')' shift, and go to state 164
  1747.  
  1748.  
  1749. state 133
  1750.  
  1751. 85 Expr: T_ReadLine '(' . ')'
  1752.  
  1753. ')' shift, and go to state 165
  1754.  
  1755.  
  1756. state 134
  1757.  
  1758. 93 Call: T_Identifier '(' . Actuals ')'
  1759.  
  1760. T_Null shift, and go to state 86
  1761. T_This shift, and go to state 87
  1762. T_New shift, and go to state 93
  1763. T_NewArray shift, and go to state 94
  1764. T_ReadInteger shift, and go to state 96
  1765. T_ReadLine shift, and go to state 97
  1766. T_Identifier shift, and go to state 98
  1767. T_StringConstant shift, and go to state 99
  1768. T_IntConstant shift, and go to state 100
  1769. T_DoubleConstant shift, and go to state 101
  1770. T_BoolConstant shift, and go to state 102
  1771. '-' shift, and go to state 103
  1772. '!' shift, and go to state 104
  1773. '(' shift, and go to state 106
  1774.  
  1775. $default reduce using rule 18 (Epsilon)
  1776.  
  1777. Epsilon go to state 166
  1778. Expr go to state 162
  1779. ExprList go to state 167
  1780. LValue go to state 117
  1781. Call go to state 118
  1782. Actuals go to state 168
  1783. Constant go to state 119
  1784.  
  1785.  
  1786. state 135
  1787.  
  1788. 69 Expr: Expr . '+' Expr
  1789. 70 | Expr . '-' Expr
  1790. 71 | Expr . '*' Expr
  1791. 72 | Expr . '/' Expr
  1792. 73 | Expr . '%' Expr
  1793. 74 | '-' Expr .
  1794. 75 | Expr . '<' Expr
  1795. 76 | Expr . T_LessEqual Expr
  1796. 77 | Expr . '>' Expr
  1797. 78 | Expr . T_GreaterEqual Expr
  1798. 79 | Expr . T_Equal Expr
  1799. 80 | Expr . T_NotEqual Expr
  1800. 81 | Expr . T_And Expr
  1801. 82 | Expr . T_Or Expr
  1802. 91 LValue: Expr . '.' T_Identifier
  1803. 92 | Expr . '[' Expr ']'
  1804. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  1805.  
  1806. '*' shift, and go to state 148
  1807. '/' shift, and go to state 149
  1808. '%' shift, and go to state 150
  1809. '[' shift, and go to state 151
  1810. '.' shift, and go to state 152
  1811.  
  1812. $default reduce using rule 74 (Expr)
  1813.  
  1814.  
  1815. state 136
  1816.  
  1817. 69 Expr: Expr . '+' Expr
  1818. 70 | Expr . '-' Expr
  1819. 71 | Expr . '*' Expr
  1820. 72 | Expr . '/' Expr
  1821. 73 | Expr . '%' Expr
  1822. 75 | Expr . '<' Expr
  1823. 76 | Expr . T_LessEqual Expr
  1824. 77 | Expr . '>' Expr
  1825. 78 | Expr . T_GreaterEqual Expr
  1826. 79 | Expr . T_Equal Expr
  1827. 80 | Expr . T_NotEqual Expr
  1828. 81 | Expr . T_And Expr
  1829. 82 | Expr . T_Or Expr
  1830. 83 | '!' Expr .
  1831. 91 LValue: Expr . '.' T_Identifier
  1832. 92 | Expr . '[' Expr ']'
  1833. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  1834.  
  1835. '[' shift, and go to state 151
  1836. '.' shift, and go to state 152
  1837.  
  1838. $default reduce using rule 83 (Expr)
  1839.  
  1840.  
  1841. state 137
  1842.  
  1843. 68 Expr: '(' Expr . ')'
  1844. 69 | Expr . '+' Expr
  1845. 70 | Expr . '-' Expr
  1846. 71 | Expr . '*' Expr
  1847. 72 | Expr . '/' Expr
  1848. 73 | Expr . '%' Expr
  1849. 75 | Expr . '<' Expr
  1850. 76 | Expr . T_LessEqual Expr
  1851. 77 | Expr . '>' Expr
  1852. 78 | Expr . T_GreaterEqual Expr
  1853. 79 | Expr . T_Equal Expr
  1854. 80 | Expr . T_NotEqual Expr
  1855. 81 | Expr . T_And Expr
  1856. 82 | Expr . T_Or Expr
  1857. 91 LValue: Expr . '.' T_Identifier
  1858. 92 | Expr . '[' Expr ']'
  1859. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  1860.  
  1861. T_LessEqual shift, and go to state 138
  1862. T_GreaterEqual shift, and go to state 139
  1863. T_Equal shift, and go to state 140
  1864. T_NotEqual shift, and go to state 141
  1865. T_And shift, and go to state 142
  1866. T_Or shift, and go to state 143
  1867. '<' shift, and go to state 144
  1868. '>' shift, and go to state 145
  1869. '+' shift, and go to state 146
  1870. '-' shift, and go to state 147
  1871. '*' shift, and go to state 148
  1872. '/' shift, and go to state 149
  1873. '%' shift, and go to state 150
  1874. '[' shift, and go to state 151
  1875. '.' shift, and go to state 152
  1876. ')' shift, and go to state 169
  1877.  
  1878.  
  1879. state 138
  1880.  
  1881. 76 Expr: Expr T_LessEqual . Expr
  1882.  
  1883. T_Null shift, and go to state 86
  1884. T_This shift, and go to state 87
  1885. T_New shift, and go to state 93
  1886. T_NewArray shift, and go to state 94
  1887. T_ReadInteger shift, and go to state 96
  1888. T_ReadLine shift, and go to state 97
  1889. T_Identifier shift, and go to state 98
  1890. T_StringConstant shift, and go to state 99
  1891. T_IntConstant shift, and go to state 100
  1892. T_DoubleConstant shift, and go to state 101
  1893. T_BoolConstant shift, and go to state 102
  1894. '-' shift, and go to state 103
  1895. '!' shift, and go to state 104
  1896. '(' shift, and go to state 106
  1897.  
  1898. Expr go to state 170
  1899. LValue go to state 117
  1900. Call go to state 118
  1901. Constant go to state 119
  1902.  
  1903.  
  1904. state 139
  1905.  
  1906. 78 Expr: Expr T_GreaterEqual . Expr
  1907.  
  1908. T_Null shift, and go to state 86
  1909. T_This shift, and go to state 87
  1910. T_New shift, and go to state 93
  1911. T_NewArray shift, and go to state 94
  1912. T_ReadInteger shift, and go to state 96
  1913. T_ReadLine shift, and go to state 97
  1914. T_Identifier shift, and go to state 98
  1915. T_StringConstant shift, and go to state 99
  1916. T_IntConstant shift, and go to state 100
  1917. T_DoubleConstant shift, and go to state 101
  1918. T_BoolConstant shift, and go to state 102
  1919. '-' shift, and go to state 103
  1920. '!' shift, and go to state 104
  1921. '(' shift, and go to state 106
  1922.  
  1923. Expr go to state 171
  1924. LValue go to state 117
  1925. Call go to state 118
  1926. Constant go to state 119
  1927.  
  1928.  
  1929. state 140
  1930.  
  1931. 79 Expr: Expr T_Equal . Expr
  1932.  
  1933. T_Null shift, and go to state 86
  1934. T_This shift, and go to state 87
  1935. T_New shift, and go to state 93
  1936. T_NewArray shift, and go to state 94
  1937. T_ReadInteger shift, and go to state 96
  1938. T_ReadLine shift, and go to state 97
  1939. T_Identifier shift, and go to state 98
  1940. T_StringConstant shift, and go to state 99
  1941. T_IntConstant shift, and go to state 100
  1942. T_DoubleConstant shift, and go to state 101
  1943. T_BoolConstant shift, and go to state 102
  1944. '-' shift, and go to state 103
  1945. '!' shift, and go to state 104
  1946. '(' shift, and go to state 106
  1947.  
  1948. Expr go to state 172
  1949. LValue go to state 117
  1950. Call go to state 118
  1951. Constant go to state 119
  1952.  
  1953.  
  1954. state 141
  1955.  
  1956. 80 Expr: Expr T_NotEqual . Expr
  1957.  
  1958. T_Null shift, and go to state 86
  1959. T_This shift, and go to state 87
  1960. T_New shift, and go to state 93
  1961. T_NewArray shift, and go to state 94
  1962. T_ReadInteger shift, and go to state 96
  1963. T_ReadLine shift, and go to state 97
  1964. T_Identifier shift, and go to state 98
  1965. T_StringConstant shift, and go to state 99
  1966. T_IntConstant shift, and go to state 100
  1967. T_DoubleConstant shift, and go to state 101
  1968. T_BoolConstant shift, and go to state 102
  1969. '-' shift, and go to state 103
  1970. '!' shift, and go to state 104
  1971. '(' shift, and go to state 106
  1972.  
  1973. Expr go to state 173
  1974. LValue go to state 117
  1975. Call go to state 118
  1976. Constant go to state 119
  1977.  
  1978.  
  1979. state 142
  1980.  
  1981. 81 Expr: Expr T_And . Expr
  1982.  
  1983. T_Null shift, and go to state 86
  1984. T_This shift, and go to state 87
  1985. T_New shift, and go to state 93
  1986. T_NewArray shift, and go to state 94
  1987. T_ReadInteger shift, and go to state 96
  1988. T_ReadLine shift, and go to state 97
  1989. T_Identifier shift, and go to state 98
  1990. T_StringConstant shift, and go to state 99
  1991. T_IntConstant shift, and go to state 100
  1992. T_DoubleConstant shift, and go to state 101
  1993. T_BoolConstant shift, and go to state 102
  1994. '-' shift, and go to state 103
  1995. '!' shift, and go to state 104
  1996. '(' shift, and go to state 106
  1997.  
  1998. Expr go to state 174
  1999. LValue go to state 117
  2000. Call go to state 118
  2001. Constant go to state 119
  2002.  
  2003.  
  2004. state 143
  2005.  
  2006. 82 Expr: Expr T_Or . Expr
  2007.  
  2008. T_Null shift, and go to state 86
  2009. T_This shift, and go to state 87
  2010. T_New shift, and go to state 93
  2011. T_NewArray shift, and go to state 94
  2012. T_ReadInteger shift, and go to state 96
  2013. T_ReadLine shift, and go to state 97
  2014. T_Identifier shift, and go to state 98
  2015. T_StringConstant shift, and go to state 99
  2016. T_IntConstant shift, and go to state 100
  2017. T_DoubleConstant shift, and go to state 101
  2018. T_BoolConstant shift, and go to state 102
  2019. '-' shift, and go to state 103
  2020. '!' shift, and go to state 104
  2021. '(' shift, and go to state 106
  2022.  
  2023. Expr go to state 175
  2024. LValue go to state 117
  2025. Call go to state 118
  2026. Constant go to state 119
  2027.  
  2028.  
  2029. state 144
  2030.  
  2031. 75 Expr: Expr '<' . Expr
  2032.  
  2033. T_Null shift, and go to state 86
  2034. T_This shift, and go to state 87
  2035. T_New shift, and go to state 93
  2036. T_NewArray shift, and go to state 94
  2037. T_ReadInteger shift, and go to state 96
  2038. T_ReadLine shift, and go to state 97
  2039. T_Identifier shift, and go to state 98
  2040. T_StringConstant shift, and go to state 99
  2041. T_IntConstant shift, and go to state 100
  2042. T_DoubleConstant shift, and go to state 101
  2043. T_BoolConstant shift, and go to state 102
  2044. '-' shift, and go to state 103
  2045. '!' shift, and go to state 104
  2046. '(' shift, and go to state 106
  2047.  
  2048. Expr go to state 176
  2049. LValue go to state 117
  2050. Call go to state 118
  2051. Constant go to state 119
  2052.  
  2053.  
  2054. state 145
  2055.  
  2056. 77 Expr: Expr '>' . Expr
  2057.  
  2058. T_Null shift, and go to state 86
  2059. T_This shift, and go to state 87
  2060. T_New shift, and go to state 93
  2061. T_NewArray shift, and go to state 94
  2062. T_ReadInteger shift, and go to state 96
  2063. T_ReadLine shift, and go to state 97
  2064. T_Identifier shift, and go to state 98
  2065. T_StringConstant shift, and go to state 99
  2066. T_IntConstant shift, and go to state 100
  2067. T_DoubleConstant shift, and go to state 101
  2068. T_BoolConstant shift, and go to state 102
  2069. '-' shift, and go to state 103
  2070. '!' shift, and go to state 104
  2071. '(' shift, and go to state 106
  2072.  
  2073. Expr go to state 177
  2074. LValue go to state 117
  2075. Call go to state 118
  2076. Constant go to state 119
  2077.  
  2078.  
  2079. state 146
  2080.  
  2081. 69 Expr: Expr '+' . Expr
  2082.  
  2083. T_Null shift, and go to state 86
  2084. T_This shift, and go to state 87
  2085. T_New shift, and go to state 93
  2086. T_NewArray shift, and go to state 94
  2087. T_ReadInteger shift, and go to state 96
  2088. T_ReadLine shift, and go to state 97
  2089. T_Identifier shift, and go to state 98
  2090. T_StringConstant shift, and go to state 99
  2091. T_IntConstant shift, and go to state 100
  2092. T_DoubleConstant shift, and go to state 101
  2093. T_BoolConstant shift, and go to state 102
  2094. '-' shift, and go to state 103
  2095. '!' shift, and go to state 104
  2096. '(' shift, and go to state 106
  2097.  
  2098. Expr go to state 178
  2099. LValue go to state 117
  2100. Call go to state 118
  2101. Constant go to state 119
  2102.  
  2103.  
  2104. state 147
  2105.  
  2106. 70 Expr: Expr '-' . Expr
  2107.  
  2108. T_Null shift, and go to state 86
  2109. T_This shift, and go to state 87
  2110. T_New shift, and go to state 93
  2111. T_NewArray shift, and go to state 94
  2112. T_ReadInteger shift, and go to state 96
  2113. T_ReadLine shift, and go to state 97
  2114. T_Identifier shift, and go to state 98
  2115. T_StringConstant shift, and go to state 99
  2116. T_IntConstant shift, and go to state 100
  2117. T_DoubleConstant shift, and go to state 101
  2118. T_BoolConstant shift, and go to state 102
  2119. '-' shift, and go to state 103
  2120. '!' shift, and go to state 104
  2121. '(' shift, and go to state 106
  2122.  
  2123. Expr go to state 179
  2124. LValue go to state 117
  2125. Call go to state 118
  2126. Constant go to state 119
  2127.  
  2128.  
  2129. state 148
  2130.  
  2131. 71 Expr: Expr '*' . Expr
  2132.  
  2133. T_Null shift, and go to state 86
  2134. T_This shift, and go to state 87
  2135. T_New shift, and go to state 93
  2136. T_NewArray shift, and go to state 94
  2137. T_ReadInteger shift, and go to state 96
  2138. T_ReadLine shift, and go to state 97
  2139. T_Identifier shift, and go to state 98
  2140. T_StringConstant shift, and go to state 99
  2141. T_IntConstant shift, and go to state 100
  2142. T_DoubleConstant shift, and go to state 101
  2143. T_BoolConstant shift, and go to state 102
  2144. '-' shift, and go to state 103
  2145. '!' shift, and go to state 104
  2146. '(' shift, and go to state 106
  2147.  
  2148. Expr go to state 180
  2149. LValue go to state 117
  2150. Call go to state 118
  2151. Constant go to state 119
  2152.  
  2153.  
  2154. state 149
  2155.  
  2156. 72 Expr: Expr '/' . Expr
  2157.  
  2158. T_Null shift, and go to state 86
  2159. T_This shift, and go to state 87
  2160. T_New shift, and go to state 93
  2161. T_NewArray shift, and go to state 94
  2162. T_ReadInteger shift, and go to state 96
  2163. T_ReadLine shift, and go to state 97
  2164. T_Identifier shift, and go to state 98
  2165. T_StringConstant shift, and go to state 99
  2166. T_IntConstant shift, and go to state 100
  2167. T_DoubleConstant shift, and go to state 101
  2168. T_BoolConstant shift, and go to state 102
  2169. '-' shift, and go to state 103
  2170. '!' shift, and go to state 104
  2171. '(' shift, and go to state 106
  2172.  
  2173. Expr go to state 181
  2174. LValue go to state 117
  2175. Call go to state 118
  2176. Constant go to state 119
  2177.  
  2178.  
  2179. state 150
  2180.  
  2181. 73 Expr: Expr '%' . Expr
  2182.  
  2183. T_Null shift, and go to state 86
  2184. T_This shift, and go to state 87
  2185. T_New shift, and go to state 93
  2186. T_NewArray shift, and go to state 94
  2187. T_ReadInteger shift, and go to state 96
  2188. T_ReadLine shift, and go to state 97
  2189. T_Identifier shift, and go to state 98
  2190. T_StringConstant shift, and go to state 99
  2191. T_IntConstant shift, and go to state 100
  2192. T_DoubleConstant shift, and go to state 101
  2193. T_BoolConstant shift, and go to state 102
  2194. '-' shift, and go to state 103
  2195. '!' shift, and go to state 104
  2196. '(' shift, and go to state 106
  2197.  
  2198. Expr go to state 182
  2199. LValue go to state 117
  2200. Call go to state 118
  2201. Constant go to state 119
  2202.  
  2203.  
  2204. state 151
  2205.  
  2206. 92 LValue: Expr '[' . Expr ']'
  2207.  
  2208. T_Null shift, and go to state 86
  2209. T_This shift, and go to state 87
  2210. T_New shift, and go to state 93
  2211. T_NewArray shift, and go to state 94
  2212. T_ReadInteger shift, and go to state 96
  2213. T_ReadLine shift, and go to state 97
  2214. T_Identifier shift, and go to state 98
  2215. T_StringConstant shift, and go to state 99
  2216. T_IntConstant shift, and go to state 100
  2217. T_DoubleConstant shift, and go to state 101
  2218. T_BoolConstant shift, and go to state 102
  2219. '-' shift, and go to state 103
  2220. '!' shift, and go to state 104
  2221. '(' shift, and go to state 106
  2222.  
  2223. Expr go to state 183
  2224. LValue go to state 117
  2225. Call go to state 118
  2226. Constant go to state 119
  2227.  
  2228.  
  2229. state 152
  2230.  
  2231. 91 LValue: Expr '.' . T_Identifier
  2232. 94 Call: Expr '.' . T_Identifier '(' Actuals ')'
  2233.  
  2234. T_Identifier shift, and go to state 184
  2235.  
  2236.  
  2237. state 153
  2238.  
  2239. 41 Stmt: Expr ';' .
  2240.  
  2241. $default reduce using rule 41 (Stmt)
  2242.  
  2243.  
  2244. state 154
  2245.  
  2246. 63 Expr: LValue '=' . Expr
  2247.  
  2248. T_Null shift, and go to state 86
  2249. T_This shift, and go to state 87
  2250. T_New shift, and go to state 93
  2251. T_NewArray shift, and go to state 94
  2252. T_ReadInteger shift, and go to state 96
  2253. T_ReadLine shift, and go to state 97
  2254. T_Identifier shift, and go to state 98
  2255. T_StringConstant shift, and go to state 99
  2256. T_IntConstant shift, and go to state 100
  2257. T_DoubleConstant shift, and go to state 101
  2258. T_BoolConstant shift, and go to state 102
  2259. '-' shift, and go to state 103
  2260. '!' shift, and go to state 104
  2261. '(' shift, and go to state 106
  2262.  
  2263. Expr go to state 185
  2264. LValue go to state 117
  2265. Call go to state 118
  2266. Constant go to state 119
  2267.  
  2268.  
  2269. state 155
  2270.  
  2271. 54 WhileStmt: T_While '(' Expr . ')' Stmt
  2272. 69 Expr: Expr . '+' Expr
  2273. 70 | Expr . '-' Expr
  2274. 71 | Expr . '*' Expr
  2275. 72 | Expr . '/' Expr
  2276. 73 | Expr . '%' Expr
  2277. 75 | Expr . '<' Expr
  2278. 76 | Expr . T_LessEqual Expr
  2279. 77 | Expr . '>' Expr
  2280. 78 | Expr . T_GreaterEqual Expr
  2281. 79 | Expr . T_Equal Expr
  2282. 80 | Expr . T_NotEqual Expr
  2283. 81 | Expr . T_And Expr
  2284. 82 | Expr . T_Or Expr
  2285. 91 LValue: Expr . '.' T_Identifier
  2286. 92 | Expr . '[' Expr ']'
  2287. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2288.  
  2289. T_LessEqual shift, and go to state 138
  2290. T_GreaterEqual shift, and go to state 139
  2291. T_Equal shift, and go to state 140
  2292. T_NotEqual shift, and go to state 141
  2293. T_And shift, and go to state 142
  2294. T_Or shift, and go to state 143
  2295. '<' shift, and go to state 144
  2296. '>' shift, and go to state 145
  2297. '+' shift, and go to state 146
  2298. '-' shift, and go to state 147
  2299. '*' shift, and go to state 148
  2300. '/' shift, and go to state 149
  2301. '%' shift, and go to state 150
  2302. '[' shift, and go to state 151
  2303. '.' shift, and go to state 152
  2304. ')' shift, and go to state 186
  2305.  
  2306.  
  2307. state 156
  2308.  
  2309. 56 ForStmt: T_For '(' ';' . Expr ';' ')' Stmt
  2310. 58 | T_For '(' ';' . Expr ';' Expr ')' Stmt
  2311.  
  2312. T_Null shift, and go to state 86
  2313. T_This shift, and go to state 87
  2314. T_New shift, and go to state 93
  2315. T_NewArray shift, and go to state 94
  2316. T_ReadInteger shift, and go to state 96
  2317. T_ReadLine shift, and go to state 97
  2318. T_Identifier shift, and go to state 98
  2319. T_StringConstant shift, and go to state 99
  2320. T_IntConstant shift, and go to state 100
  2321. T_DoubleConstant shift, and go to state 101
  2322. T_BoolConstant shift, and go to state 102
  2323. '-' shift, and go to state 103
  2324. '!' shift, and go to state 104
  2325. '(' shift, and go to state 106
  2326.  
  2327. Expr go to state 187
  2328. LValue go to state 117
  2329. Call go to state 118
  2330. Constant go to state 119
  2331.  
  2332.  
  2333. state 157
  2334.  
  2335. 55 ForStmt: T_For '(' Expr . ';' Expr ';' Expr ')' Stmt
  2336. 57 | T_For '(' Expr . ';' Expr ';' ')' Stmt
  2337. 69 Expr: Expr . '+' Expr
  2338. 70 | Expr . '-' Expr
  2339. 71 | Expr . '*' Expr
  2340. 72 | Expr . '/' Expr
  2341. 73 | Expr . '%' Expr
  2342. 75 | Expr . '<' Expr
  2343. 76 | Expr . T_LessEqual Expr
  2344. 77 | Expr . '>' Expr
  2345. 78 | Expr . T_GreaterEqual Expr
  2346. 79 | Expr . T_Equal Expr
  2347. 80 | Expr . T_NotEqual Expr
  2348. 81 | Expr . T_And Expr
  2349. 82 | Expr . T_Or Expr
  2350. 91 LValue: Expr . '.' T_Identifier
  2351. 92 | Expr . '[' Expr ']'
  2352. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2353.  
  2354. T_LessEqual shift, and go to state 138
  2355. T_GreaterEqual shift, and go to state 139
  2356. T_Equal shift, and go to state 140
  2357. T_NotEqual shift, and go to state 141
  2358. T_And shift, and go to state 142
  2359. T_Or shift, and go to state 143
  2360. '<' shift, and go to state 144
  2361. '>' shift, and go to state 145
  2362. '+' shift, and go to state 146
  2363. '-' shift, and go to state 147
  2364. '*' shift, and go to state 148
  2365. '/' shift, and go to state 149
  2366. '%' shift, and go to state 150
  2367. '[' shift, and go to state 151
  2368. '.' shift, and go to state 152
  2369. ';' shift, and go to state 188
  2370.  
  2371.  
  2372. state 158
  2373.  
  2374. 52 IfStmt: T_If '(' Expr . ')' Stmt
  2375. 53 | T_If '(' Expr . ')' Stmt T_Else Stmt
  2376. 69 Expr: Expr . '+' Expr
  2377. 70 | Expr . '-' Expr
  2378. 71 | Expr . '*' Expr
  2379. 72 | Expr . '/' Expr
  2380. 73 | Expr . '%' Expr
  2381. 75 | Expr . '<' Expr
  2382. 76 | Expr . T_LessEqual Expr
  2383. 77 | Expr . '>' Expr
  2384. 78 | Expr . T_GreaterEqual Expr
  2385. 79 | Expr . T_Equal Expr
  2386. 80 | Expr . T_NotEqual Expr
  2387. 81 | Expr . T_And Expr
  2388. 82 | Expr . T_Or Expr
  2389. 91 LValue: Expr . '.' T_Identifier
  2390. 92 | Expr . '[' Expr ']'
  2391. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2392.  
  2393. T_LessEqual shift, and go to state 138
  2394. T_GreaterEqual shift, and go to state 139
  2395. T_Equal shift, and go to state 140
  2396. T_NotEqual shift, and go to state 141
  2397. T_And shift, and go to state 142
  2398. T_Or shift, and go to state 143
  2399. '<' shift, and go to state 144
  2400. '>' shift, and go to state 145
  2401. '+' shift, and go to state 146
  2402. '-' shift, and go to state 147
  2403. '*' shift, and go to state 148
  2404. '/' shift, and go to state 149
  2405. '%' shift, and go to state 150
  2406. '[' shift, and go to state 151
  2407. '.' shift, and go to state 152
  2408. ')' shift, and go to state 189
  2409.  
  2410.  
  2411. state 159
  2412.  
  2413. 59 ReturnStmt: T_Return Expr ';' .
  2414.  
  2415. $default reduce using rule 59 (ReturnStmt)
  2416.  
  2417.  
  2418. state 160
  2419.  
  2420. 86 Expr: T_New '(' T_Identifier . ')'
  2421.  
  2422. ')' shift, and go to state 190
  2423.  
  2424.  
  2425. state 161
  2426.  
  2427. 69 Expr: Expr . '+' Expr
  2428. 70 | Expr . '-' Expr
  2429. 71 | Expr . '*' Expr
  2430. 72 | Expr . '/' Expr
  2431. 73 | Expr . '%' Expr
  2432. 75 | Expr . '<' Expr
  2433. 76 | Expr . T_LessEqual Expr
  2434. 77 | Expr . '>' Expr
  2435. 78 | Expr . T_GreaterEqual Expr
  2436. 79 | Expr . T_Equal Expr
  2437. 80 | Expr . T_NotEqual Expr
  2438. 81 | Expr . T_And Expr
  2439. 82 | Expr . T_Or Expr
  2440. 87 | T_NewArray '(' Expr . ',' Type ')'
  2441. 91 LValue: Expr . '.' T_Identifier
  2442. 92 | Expr . '[' Expr ']'
  2443. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2444.  
  2445. T_LessEqual shift, and go to state 138
  2446. T_GreaterEqual shift, and go to state 139
  2447. T_Equal shift, and go to state 140
  2448. T_NotEqual shift, and go to state 141
  2449. T_And shift, and go to state 142
  2450. T_Or shift, and go to state 143
  2451. '<' shift, and go to state 144
  2452. '>' shift, and go to state 145
  2453. '+' shift, and go to state 146
  2454. '-' shift, and go to state 147
  2455. '*' shift, and go to state 148
  2456. '/' shift, and go to state 149
  2457. '%' shift, and go to state 150
  2458. '[' shift, and go to state 151
  2459. '.' shift, and go to state 152
  2460. ',' shift, and go to state 191
  2461.  
  2462.  
  2463. state 162
  2464.  
  2465. 69 Expr: Expr . '+' Expr
  2466. 70 | Expr . '-' Expr
  2467. 71 | Expr . '*' Expr
  2468. 72 | Expr . '/' Expr
  2469. 73 | Expr . '%' Expr
  2470. 75 | Expr . '<' Expr
  2471. 76 | Expr . T_LessEqual Expr
  2472. 77 | Expr . '>' Expr
  2473. 78 | Expr . T_GreaterEqual Expr
  2474. 79 | Expr . T_Equal Expr
  2475. 80 | Expr . T_NotEqual Expr
  2476. 81 | Expr . T_And Expr
  2477. 82 | Expr . T_Or Expr
  2478. 89 ExprList: Expr .
  2479. 91 LValue: Expr . '.' T_Identifier
  2480. 92 | Expr . '[' Expr ']'
  2481. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2482.  
  2483. T_LessEqual shift, and go to state 138
  2484. T_GreaterEqual shift, and go to state 139
  2485. T_Equal shift, and go to state 140
  2486. T_NotEqual shift, and go to state 141
  2487. T_And shift, and go to state 142
  2488. T_Or shift, and go to state 143
  2489. '<' shift, and go to state 144
  2490. '>' shift, and go to state 145
  2491. '+' shift, and go to state 146
  2492. '-' shift, and go to state 147
  2493. '*' shift, and go to state 148
  2494. '/' shift, and go to state 149
  2495. '%' shift, and go to state 150
  2496. '[' shift, and go to state 151
  2497. '.' shift, and go to state 152
  2498.  
  2499. $default reduce using rule 89 (ExprList)
  2500.  
  2501.  
  2502. state 163
  2503.  
  2504. 62 PrintStmt: T_Print '(' ExprList . ')' ';'
  2505. 88 ExprList: ExprList . ',' Expr
  2506.  
  2507. ',' shift, and go to state 192
  2508. ')' shift, and go to state 193
  2509.  
  2510.  
  2511. state 164
  2512.  
  2513. 84 Expr: T_ReadInteger '(' ')' .
  2514.  
  2515. $default reduce using rule 84 (Expr)
  2516.  
  2517.  
  2518. state 165
  2519.  
  2520. 85 Expr: T_ReadLine '(' ')' .
  2521.  
  2522. $default reduce using rule 85 (Expr)
  2523.  
  2524.  
  2525. state 166
  2526.  
  2527. 96 Actuals: Epsilon .
  2528.  
  2529. $default reduce using rule 96 (Actuals)
  2530.  
  2531.  
  2532. state 167
  2533.  
  2534. 88 ExprList: ExprList . ',' Expr
  2535. 95 Actuals: ExprList .
  2536.  
  2537. ',' shift, and go to state 192
  2538.  
  2539. $default reduce using rule 95 (Actuals)
  2540.  
  2541.  
  2542. state 168
  2543.  
  2544. 93 Call: T_Identifier '(' Actuals . ')'
  2545.  
  2546. ')' shift, and go to state 194
  2547.  
  2548.  
  2549. state 169
  2550.  
  2551. 68 Expr: '(' Expr ')' .
  2552.  
  2553. $default reduce using rule 68 (Expr)
  2554.  
  2555.  
  2556. state 170
  2557.  
  2558. 69 Expr: Expr . '+' Expr
  2559. 70 | Expr . '-' Expr
  2560. 71 | Expr . '*' Expr
  2561. 72 | Expr . '/' Expr
  2562. 73 | Expr . '%' Expr
  2563. 75 | Expr . '<' Expr
  2564. 76 | Expr . T_LessEqual Expr
  2565. 76 | Expr T_LessEqual Expr .
  2566. 77 | Expr . '>' Expr
  2567. 78 | Expr . T_GreaterEqual Expr
  2568. 79 | Expr . T_Equal Expr
  2569. 80 | Expr . T_NotEqual Expr
  2570. 81 | Expr . T_And Expr
  2571. 82 | Expr . T_Or Expr
  2572. 91 LValue: Expr . '.' T_Identifier
  2573. 92 | Expr . '[' Expr ']'
  2574. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2575.  
  2576. '+' shift, and go to state 146
  2577. '-' shift, and go to state 147
  2578. '*' shift, and go to state 148
  2579. '/' shift, and go to state 149
  2580. '%' shift, and go to state 150
  2581. '[' shift, and go to state 151
  2582. '.' shift, and go to state 152
  2583.  
  2584. $default reduce using rule 76 (Expr)
  2585.  
  2586.  
  2587. state 171
  2588.  
  2589. 69 Expr: Expr . '+' Expr
  2590. 70 | Expr . '-' Expr
  2591. 71 | Expr . '*' Expr
  2592. 72 | Expr . '/' Expr
  2593. 73 | Expr . '%' Expr
  2594. 75 | Expr . '<' Expr
  2595. 76 | Expr . T_LessEqual Expr
  2596. 77 | Expr . '>' Expr
  2597. 78 | Expr . T_GreaterEqual Expr
  2598. 78 | Expr T_GreaterEqual Expr .
  2599. 79 | Expr . T_Equal Expr
  2600. 80 | Expr . T_NotEqual Expr
  2601. 81 | Expr . T_And Expr
  2602. 82 | Expr . T_Or Expr
  2603. 91 LValue: Expr . '.' T_Identifier
  2604. 92 | Expr . '[' Expr ']'
  2605. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2606.  
  2607. '+' shift, and go to state 146
  2608. '-' shift, and go to state 147
  2609. '*' shift, and go to state 148
  2610. '/' shift, and go to state 149
  2611. '%' shift, and go to state 150
  2612. '[' shift, and go to state 151
  2613. '.' shift, and go to state 152
  2614.  
  2615. $default reduce using rule 78 (Expr)
  2616.  
  2617.  
  2618. state 172
  2619.  
  2620. 69 Expr: Expr . '+' Expr
  2621. 70 | Expr . '-' Expr
  2622. 71 | Expr . '*' Expr
  2623. 72 | Expr . '/' Expr
  2624. 73 | Expr . '%' Expr
  2625. 75 | Expr . '<' Expr
  2626. 76 | Expr . T_LessEqual Expr
  2627. 77 | Expr . '>' Expr
  2628. 78 | Expr . T_GreaterEqual Expr
  2629. 79 | Expr . T_Equal Expr
  2630. 79 | Expr T_Equal Expr .
  2631. 80 | Expr . T_NotEqual Expr
  2632. 81 | Expr . T_And Expr
  2633. 82 | Expr . T_Or Expr
  2634. 91 LValue: Expr . '.' T_Identifier
  2635. 92 | Expr . '[' Expr ']'
  2636. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2637.  
  2638. T_LessEqual shift, and go to state 138
  2639. T_GreaterEqual shift, and go to state 139
  2640. '<' shift, and go to state 144
  2641. '>' shift, and go to state 145
  2642. '+' shift, and go to state 146
  2643. '-' shift, and go to state 147
  2644. '*' shift, and go to state 148
  2645. '/' shift, and go to state 149
  2646. '%' shift, and go to state 150
  2647. '[' shift, and go to state 151
  2648. '.' shift, and go to state 152
  2649.  
  2650. $default reduce using rule 79 (Expr)
  2651.  
  2652.  
  2653. state 173
  2654.  
  2655. 69 Expr: Expr . '+' Expr
  2656. 70 | Expr . '-' Expr
  2657. 71 | Expr . '*' Expr
  2658. 72 | Expr . '/' Expr
  2659. 73 | Expr . '%' Expr
  2660. 75 | Expr . '<' Expr
  2661. 76 | Expr . T_LessEqual Expr
  2662. 77 | Expr . '>' Expr
  2663. 78 | Expr . T_GreaterEqual Expr
  2664. 79 | Expr . T_Equal Expr
  2665. 80 | Expr . T_NotEqual Expr
  2666. 80 | Expr T_NotEqual Expr .
  2667. 81 | Expr . T_And Expr
  2668. 82 | Expr . T_Or Expr
  2669. 91 LValue: Expr . '.' T_Identifier
  2670. 92 | Expr . '[' Expr ']'
  2671. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2672.  
  2673. T_LessEqual shift, and go to state 138
  2674. T_GreaterEqual shift, and go to state 139
  2675. '<' shift, and go to state 144
  2676. '>' shift, and go to state 145
  2677. '+' shift, and go to state 146
  2678. '-' shift, and go to state 147
  2679. '*' shift, and go to state 148
  2680. '/' shift, and go to state 149
  2681. '%' shift, and go to state 150
  2682. '[' shift, and go to state 151
  2683. '.' shift, and go to state 152
  2684.  
  2685. $default reduce using rule 80 (Expr)
  2686.  
  2687.  
  2688. state 174
  2689.  
  2690. 69 Expr: Expr . '+' Expr
  2691. 70 | Expr . '-' Expr
  2692. 71 | Expr . '*' Expr
  2693. 72 | Expr . '/' Expr
  2694. 73 | Expr . '%' Expr
  2695. 75 | Expr . '<' Expr
  2696. 76 | Expr . T_LessEqual Expr
  2697. 77 | Expr . '>' Expr
  2698. 78 | Expr . T_GreaterEqual Expr
  2699. 79 | Expr . T_Equal Expr
  2700. 80 | Expr . T_NotEqual Expr
  2701. 81 | Expr . T_And Expr
  2702. 81 | Expr T_And Expr .
  2703. 82 | Expr . T_Or Expr
  2704. 91 LValue: Expr . '.' T_Identifier
  2705. 92 | Expr . '[' Expr ']'
  2706. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2707.  
  2708. T_LessEqual shift, and go to state 138
  2709. T_GreaterEqual shift, and go to state 139
  2710. T_Equal shift, and go to state 140
  2711. T_NotEqual shift, and go to state 141
  2712. '<' shift, and go to state 144
  2713. '>' shift, and go to state 145
  2714. '+' shift, and go to state 146
  2715. '-' shift, and go to state 147
  2716. '*' shift, and go to state 148
  2717. '/' shift, and go to state 149
  2718. '%' shift, and go to state 150
  2719. '[' shift, and go to state 151
  2720. '.' shift, and go to state 152
  2721.  
  2722. $default reduce using rule 81 (Expr)
  2723.  
  2724.  
  2725. state 175
  2726.  
  2727. 69 Expr: Expr . '+' Expr
  2728. 70 | Expr . '-' Expr
  2729. 71 | Expr . '*' Expr
  2730. 72 | Expr . '/' Expr
  2731. 73 | Expr . '%' Expr
  2732. 75 | Expr . '<' Expr
  2733. 76 | Expr . T_LessEqual Expr
  2734. 77 | Expr . '>' Expr
  2735. 78 | Expr . T_GreaterEqual Expr
  2736. 79 | Expr . T_Equal Expr
  2737. 80 | Expr . T_NotEqual Expr
  2738. 81 | Expr . T_And Expr
  2739. 82 | Expr . T_Or Expr
  2740. 82 | Expr T_Or Expr .
  2741. 91 LValue: Expr . '.' T_Identifier
  2742. 92 | Expr . '[' Expr ']'
  2743. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2744.  
  2745. T_LessEqual shift, and go to state 138
  2746. T_GreaterEqual shift, and go to state 139
  2747. T_Equal shift, and go to state 140
  2748. T_NotEqual shift, and go to state 141
  2749. T_And shift, and go to state 142
  2750. '<' shift, and go to state 144
  2751. '>' shift, and go to state 145
  2752. '+' shift, and go to state 146
  2753. '-' shift, and go to state 147
  2754. '*' shift, and go to state 148
  2755. '/' shift, and go to state 149
  2756. '%' shift, and go to state 150
  2757. '[' shift, and go to state 151
  2758. '.' shift, and go to state 152
  2759.  
  2760. $default reduce using rule 82 (Expr)
  2761.  
  2762.  
  2763. state 176
  2764.  
  2765. 69 Expr: Expr . '+' Expr
  2766. 70 | Expr . '-' Expr
  2767. 71 | Expr . '*' Expr
  2768. 72 | Expr . '/' Expr
  2769. 73 | Expr . '%' Expr
  2770. 75 | Expr . '<' Expr
  2771. 75 | Expr '<' Expr .
  2772. 76 | Expr . T_LessEqual Expr
  2773. 77 | Expr . '>' Expr
  2774. 78 | Expr . T_GreaterEqual Expr
  2775. 79 | Expr . T_Equal Expr
  2776. 80 | Expr . T_NotEqual Expr
  2777. 81 | Expr . T_And Expr
  2778. 82 | Expr . T_Or Expr
  2779. 91 LValue: Expr . '.' T_Identifier
  2780. 92 | Expr . '[' Expr ']'
  2781. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2782.  
  2783. '+' shift, and go to state 146
  2784. '-' shift, and go to state 147
  2785. '*' shift, and go to state 148
  2786. '/' shift, and go to state 149
  2787. '%' shift, and go to state 150
  2788. '[' shift, and go to state 151
  2789. '.' shift, and go to state 152
  2790.  
  2791. $default reduce using rule 75 (Expr)
  2792.  
  2793.  
  2794. state 177
  2795.  
  2796. 69 Expr: Expr . '+' Expr
  2797. 70 | Expr . '-' Expr
  2798. 71 | Expr . '*' Expr
  2799. 72 | Expr . '/' Expr
  2800. 73 | Expr . '%' Expr
  2801. 75 | Expr . '<' Expr
  2802. 76 | Expr . T_LessEqual Expr
  2803. 77 | Expr . '>' Expr
  2804. 77 | Expr '>' Expr .
  2805. 78 | Expr . T_GreaterEqual Expr
  2806. 79 | Expr . T_Equal Expr
  2807. 80 | Expr . T_NotEqual Expr
  2808. 81 | Expr . T_And Expr
  2809. 82 | Expr . T_Or Expr
  2810. 91 LValue: Expr . '.' T_Identifier
  2811. 92 | Expr . '[' Expr ']'
  2812. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2813.  
  2814. '+' shift, and go to state 146
  2815. '-' shift, and go to state 147
  2816. '*' shift, and go to state 148
  2817. '/' shift, and go to state 149
  2818. '%' shift, and go to state 150
  2819. '[' shift, and go to state 151
  2820. '.' shift, and go to state 152
  2821.  
  2822. $default reduce using rule 77 (Expr)
  2823.  
  2824.  
  2825. state 178
  2826.  
  2827. 69 Expr: Expr . '+' Expr
  2828. 69 | Expr '+' Expr .
  2829. 70 | Expr . '-' Expr
  2830. 71 | Expr . '*' Expr
  2831. 72 | Expr . '/' Expr
  2832. 73 | Expr . '%' Expr
  2833. 75 | Expr . '<' Expr
  2834. 76 | Expr . T_LessEqual Expr
  2835. 77 | Expr . '>' Expr
  2836. 78 | Expr . T_GreaterEqual Expr
  2837. 79 | Expr . T_Equal Expr
  2838. 80 | Expr . T_NotEqual Expr
  2839. 81 | Expr . T_And Expr
  2840. 82 | Expr . T_Or Expr
  2841. 91 LValue: Expr . '.' T_Identifier
  2842. 92 | Expr . '[' Expr ']'
  2843. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2844.  
  2845. '*' shift, and go to state 148
  2846. '/' shift, and go to state 149
  2847. '%' shift, and go to state 150
  2848. '[' shift, and go to state 151
  2849. '.' shift, and go to state 152
  2850.  
  2851. $default reduce using rule 69 (Expr)
  2852.  
  2853.  
  2854. state 179
  2855.  
  2856. 69 Expr: Expr . '+' Expr
  2857. 70 | Expr . '-' Expr
  2858. 70 | Expr '-' Expr .
  2859. 71 | Expr . '*' Expr
  2860. 72 | Expr . '/' Expr
  2861. 73 | Expr . '%' Expr
  2862. 75 | Expr . '<' Expr
  2863. 76 | Expr . T_LessEqual Expr
  2864. 77 | Expr . '>' Expr
  2865. 78 | Expr . T_GreaterEqual Expr
  2866. 79 | Expr . T_Equal Expr
  2867. 80 | Expr . T_NotEqual Expr
  2868. 81 | Expr . T_And Expr
  2869. 82 | Expr . T_Or Expr
  2870. 91 LValue: Expr . '.' T_Identifier
  2871. 92 | Expr . '[' Expr ']'
  2872. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2873.  
  2874. '*' shift, and go to state 148
  2875. '/' shift, and go to state 149
  2876. '%' shift, and go to state 150
  2877. '[' shift, and go to state 151
  2878. '.' shift, and go to state 152
  2879.  
  2880. $default reduce using rule 70 (Expr)
  2881.  
  2882.  
  2883. state 180
  2884.  
  2885. 69 Expr: Expr . '+' Expr
  2886. 70 | Expr . '-' Expr
  2887. 71 | Expr . '*' Expr
  2888. 71 | Expr '*' Expr .
  2889. 72 | Expr . '/' Expr
  2890. 73 | Expr . '%' Expr
  2891. 75 | Expr . '<' Expr
  2892. 76 | Expr . T_LessEqual Expr
  2893. 77 | Expr . '>' Expr
  2894. 78 | Expr . T_GreaterEqual Expr
  2895. 79 | Expr . T_Equal Expr
  2896. 80 | Expr . T_NotEqual Expr
  2897. 81 | Expr . T_And Expr
  2898. 82 | Expr . T_Or Expr
  2899. 91 LValue: Expr . '.' T_Identifier
  2900. 92 | Expr . '[' Expr ']'
  2901. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2902.  
  2903. '[' shift, and go to state 151
  2904. '.' shift, and go to state 152
  2905.  
  2906. $default reduce using rule 71 (Expr)
  2907.  
  2908.  
  2909. state 181
  2910.  
  2911. 69 Expr: Expr . '+' Expr
  2912. 70 | Expr . '-' Expr
  2913. 71 | Expr . '*' Expr
  2914. 72 | Expr . '/' Expr
  2915. 72 | Expr '/' Expr .
  2916. 73 | Expr . '%' Expr
  2917. 75 | Expr . '<' Expr
  2918. 76 | Expr . T_LessEqual Expr
  2919. 77 | Expr . '>' Expr
  2920. 78 | Expr . T_GreaterEqual Expr
  2921. 79 | Expr . T_Equal Expr
  2922. 80 | Expr . T_NotEqual Expr
  2923. 81 | Expr . T_And Expr
  2924. 82 | Expr . T_Or Expr
  2925. 91 LValue: Expr . '.' T_Identifier
  2926. 92 | Expr . '[' Expr ']'
  2927. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2928.  
  2929. '[' shift, and go to state 151
  2930. '.' shift, and go to state 152
  2931.  
  2932. $default reduce using rule 72 (Expr)
  2933.  
  2934.  
  2935. state 182
  2936.  
  2937. 69 Expr: Expr . '+' Expr
  2938. 70 | Expr . '-' Expr
  2939. 71 | Expr . '*' Expr
  2940. 72 | Expr . '/' Expr
  2941. 73 | Expr . '%' Expr
  2942. 73 | Expr '%' Expr .
  2943. 75 | Expr . '<' Expr
  2944. 76 | Expr . T_LessEqual Expr
  2945. 77 | Expr . '>' Expr
  2946. 78 | Expr . T_GreaterEqual Expr
  2947. 79 | Expr . T_Equal Expr
  2948. 80 | Expr . T_NotEqual Expr
  2949. 81 | Expr . T_And Expr
  2950. 82 | Expr . T_Or Expr
  2951. 91 LValue: Expr . '.' T_Identifier
  2952. 92 | Expr . '[' Expr ']'
  2953. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2954.  
  2955. '[' shift, and go to state 151
  2956. '.' shift, and go to state 152
  2957.  
  2958. $default reduce using rule 73 (Expr)
  2959.  
  2960.  
  2961. state 183
  2962.  
  2963. 69 Expr: Expr . '+' Expr
  2964. 70 | Expr . '-' Expr
  2965. 71 | Expr . '*' Expr
  2966. 72 | Expr . '/' Expr
  2967. 73 | Expr . '%' Expr
  2968. 75 | Expr . '<' Expr
  2969. 76 | Expr . T_LessEqual Expr
  2970. 77 | Expr . '>' Expr
  2971. 78 | Expr . T_GreaterEqual Expr
  2972. 79 | Expr . T_Equal Expr
  2973. 80 | Expr . T_NotEqual Expr
  2974. 81 | Expr . T_And Expr
  2975. 82 | Expr . T_Or Expr
  2976. 91 LValue: Expr . '.' T_Identifier
  2977. 92 | Expr . '[' Expr ']'
  2978. 92 | Expr '[' Expr . ']'
  2979. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  2980.  
  2981. T_LessEqual shift, and go to state 138
  2982. T_GreaterEqual shift, and go to state 139
  2983. T_Equal shift, and go to state 140
  2984. T_NotEqual shift, and go to state 141
  2985. T_And shift, and go to state 142
  2986. T_Or shift, and go to state 143
  2987. '<' shift, and go to state 144
  2988. '>' shift, and go to state 145
  2989. '+' shift, and go to state 146
  2990. '-' shift, and go to state 147
  2991. '*' shift, and go to state 148
  2992. '/' shift, and go to state 149
  2993. '%' shift, and go to state 150
  2994. '[' shift, and go to state 151
  2995. '.' shift, and go to state 152
  2996. ']' shift, and go to state 195
  2997.  
  2998.  
  2999. state 184
  3000.  
  3001. 91 LValue: Expr '.' T_Identifier .
  3002. 94 Call: Expr '.' T_Identifier . '(' Actuals ')'
  3003.  
  3004. '(' shift, and go to state 196
  3005.  
  3006. $default reduce using rule 91 (LValue)
  3007.  
  3008.  
  3009. state 185
  3010.  
  3011. 63 Expr: LValue '=' Expr .
  3012. 69 | Expr . '+' Expr
  3013. 70 | Expr . '-' Expr
  3014. 71 | Expr . '*' Expr
  3015. 72 | Expr . '/' Expr
  3016. 73 | Expr . '%' Expr
  3017. 75 | Expr . '<' Expr
  3018. 76 | Expr . T_LessEqual Expr
  3019. 77 | Expr . '>' Expr
  3020. 78 | Expr . T_GreaterEqual Expr
  3021. 79 | Expr . T_Equal Expr
  3022. 80 | Expr . T_NotEqual Expr
  3023. 81 | Expr . T_And Expr
  3024. 82 | Expr . T_Or Expr
  3025. 91 LValue: Expr . '.' T_Identifier
  3026. 92 | Expr . '[' Expr ']'
  3027. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  3028.  
  3029. T_LessEqual shift, and go to state 138
  3030. T_GreaterEqual shift, and go to state 139
  3031. T_Equal shift, and go to state 140
  3032. T_NotEqual shift, and go to state 141
  3033. T_And shift, and go to state 142
  3034. T_Or shift, and go to state 143
  3035. '<' shift, and go to state 144
  3036. '>' shift, and go to state 145
  3037. '+' shift, and go to state 146
  3038. '-' shift, and go to state 147
  3039. '*' shift, and go to state 148
  3040. '/' shift, and go to state 149
  3041. '%' shift, and go to state 150
  3042. '[' shift, and go to state 151
  3043. '.' shift, and go to state 152
  3044.  
  3045. $default reduce using rule 63 (Expr)
  3046.  
  3047.  
  3048. state 186
  3049.  
  3050. 54 WhileStmt: T_While '(' Expr ')' . Stmt
  3051.  
  3052. T_Null shift, and go to state 86
  3053. T_This shift, and go to state 87
  3054. T_While shift, and go to state 88
  3055. T_For shift, and go to state 89
  3056. T_If shift, and go to state 90
  3057. T_Return shift, and go to state 91
  3058. T_Break shift, and go to state 92
  3059. T_New shift, and go to state 93
  3060. T_NewArray shift, and go to state 94
  3061. T_Print shift, and go to state 95
  3062. T_ReadInteger shift, and go to state 96
  3063. T_ReadLine shift, and go to state 97
  3064. T_Identifier shift, and go to state 98
  3065. T_StringConstant shift, and go to state 99
  3066. T_IntConstant shift, and go to state 100
  3067. T_DoubleConstant shift, and go to state 101
  3068. T_BoolConstant shift, and go to state 102
  3069. '-' shift, and go to state 103
  3070. '!' shift, and go to state 104
  3071. ';' shift, and go to state 105
  3072. '(' shift, and go to state 106
  3073. '{' shift, and go to state 64
  3074.  
  3075. StmtBlock go to state 108
  3076. Stmt go to state 197
  3077. IfStmt go to state 110
  3078. WhileStmt go to state 111
  3079. ForStmt go to state 112
  3080. ReturnStmt go to state 113
  3081. BreakStmt go to state 114
  3082. PrintStmt go to state 115
  3083. Expr go to state 116
  3084. LValue go to state 117
  3085. Call go to state 118
  3086. Constant go to state 119
  3087.  
  3088.  
  3089. state 187
  3090.  
  3091. 56 ForStmt: T_For '(' ';' Expr . ';' ')' Stmt
  3092. 58 | T_For '(' ';' Expr . ';' Expr ')' Stmt
  3093. 69 Expr: Expr . '+' Expr
  3094. 70 | Expr . '-' Expr
  3095. 71 | Expr . '*' Expr
  3096. 72 | Expr . '/' Expr
  3097. 73 | Expr . '%' Expr
  3098. 75 | Expr . '<' Expr
  3099. 76 | Expr . T_LessEqual Expr
  3100. 77 | Expr . '>' Expr
  3101. 78 | Expr . T_GreaterEqual Expr
  3102. 79 | Expr . T_Equal Expr
  3103. 80 | Expr . T_NotEqual Expr
  3104. 81 | Expr . T_And Expr
  3105. 82 | Expr . T_Or Expr
  3106. 91 LValue: Expr . '.' T_Identifier
  3107. 92 | Expr . '[' Expr ']'
  3108. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  3109.  
  3110. T_LessEqual shift, and go to state 138
  3111. T_GreaterEqual shift, and go to state 139
  3112. T_Equal shift, and go to state 140
  3113. T_NotEqual shift, and go to state 141
  3114. T_And shift, and go to state 142
  3115. T_Or shift, and go to state 143
  3116. '<' shift, and go to state 144
  3117. '>' shift, and go to state 145
  3118. '+' shift, and go to state 146
  3119. '-' shift, and go to state 147
  3120. '*' shift, and go to state 148
  3121. '/' shift, and go to state 149
  3122. '%' shift, and go to state 150
  3123. '[' shift, and go to state 151
  3124. '.' shift, and go to state 152
  3125. ';' shift, and go to state 198
  3126.  
  3127.  
  3128. state 188
  3129.  
  3130. 55 ForStmt: T_For '(' Expr ';' . Expr ';' Expr ')' Stmt
  3131. 57 | T_For '(' Expr ';' . Expr ';' ')' Stmt
  3132.  
  3133. T_Null shift, and go to state 86
  3134. T_This shift, and go to state 87
  3135. T_New shift, and go to state 93
  3136. T_NewArray shift, and go to state 94
  3137. T_ReadInteger shift, and go to state 96
  3138. T_ReadLine shift, and go to state 97
  3139. T_Identifier shift, and go to state 98
  3140. T_StringConstant shift, and go to state 99
  3141. T_IntConstant shift, and go to state 100
  3142. T_DoubleConstant shift, and go to state 101
  3143. T_BoolConstant shift, and go to state 102
  3144. '-' shift, and go to state 103
  3145. '!' shift, and go to state 104
  3146. '(' shift, and go to state 106
  3147.  
  3148. Expr go to state 199
  3149. LValue go to state 117
  3150. Call go to state 118
  3151. Constant go to state 119
  3152.  
  3153.  
  3154. state 189
  3155.  
  3156. 52 IfStmt: T_If '(' Expr ')' . Stmt
  3157. 53 | T_If '(' Expr ')' . Stmt T_Else Stmt
  3158.  
  3159. T_Null shift, and go to state 86
  3160. T_This shift, and go to state 87
  3161. T_While shift, and go to state 88
  3162. T_For shift, and go to state 89
  3163. T_If shift, and go to state 90
  3164. T_Return shift, and go to state 91
  3165. T_Break shift, and go to state 92
  3166. T_New shift, and go to state 93
  3167. T_NewArray shift, and go to state 94
  3168. T_Print shift, and go to state 95
  3169. T_ReadInteger shift, and go to state 96
  3170. T_ReadLine shift, and go to state 97
  3171. T_Identifier shift, and go to state 98
  3172. T_StringConstant shift, and go to state 99
  3173. T_IntConstant shift, and go to state 100
  3174. T_DoubleConstant shift, and go to state 101
  3175. T_BoolConstant shift, and go to state 102
  3176. '-' shift, and go to state 103
  3177. '!' shift, and go to state 104
  3178. ';' shift, and go to state 105
  3179. '(' shift, and go to state 106
  3180. '{' shift, and go to state 64
  3181.  
  3182. StmtBlock go to state 108
  3183. Stmt go to state 200
  3184. IfStmt go to state 110
  3185. WhileStmt go to state 111
  3186. ForStmt go to state 112
  3187. ReturnStmt go to state 113
  3188. BreakStmt go to state 114
  3189. PrintStmt go to state 115
  3190. Expr go to state 116
  3191. LValue go to state 117
  3192. Call go to state 118
  3193. Constant go to state 119
  3194.  
  3195.  
  3196. state 190
  3197.  
  3198. 86 Expr: T_New '(' T_Identifier ')' .
  3199.  
  3200. $default reduce using rule 86 (Expr)
  3201.  
  3202.  
  3203. state 191
  3204.  
  3205. 87 Expr: T_NewArray '(' Expr ',' . Type ')'
  3206.  
  3207. T_Bool shift, and go to state 2
  3208. T_Int shift, and go to state 3
  3209. T_Double shift, and go to state 4
  3210. T_String shift, and go to state 5
  3211. T_Identifier shift, and go to state 8
  3212.  
  3213. Type go to state 201
  3214.  
  3215.  
  3216. state 192
  3217.  
  3218. 88 ExprList: ExprList ',' . Expr
  3219.  
  3220. T_Null shift, and go to state 86
  3221. T_This shift, and go to state 87
  3222. T_New shift, and go to state 93
  3223. T_NewArray shift, and go to state 94
  3224. T_ReadInteger shift, and go to state 96
  3225. T_ReadLine shift, and go to state 97
  3226. T_Identifier shift, and go to state 98
  3227. T_StringConstant shift, and go to state 99
  3228. T_IntConstant shift, and go to state 100
  3229. T_DoubleConstant shift, and go to state 101
  3230. T_BoolConstant shift, and go to state 102
  3231. '-' shift, and go to state 103
  3232. '!' shift, and go to state 104
  3233. '(' shift, and go to state 106
  3234.  
  3235. Expr go to state 202
  3236. LValue go to state 117
  3237. Call go to state 118
  3238. Constant go to state 119
  3239.  
  3240.  
  3241. state 193
  3242.  
  3243. 62 PrintStmt: T_Print '(' ExprList ')' . ';'
  3244.  
  3245. ';' shift, and go to state 203
  3246.  
  3247.  
  3248. state 194
  3249.  
  3250. 93 Call: T_Identifier '(' Actuals ')' .
  3251.  
  3252. $default reduce using rule 93 (Call)
  3253.  
  3254.  
  3255. state 195
  3256.  
  3257. 92 LValue: Expr '[' Expr ']' .
  3258.  
  3259. $default reduce using rule 92 (LValue)
  3260.  
  3261.  
  3262. state 196
  3263.  
  3264. 94 Call: Expr '.' T_Identifier '(' . Actuals ')'
  3265.  
  3266. T_Null shift, and go to state 86
  3267. T_This shift, and go to state 87
  3268. T_New shift, and go to state 93
  3269. T_NewArray shift, and go to state 94
  3270. T_ReadInteger shift, and go to state 96
  3271. T_ReadLine shift, and go to state 97
  3272. T_Identifier shift, and go to state 98
  3273. T_StringConstant shift, and go to state 99
  3274. T_IntConstant shift, and go to state 100
  3275. T_DoubleConstant shift, and go to state 101
  3276. T_BoolConstant shift, and go to state 102
  3277. '-' shift, and go to state 103
  3278. '!' shift, and go to state 104
  3279. '(' shift, and go to state 106
  3280.  
  3281. $default reduce using rule 18 (Epsilon)
  3282.  
  3283. Epsilon go to state 166
  3284. Expr go to state 162
  3285. ExprList go to state 167
  3286. LValue go to state 117
  3287. Call go to state 118
  3288. Actuals go to state 204
  3289. Constant go to state 119
  3290.  
  3291.  
  3292. state 197
  3293.  
  3294. 54 WhileStmt: T_While '(' Expr ')' Stmt .
  3295.  
  3296. $default reduce using rule 54 (WhileStmt)
  3297.  
  3298.  
  3299. state 198
  3300.  
  3301. 56 ForStmt: T_For '(' ';' Expr ';' . ')' Stmt
  3302. 58 | T_For '(' ';' Expr ';' . Expr ')' Stmt
  3303.  
  3304. T_Null shift, and go to state 86
  3305. T_This shift, and go to state 87
  3306. T_New shift, and go to state 93
  3307. T_NewArray shift, and go to state 94
  3308. T_ReadInteger shift, and go to state 96
  3309. T_ReadLine shift, and go to state 97
  3310. T_Identifier shift, and go to state 98
  3311. T_StringConstant shift, and go to state 99
  3312. T_IntConstant shift, and go to state 100
  3313. T_DoubleConstant shift, and go to state 101
  3314. T_BoolConstant shift, and go to state 102
  3315. '-' shift, and go to state 103
  3316. '!' shift, and go to state 104
  3317. '(' shift, and go to state 106
  3318. ')' shift, and go to state 205
  3319.  
  3320. Expr go to state 206
  3321. LValue go to state 117
  3322. Call go to state 118
  3323. Constant go to state 119
  3324.  
  3325.  
  3326. state 199
  3327.  
  3328. 55 ForStmt: T_For '(' Expr ';' Expr . ';' Expr ')' Stmt
  3329. 57 | T_For '(' Expr ';' Expr . ';' ')' Stmt
  3330. 69 Expr: Expr . '+' Expr
  3331. 70 | Expr . '-' Expr
  3332. 71 | Expr . '*' Expr
  3333. 72 | Expr . '/' Expr
  3334. 73 | Expr . '%' Expr
  3335. 75 | Expr . '<' Expr
  3336. 76 | Expr . T_LessEqual Expr
  3337. 77 | Expr . '>' Expr
  3338. 78 | Expr . T_GreaterEqual Expr
  3339. 79 | Expr . T_Equal Expr
  3340. 80 | Expr . T_NotEqual Expr
  3341. 81 | Expr . T_And Expr
  3342. 82 | Expr . T_Or Expr
  3343. 91 LValue: Expr . '.' T_Identifier
  3344. 92 | Expr . '[' Expr ']'
  3345. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  3346.  
  3347. T_LessEqual shift, and go to state 138
  3348. T_GreaterEqual shift, and go to state 139
  3349. T_Equal shift, and go to state 140
  3350. T_NotEqual shift, and go to state 141
  3351. T_And shift, and go to state 142
  3352. T_Or shift, and go to state 143
  3353. '<' shift, and go to state 144
  3354. '>' shift, and go to state 145
  3355. '+' shift, and go to state 146
  3356. '-' shift, and go to state 147
  3357. '*' shift, and go to state 148
  3358. '/' shift, and go to state 149
  3359. '%' shift, and go to state 150
  3360. '[' shift, and go to state 151
  3361. '.' shift, and go to state 152
  3362. ';' shift, and go to state 207
  3363.  
  3364.  
  3365. state 200
  3366.  
  3367. 52 IfStmt: T_If '(' Expr ')' Stmt .
  3368. 53 | T_If '(' Expr ')' Stmt . T_Else Stmt
  3369.  
  3370. T_Else shift, and go to state 208
  3371.  
  3372. $default reduce using rule 52 (IfStmt)
  3373.  
  3374.  
  3375. state 201
  3376.  
  3377. 17 Type: Type . T_Dims
  3378. 87 Expr: T_NewArray '(' Expr ',' Type . ')'
  3379.  
  3380. T_Dims shift, and go to state 24
  3381. ')' shift, and go to state 209
  3382.  
  3383.  
  3384. state 202
  3385.  
  3386. 69 Expr: Expr . '+' Expr
  3387. 70 | Expr . '-' Expr
  3388. 71 | Expr . '*' Expr
  3389. 72 | Expr . '/' Expr
  3390. 73 | Expr . '%' Expr
  3391. 75 | Expr . '<' Expr
  3392. 76 | Expr . T_LessEqual Expr
  3393. 77 | Expr . '>' Expr
  3394. 78 | Expr . T_GreaterEqual Expr
  3395. 79 | Expr . T_Equal Expr
  3396. 80 | Expr . T_NotEqual Expr
  3397. 81 | Expr . T_And Expr
  3398. 82 | Expr . T_Or Expr
  3399. 88 ExprList: ExprList ',' Expr .
  3400. 91 LValue: Expr . '.' T_Identifier
  3401. 92 | Expr . '[' Expr ']'
  3402. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  3403.  
  3404. T_LessEqual shift, and go to state 138
  3405. T_GreaterEqual shift, and go to state 139
  3406. T_Equal shift, and go to state 140
  3407. T_NotEqual shift, and go to state 141
  3408. T_And shift, and go to state 142
  3409. T_Or shift, and go to state 143
  3410. '<' shift, and go to state 144
  3411. '>' shift, and go to state 145
  3412. '+' shift, and go to state 146
  3413. '-' shift, and go to state 147
  3414. '*' shift, and go to state 148
  3415. '/' shift, and go to state 149
  3416. '%' shift, and go to state 150
  3417. '[' shift, and go to state 151
  3418. '.' shift, and go to state 152
  3419.  
  3420. $default reduce using rule 88 (ExprList)
  3421.  
  3422.  
  3423. state 203
  3424.  
  3425. 62 PrintStmt: T_Print '(' ExprList ')' ';' .
  3426.  
  3427. $default reduce using rule 62 (PrintStmt)
  3428.  
  3429.  
  3430. state 204
  3431.  
  3432. 94 Call: Expr '.' T_Identifier '(' Actuals . ')'
  3433.  
  3434. ')' shift, and go to state 210
  3435.  
  3436.  
  3437. state 205
  3438.  
  3439. 56 ForStmt: T_For '(' ';' Expr ';' ')' . Stmt
  3440.  
  3441. T_Null shift, and go to state 86
  3442. T_This shift, and go to state 87
  3443. T_While shift, and go to state 88
  3444. T_For shift, and go to state 89
  3445. T_If shift, and go to state 90
  3446. T_Return shift, and go to state 91
  3447. T_Break shift, and go to state 92
  3448. T_New shift, and go to state 93
  3449. T_NewArray shift, and go to state 94
  3450. T_Print shift, and go to state 95
  3451. T_ReadInteger shift, and go to state 96
  3452. T_ReadLine shift, and go to state 97
  3453. T_Identifier shift, and go to state 98
  3454. T_StringConstant shift, and go to state 99
  3455. T_IntConstant shift, and go to state 100
  3456. T_DoubleConstant shift, and go to state 101
  3457. T_BoolConstant shift, and go to state 102
  3458. '-' shift, and go to state 103
  3459. '!' shift, and go to state 104
  3460. ';' shift, and go to state 105
  3461. '(' shift, and go to state 106
  3462. '{' shift, and go to state 64
  3463.  
  3464. StmtBlock go to state 108
  3465. Stmt go to state 211
  3466. IfStmt go to state 110
  3467. WhileStmt go to state 111
  3468. ForStmt go to state 112
  3469. ReturnStmt go to state 113
  3470. BreakStmt go to state 114
  3471. PrintStmt go to state 115
  3472. Expr go to state 116
  3473. LValue go to state 117
  3474. Call go to state 118
  3475. Constant go to state 119
  3476.  
  3477.  
  3478. state 206
  3479.  
  3480. 58 ForStmt: T_For '(' ';' Expr ';' Expr . ')' Stmt
  3481. 69 Expr: Expr . '+' Expr
  3482. 70 | Expr . '-' Expr
  3483. 71 | Expr . '*' Expr
  3484. 72 | Expr . '/' Expr
  3485. 73 | Expr . '%' Expr
  3486. 75 | Expr . '<' Expr
  3487. 76 | Expr . T_LessEqual Expr
  3488. 77 | Expr . '>' Expr
  3489. 78 | Expr . T_GreaterEqual Expr
  3490. 79 | Expr . T_Equal Expr
  3491. 80 | Expr . T_NotEqual Expr
  3492. 81 | Expr . T_And Expr
  3493. 82 | Expr . T_Or Expr
  3494. 91 LValue: Expr . '.' T_Identifier
  3495. 92 | Expr . '[' Expr ']'
  3496. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  3497.  
  3498. T_LessEqual shift, and go to state 138
  3499. T_GreaterEqual shift, and go to state 139
  3500. T_Equal shift, and go to state 140
  3501. T_NotEqual shift, and go to state 141
  3502. T_And shift, and go to state 142
  3503. T_Or shift, and go to state 143
  3504. '<' shift, and go to state 144
  3505. '>' shift, and go to state 145
  3506. '+' shift, and go to state 146
  3507. '-' shift, and go to state 147
  3508. '*' shift, and go to state 148
  3509. '/' shift, and go to state 149
  3510. '%' shift, and go to state 150
  3511. '[' shift, and go to state 151
  3512. '.' shift, and go to state 152
  3513. ')' shift, and go to state 212
  3514.  
  3515.  
  3516. state 207
  3517.  
  3518. 55 ForStmt: T_For '(' Expr ';' Expr ';' . Expr ')' Stmt
  3519. 57 | T_For '(' Expr ';' Expr ';' . ')' Stmt
  3520.  
  3521. T_Null shift, and go to state 86
  3522. T_This shift, and go to state 87
  3523. T_New shift, and go to state 93
  3524. T_NewArray shift, and go to state 94
  3525. T_ReadInteger shift, and go to state 96
  3526. T_ReadLine shift, and go to state 97
  3527. T_Identifier shift, and go to state 98
  3528. T_StringConstant shift, and go to state 99
  3529. T_IntConstant shift, and go to state 100
  3530. T_DoubleConstant shift, and go to state 101
  3531. T_BoolConstant shift, and go to state 102
  3532. '-' shift, and go to state 103
  3533. '!' shift, and go to state 104
  3534. '(' shift, and go to state 106
  3535. ')' shift, and go to state 213
  3536.  
  3537. Expr go to state 214
  3538. LValue go to state 117
  3539. Call go to state 118
  3540. Constant go to state 119
  3541.  
  3542.  
  3543. state 208
  3544.  
  3545. 53 IfStmt: T_If '(' Expr ')' Stmt T_Else . Stmt
  3546.  
  3547. T_Null shift, and go to state 86
  3548. T_This shift, and go to state 87
  3549. T_While shift, and go to state 88
  3550. T_For shift, and go to state 89
  3551. T_If shift, and go to state 90
  3552. T_Return shift, and go to state 91
  3553. T_Break shift, and go to state 92
  3554. T_New shift, and go to state 93
  3555. T_NewArray shift, and go to state 94
  3556. T_Print shift, and go to state 95
  3557. T_ReadInteger shift, and go to state 96
  3558. T_ReadLine shift, and go to state 97
  3559. T_Identifier shift, and go to state 98
  3560. T_StringConstant shift, and go to state 99
  3561. T_IntConstant shift, and go to state 100
  3562. T_DoubleConstant shift, and go to state 101
  3563. T_BoolConstant shift, and go to state 102
  3564. '-' shift, and go to state 103
  3565. '!' shift, and go to state 104
  3566. ';' shift, and go to state 105
  3567. '(' shift, and go to state 106
  3568. '{' shift, and go to state 64
  3569.  
  3570. StmtBlock go to state 108
  3571. Stmt go to state 215
  3572. IfStmt go to state 110
  3573. WhileStmt go to state 111
  3574. ForStmt go to state 112
  3575. ReturnStmt go to state 113
  3576. BreakStmt go to state 114
  3577. PrintStmt go to state 115
  3578. Expr go to state 116
  3579. LValue go to state 117
  3580. Call go to state 118
  3581. Constant go to state 119
  3582.  
  3583.  
  3584. state 209
  3585.  
  3586. 87 Expr: T_NewArray '(' Expr ',' Type ')' .
  3587.  
  3588. $default reduce using rule 87 (Expr)
  3589.  
  3590.  
  3591. state 210
  3592.  
  3593. 94 Call: Expr '.' T_Identifier '(' Actuals ')' .
  3594.  
  3595. $default reduce using rule 94 (Call)
  3596.  
  3597.  
  3598. state 211
  3599.  
  3600. 56 ForStmt: T_For '(' ';' Expr ';' ')' Stmt .
  3601.  
  3602. $default reduce using rule 56 (ForStmt)
  3603.  
  3604.  
  3605. state 212
  3606.  
  3607. 58 ForStmt: T_For '(' ';' Expr ';' Expr ')' . Stmt
  3608.  
  3609. T_Null shift, and go to state 86
  3610. T_This shift, and go to state 87
  3611. T_While shift, and go to state 88
  3612. T_For shift, and go to state 89
  3613. T_If shift, and go to state 90
  3614. T_Return shift, and go to state 91
  3615. T_Break shift, and go to state 92
  3616. T_New shift, and go to state 93
  3617. T_NewArray shift, and go to state 94
  3618. T_Print shift, and go to state 95
  3619. T_ReadInteger shift, and go to state 96
  3620. T_ReadLine shift, and go to state 97
  3621. T_Identifier shift, and go to state 98
  3622. T_StringConstant shift, and go to state 99
  3623. T_IntConstant shift, and go to state 100
  3624. T_DoubleConstant shift, and go to state 101
  3625. T_BoolConstant shift, and go to state 102
  3626. '-' shift, and go to state 103
  3627. '!' shift, and go to state 104
  3628. ';' shift, and go to state 105
  3629. '(' shift, and go to state 106
  3630. '{' shift, and go to state 64
  3631.  
  3632. StmtBlock go to state 108
  3633. Stmt go to state 216
  3634. IfStmt go to state 110
  3635. WhileStmt go to state 111
  3636. ForStmt go to state 112
  3637. ReturnStmt go to state 113
  3638. BreakStmt go to state 114
  3639. PrintStmt go to state 115
  3640. Expr go to state 116
  3641. LValue go to state 117
  3642. Call go to state 118
  3643. Constant go to state 119
  3644.  
  3645.  
  3646. state 213
  3647.  
  3648. 57 ForStmt: T_For '(' Expr ';' Expr ';' ')' . Stmt
  3649.  
  3650. T_Null shift, and go to state 86
  3651. T_This shift, and go to state 87
  3652. T_While shift, and go to state 88
  3653. T_For shift, and go to state 89
  3654. T_If shift, and go to state 90
  3655. T_Return shift, and go to state 91
  3656. T_Break shift, and go to state 92
  3657. T_New shift, and go to state 93
  3658. T_NewArray shift, and go to state 94
  3659. T_Print shift, and go to state 95
  3660. T_ReadInteger shift, and go to state 96
  3661. T_ReadLine shift, and go to state 97
  3662. T_Identifier shift, and go to state 98
  3663. T_StringConstant shift, and go to state 99
  3664. T_IntConstant shift, and go to state 100
  3665. T_DoubleConstant shift, and go to state 101
  3666. T_BoolConstant shift, and go to state 102
  3667. '-' shift, and go to state 103
  3668. '!' shift, and go to state 104
  3669. ';' shift, and go to state 105
  3670. '(' shift, and go to state 106
  3671. '{' shift, and go to state 64
  3672.  
  3673. StmtBlock go to state 108
  3674. Stmt go to state 217
  3675. IfStmt go to state 110
  3676. WhileStmt go to state 111
  3677. ForStmt go to state 112
  3678. ReturnStmt go to state 113
  3679. BreakStmt go to state 114
  3680. PrintStmt go to state 115
  3681. Expr go to state 116
  3682. LValue go to state 117
  3683. Call go to state 118
  3684. Constant go to state 119
  3685.  
  3686.  
  3687. state 214
  3688.  
  3689. 55 ForStmt: T_For '(' Expr ';' Expr ';' Expr . ')' Stmt
  3690. 69 Expr: Expr . '+' Expr
  3691. 70 | Expr . '-' Expr
  3692. 71 | Expr . '*' Expr
  3693. 72 | Expr . '/' Expr
  3694. 73 | Expr . '%' Expr
  3695. 75 | Expr . '<' Expr
  3696. 76 | Expr . T_LessEqual Expr
  3697. 77 | Expr . '>' Expr
  3698. 78 | Expr . T_GreaterEqual Expr
  3699. 79 | Expr . T_Equal Expr
  3700. 80 | Expr . T_NotEqual Expr
  3701. 81 | Expr . T_And Expr
  3702. 82 | Expr . T_Or Expr
  3703. 91 LValue: Expr . '.' T_Identifier
  3704. 92 | Expr . '[' Expr ']'
  3705. 94 Call: Expr . '.' T_Identifier '(' Actuals ')'
  3706.  
  3707. T_LessEqual shift, and go to state 138
  3708. T_GreaterEqual shift, and go to state 139
  3709. T_Equal shift, and go to state 140
  3710. T_NotEqual shift, and go to state 141
  3711. T_And shift, and go to state 142
  3712. T_Or shift, and go to state 143
  3713. '<' shift, and go to state 144
  3714. '>' shift, and go to state 145
  3715. '+' shift, and go to state 146
  3716. '-' shift, and go to state 147
  3717. '*' shift, and go to state 148
  3718. '/' shift, and go to state 149
  3719. '%' shift, and go to state 150
  3720. '[' shift, and go to state 151
  3721. '.' shift, and go to state 152
  3722. ')' shift, and go to state 218
  3723.  
  3724.  
  3725. state 215
  3726.  
  3727. 53 IfStmt: T_If '(' Expr ')' Stmt T_Else Stmt .
  3728.  
  3729. $default reduce using rule 53 (IfStmt)
  3730.  
  3731.  
  3732. state 216
  3733.  
  3734. 58 ForStmt: T_For '(' ';' Expr ';' Expr ')' Stmt .
  3735.  
  3736. $default reduce using rule 58 (ForStmt)
  3737.  
  3738.  
  3739. state 217
  3740.  
  3741. 57 ForStmt: T_For '(' Expr ';' Expr ';' ')' Stmt .
  3742.  
  3743. $default reduce using rule 57 (ForStmt)
  3744.  
  3745.  
  3746. state 218
  3747.  
  3748. 55 ForStmt: T_For '(' Expr ';' Expr ';' Expr ')' . Stmt
  3749.  
  3750. T_Null shift, and go to state 86
  3751. T_This shift, and go to state 87
  3752. T_While shift, and go to state 88
  3753. T_For shift, and go to state 89
  3754. T_If shift, and go to state 90
  3755. T_Return shift, and go to state 91
  3756. T_Break shift, and go to state 92
  3757. T_New shift, and go to state 93
  3758. T_NewArray shift, and go to state 94
  3759. T_Print shift, and go to state 95
  3760. T_ReadInteger shift, and go to state 96
  3761. T_ReadLine shift, and go to state 97
  3762. T_Identifier shift, and go to state 98
  3763. T_StringConstant shift, and go to state 99
  3764. T_IntConstant shift, and go to state 100
  3765. T_DoubleConstant shift, and go to state 101
  3766. T_BoolConstant shift, and go to state 102
  3767. '-' shift, and go to state 103
  3768. '!' shift, and go to state 104
  3769. ';' shift, and go to state 105
  3770. '(' shift, and go to state 106
  3771. '{' shift, and go to state 64
  3772.  
  3773. StmtBlock go to state 108
  3774. Stmt go to state 219
  3775. IfStmt go to state 110
  3776. WhileStmt go to state 111
  3777. ForStmt go to state 112
  3778. ReturnStmt go to state 113
  3779. BreakStmt go to state 114
  3780. PrintStmt go to state 115
  3781. Expr go to state 116
  3782. LValue go to state 117
  3783. Call go to state 118
  3784. Constant go to state 119
  3785.  
  3786.  
  3787. state 219
  3788.  
  3789. 55 ForStmt: T_For '(' Expr ';' Expr ';' Expr ')' Stmt .
  3790.  
  3791. $default reduce using rule 55 (ForStmt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement