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