Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. State 17 conflicts: 2 shift/reduce
  2. State 19 conflicts: 2 shift/reduce
  3. State 57 conflicts: 8 shift/reduce
  4. State 60 conflicts: 8 shift/reduce
  5. State 61 conflicts: 8 shift/reduce
  6. State 62 conflicts: 8 shift/reduce
  7. State 63 conflicts: 8 shift/reduce
  8. State 96 conflicts: 8 shift/reduce
  9. State 103 conflicts: 10 shift/reduce
  10. State 126 conflicts: 8 shift/reduce
  11. State 130 conflicts: 10 shift/reduce
  12. State 131 conflicts: 10 shift/reduce
  13. State 132 conflicts: 10 shift/reduce
  14. State 133 conflicts: 10 shift/reduce
  15. State 134 conflicts: 10 shift/reduce
  16. State 135 conflicts: 10 shift/reduce
  17. State 136 conflicts: 10 shift/reduce
  18. State 137 conflicts: 10 shift/reduce
  19. State 138 conflicts: 10 shift/reduce
  20. State 139 conflicts: 10 shift/reduce
  21.  
  22. 4 DECLARATION: INT IDENTIFIER ';' . DECLARATION
  23. 6 | INT IDENTIFIER ';' .
  24.  
  25. INT shift, and go to state 29
  26. FLOAT shift, and go to state 30
  27.  
  28. INT [reduce using rule 6 (DECLARATION)]
  29. FLOAT [reduce using rule 6 (DECLARATION)]
  30. $default reduce using rule 6 (DECLARATION)
  31.  
  32. DECLARATION go to state 31
  33.  
  34. DECLARATION :
  35. INT IDENTIFIER ';' DECLARATION %prec p10 {
  36. struct DECLARATION *decl = (struct DECLARATION *) malloc (sizeof (struct DECLARATION));
  37. decl->t = eInt;
  38. decl->id = $2;
  39. decl->prev = $4;
  40. $$ = decl;
  41. }
  42. |
  43. FLOAT IDENTIFIER ';' DECLARATION {
  44. struct DECLARATION *decl = (struct DECLARATION *) malloc (sizeof (struct DECLARATION));
  45. decl->t = eFloat;
  46. decl->id = $2;
  47. decl->prev = $4;
  48. $$ = decl;
  49. }
  50. |
  51. INT IDENTIFIER ';' {
  52. struct DECLARATION *decl = (struct DECLARATION *) malloc (sizeof (struct DECLARATION));
  53. decl->t = eInt;
  54. decl->id = $2;
  55. decl->prev = NULL;
  56. $$ = decl;
  57. }
  58. |
  59. FLOAT IDENTIFIER ';' {
  60. struct DECLARATION *decl = (struct DECLARATION *) malloc (sizeof (struct DECLARATION));
  61. decl->t = eFloat;
  62. decl->id = $2;
  63. decl->prev = NULL;
  64. $$ = decl;
  65. }
  66. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement