1 0 $accept : declaration $end 2 3 1 declaration : class type namelist '(' class ',' type ')' 4 2 | type locnamelist '(' class ')' 5 6 3 class : GLOBAL 7 4 | LOCAL 8 9 5 type : REAL 10 6 | INTEGER 11 12 7 namelist : namelist NAME 13 8 | NAME 14 15 9 locnamelist : namelist '(' LOCAL ',' type ')' 16 17state 0 18 $accept : . declaration $end (0) 19 20 GLOBAL shift 1 21 LOCAL shift 2 22 REAL shift 3 23 INTEGER shift 4 24 . error 25 26 declaration goto 5 27 class goto 6 28 type goto 7 29 30 31state 1 32 class : GLOBAL . (3) 33 34 . reduce 3 35 36 37state 2 38 class : LOCAL . (4) 39 40 . reduce 4 41 42 43state 3 44 type : REAL . (5) 45 46 . reduce 5 47 48 49state 4 50 type : INTEGER . (6) 51 52 . reduce 6 53 54 55state 5 56 $accept : declaration . $end (0) 57 58 $end accept 59 60 61state 6 62 declaration : class . type namelist '(' class ',' type ')' (1) 63 64 REAL shift 3 65 INTEGER shift 4 66 . error 67 68 type goto 8 69 70 71state 7 72 declaration : type . locnamelist '(' class ')' (2) 73 74 NAME shift 9 75 . error 76 77 locnamelist goto 10 78 namelist goto 11 79 80 81state 8 82 declaration : class type . namelist '(' class ',' type ')' (1) 83 84 NAME shift 9 85 . error 86 87 namelist goto 12 88 89 90state 9 91 namelist : NAME . (8) 92 93 . reduce 8 94 95 96state 10 97 declaration : type locnamelist . '(' class ')' (2) 98 99 '(' shift 13 100 . error 101 102 103state 11 104 namelist : namelist . NAME (7) 105 locnamelist : namelist . '(' LOCAL ',' type ')' (9) 106 107 NAME shift 14 108 '(' shift 15 109 . error 110 111 112state 12 113 declaration : class type namelist . '(' class ',' type ')' (1) 114 namelist : namelist . NAME (7) 115 116 NAME shift 14 117 '(' shift 16 118 . error 119 120 121state 13 122 declaration : type locnamelist '(' . class ')' (2) 123 124 GLOBAL shift 1 125 LOCAL shift 2 126 . error 127 128 class goto 17 129 130 131state 14 132 namelist : namelist NAME . (7) 133 134 . reduce 7 135 136 137state 15 138 locnamelist : namelist '(' . LOCAL ',' type ')' (9) 139 140 LOCAL shift 18 141 . error 142 143 144state 16 145 declaration : class type namelist '(' . class ',' type ')' (1) 146 147 GLOBAL shift 1 148 LOCAL shift 2 149 . error 150 151 class goto 19 152 153 154state 17 155 declaration : type locnamelist '(' class . ')' (2) 156 157 ')' shift 20 158 . error 159 160 161state 18 162 locnamelist : namelist '(' LOCAL . ',' type ')' (9) 163 164 ',' shift 21 165 . error 166 167 168state 19 169 declaration : class type namelist '(' class . ',' type ')' (1) 170 171 ',' shift 22 172 . error 173 174 175state 20 176 declaration : type locnamelist '(' class ')' . (2) 177 178 . reduce 2 179 180 181state 21 182 locnamelist : namelist '(' LOCAL ',' . type ')' (9) 183 184 REAL shift 3 185 INTEGER shift 4 186 . error 187 188 type goto 23 189 190 191state 22 192 declaration : class type namelist '(' class ',' . type ')' (1) 193 194 REAL shift 3 195 INTEGER shift 4 196 . error 197 198 type goto 24 199 200 201state 23 202 locnamelist : namelist '(' LOCAL ',' type . ')' (9) 203 204 ')' shift 25 205 . error 206 207 208state 24 209 declaration : class type namelist '(' class ',' type . ')' (1) 210 211 ')' shift 26 212 . error 213 214 215state 25 216 locnamelist : namelist '(' LOCAL ',' type ')' . (9) 217 218 . reduce 9 219 220 221state 26 222 declaration : class type namelist '(' class ',' type ')' . (1) 223 224 . reduce 1 225 226 22710 terminals, 6 nonterminals 22810 grammar rules, 27 states 229 230grammar parser grammar 231symbol# value# symbol 232 0 0 $end 233 1 256 error 234 2 257 GLOBAL 235 3 258 LOCAL 236 4 259 REAL 237 5 260 INTEGER 238 6 261 NAME 239 7 40 '(' 240 8 44 ',' 241 9 41 ')' 242 10 262 $accept 243 11 263 declaration 244 12 264 locnamelist 245 13 265 class 246 14 266 type 247 15 267 namelist 248