Home | History | Annotate | Line # | Download | only in yacc
      1    0  $accept : list $end
      2 
      3    1  list :
      4    2       | list stat '\n'
      5    3       | list error '\n'
      6 
      7    4  stat : expr
      8    5       | LETTER '=' expr
      9 
     10    6  expr : '(' expr ')'
     11    7       | expr OP_ADD expr
     12    8       | expr OP_SUB expr
     13    9       | expr OP_MUL expr
     14   10       | expr OP_DIV expr
     15   11       | expr OP_MOD expr
     16   12       | expr OP_AND expr
     17   13       | expr '|' expr
     18   14       | OP_SUB expr
     19   15       | LETTER
     20   16       | number
     21 
     22   17  number : DIGIT
     23   18         | number DIGIT
     24 
     26 state 0
     27 	$accept : . list $end  (0)
     28 	list : .  (1)
     29 
     30 	.  reduce 1
     31 
     32 	list  goto 1
     33 
     34 
     35 state 1
     36 	$accept : list . $end  (0)
     37 	list : list . stat '\n'  (2)
     38 	list : list . error '\n'  (3)
     39 
     40 	$end  accept
     41 	error  shift 2
     42 	OP_SUB  shift 3
     43 	DIGIT  shift 4
     44 	LETTER  shift 5
     45 	'('  shift 6
     46 	.  error
     47 
     48 	stat  goto 7
     49 	expr  goto 8
     50 	number  goto 9
     51 
     52 
     53 state 2
     54 	list : list error . '\n'  (3)
     55 
     56 	'\n'  shift 10
     57 	.  error
     58 
     59 
     60 state 3
     61 	expr : OP_SUB . expr  (14)
     62 
     63 	OP_SUB  shift 3
     64 	DIGIT  shift 4
     65 	LETTER  shift 11
     66 	'('  shift 6
     67 	.  error
     68 
     69 	expr  goto 12
     70 	number  goto 9
     71 
     72 
     73 state 4
     74 	number : DIGIT .  (17)
     75 
     76 	.  reduce 17
     77 
     78 
     79 state 5
     80 	stat : LETTER . '=' expr  (5)
     81 	expr : LETTER .  (15)
     82 
     83 	'='  shift 13
     84 	OP_ADD  reduce 15
     85 	OP_SUB  reduce 15
     86 	OP_MUL  reduce 15
     87 	OP_DIV  reduce 15
     88 	OP_MOD  reduce 15
     89 	OP_AND  reduce 15
     90 	'|'  reduce 15
     91 	'\n'  reduce 15
     92 
     93 
     94 state 6
     95 	expr : '(' . expr ')'  (6)
     96 
     97 	OP_SUB  shift 3
     98 	DIGIT  shift 4
     99 	LETTER  shift 11
    100 	'('  shift 6
    101 	.  error
    102 
    103 	expr  goto 14
    104 	number  goto 9
    105 
    106 
    107 state 7
    108 	list : list stat . '\n'  (2)
    109 
    110 	'\n'  shift 15
    111 	.  error
    112 
    113 
    114 state 8
    115 	stat : expr .  (4)
    116 	expr : expr . OP_ADD expr  (7)
    117 	expr : expr . OP_SUB expr  (8)
    118 	expr : expr . OP_MUL expr  (9)
    119 	expr : expr . OP_DIV expr  (10)
    120 	expr : expr . OP_MOD expr  (11)
    121 	expr : expr . OP_AND expr  (12)
    122 	expr : expr . '|' expr  (13)
    123 
    124 	OP_ADD  shift 16
    125 	OP_SUB  shift 17
    126 	OP_MUL  shift 18
    127 	OP_DIV  shift 19
    128 	OP_MOD  shift 20
    129 	OP_AND  shift 21
    130 	'|'  shift 22
    131 	'\n'  reduce 4
    132 
    133 
    134 state 9
    135 	expr : number .  (16)
    136 	number : number . DIGIT  (18)
    137 
    138 	DIGIT  shift 23
    139 	OP_ADD  reduce 16
    140 	OP_SUB  reduce 16
    141 	OP_MUL  reduce 16
    142 	OP_DIV  reduce 16
    143 	OP_MOD  reduce 16
    144 	OP_AND  reduce 16
    145 	'|'  reduce 16
    146 	'\n'  reduce 16
    147 	')'  reduce 16
    148 
    149 
    150 state 10
    151 	list : list error '\n' .  (3)
    152 
    153 	.  reduce 3
    154 
    155 
    156 state 11
    157 	expr : LETTER .  (15)
    158 
    159 	.  reduce 15
    160 
    161 
    162 12: shift/reduce conflict (shift 16, reduce 14) on OP_ADD
    163 12: shift/reduce conflict (shift 17, reduce 14) on OP_SUB
    164 12: shift/reduce conflict (shift 18, reduce 14) on OP_MUL
    165 12: shift/reduce conflict (shift 19, reduce 14) on OP_DIV
    166 12: shift/reduce conflict (shift 20, reduce 14) on OP_MOD
    167 12: shift/reduce conflict (shift 21, reduce 14) on OP_AND
    168 state 12
    169 	expr : expr . OP_ADD expr  (7)
    170 	expr : expr . OP_SUB expr  (8)
    171 	expr : expr . OP_MUL expr  (9)
    172 	expr : expr . OP_DIV expr  (10)
    173 	expr : expr . OP_MOD expr  (11)
    174 	expr : expr . OP_AND expr  (12)
    175 	expr : expr . '|' expr  (13)
    176 	expr : OP_SUB expr .  (14)
    177 
    178 	OP_ADD  shift 16
    179 	OP_SUB  shift 17
    180 	OP_MUL  shift 18
    181 	OP_DIV  shift 19
    182 	OP_MOD  shift 20
    183 	OP_AND  shift 21
    184 	'|'  reduce 14
    185 	'\n'  reduce 14
    186 	')'  reduce 14
    187 
    188 
    189 state 13
    190 	stat : LETTER '=' . expr  (5)
    191 
    192 	OP_SUB  shift 3
    193 	DIGIT  shift 4
    194 	LETTER  shift 11
    195 	'('  shift 6
    196 	.  error
    197 
    198 	expr  goto 24
    199 	number  goto 9
    200 
    201 
    202 state 14
    203 	expr : '(' expr . ')'  (6)
    204 	expr : expr . OP_ADD expr  (7)
    205 	expr : expr . OP_SUB expr  (8)
    206 	expr : expr . OP_MUL expr  (9)
    207 	expr : expr . OP_DIV expr  (10)
    208 	expr : expr . OP_MOD expr  (11)
    209 	expr : expr . OP_AND expr  (12)
    210 	expr : expr . '|' expr  (13)
    211 
    212 	OP_ADD  shift 16
    213 	OP_SUB  shift 17
    214 	OP_MUL  shift 18
    215 	OP_DIV  shift 19
    216 	OP_MOD  shift 20
    217 	OP_AND  shift 21
    218 	'|'  shift 22
    219 	')'  shift 25
    220 	.  error
    221 
    222 
    223 state 15
    224 	list : list stat '\n' .  (2)
    225 
    226 	.  reduce 2
    227 
    228 
    229 state 16
    230 	expr : expr OP_ADD . expr  (7)
    231 
    232 	OP_SUB  shift 3
    233 	DIGIT  shift 4
    234 	LETTER  shift 11
    235 	'('  shift 6
    236 	.  error
    237 
    238 	expr  goto 26
    239 	number  goto 9
    240 
    241 
    242 state 17
    243 	expr : expr OP_SUB . expr  (8)
    244 
    245 	OP_SUB  shift 3
    246 	DIGIT  shift 4
    247 	LETTER  shift 11
    248 	'('  shift 6
    249 	.  error
    250 
    251 	expr  goto 27
    252 	number  goto 9
    253 
    254 
    255 state 18
    256 	expr : expr OP_MUL . expr  (9)
    257 
    258 	OP_SUB  shift 3
    259 	DIGIT  shift 4
    260 	LETTER  shift 11
    261 	'('  shift 6
    262 	.  error
    263 
    264 	expr  goto 28
    265 	number  goto 9
    266 
    267 
    268 state 19
    269 	expr : expr OP_DIV . expr  (10)
    270 
    271 	OP_SUB  shift 3
    272 	DIGIT  shift 4
    273 	LETTER  shift 11
    274 	'('  shift 6
    275 	.  error
    276 
    277 	expr  goto 29
    278 	number  goto 9
    279 
    280 
    281 state 20
    282 	expr : expr OP_MOD . expr  (11)
    283 
    284 	OP_SUB  shift 3
    285 	DIGIT  shift 4
    286 	LETTER  shift 11
    287 	'('  shift 6
    288 	.  error
    289 
    290 	expr  goto 30
    291 	number  goto 9
    292 
    293 
    294 state 21
    295 	expr : expr OP_AND . expr  (12)
    296 
    297 	OP_SUB  shift 3
    298 	DIGIT  shift 4
    299 	LETTER  shift 11
    300 	'('  shift 6
    301 	.  error
    302 
    303 	expr  goto 31
    304 	number  goto 9
    305 
    306 
    307 state 22
    308 	expr : expr '|' . expr  (13)
    309 
    310 	OP_SUB  shift 3
    311 	DIGIT  shift 4
    312 	LETTER  shift 11
    313 	'('  shift 6
    314 	.  error
    315 
    316 	expr  goto 32
    317 	number  goto 9
    318 
    319 
    320 state 23
    321 	number : number DIGIT .  (18)
    322 
    323 	.  reduce 18
    324 
    325 
    326 state 24
    327 	stat : LETTER '=' expr .  (5)
    328 	expr : expr . OP_ADD expr  (7)
    329 	expr : expr . OP_SUB expr  (8)
    330 	expr : expr . OP_MUL expr  (9)
    331 	expr : expr . OP_DIV expr  (10)
    332 	expr : expr . OP_MOD expr  (11)
    333 	expr : expr . OP_AND expr  (12)
    334 	expr : expr . '|' expr  (13)
    335 
    336 	OP_ADD  shift 16
    337 	OP_SUB  shift 17
    338 	OP_MUL  shift 18
    339 	OP_DIV  shift 19
    340 	OP_MOD  shift 20
    341 	OP_AND  shift 21
    342 	'|'  shift 22
    343 	'\n'  reduce 5
    344 
    345 
    346 state 25
    347 	expr : '(' expr ')' .  (6)
    348 
    349 	.  reduce 6
    350 
    351 
    352 26: shift/reduce conflict (shift 16, reduce 7) on OP_ADD
    353 26: shift/reduce conflict (shift 17, reduce 7) on OP_SUB
    354 26: shift/reduce conflict (shift 18, reduce 7) on OP_MUL
    355 26: shift/reduce conflict (shift 19, reduce 7) on OP_DIV
    356 26: shift/reduce conflict (shift 20, reduce 7) on OP_MOD
    357 26: shift/reduce conflict (shift 21, reduce 7) on OP_AND
    358 26: shift/reduce conflict (shift 22, reduce 7) on '|'
    359 state 26
    360 	expr : expr . OP_ADD expr  (7)
    361 	expr : expr OP_ADD expr .  (7)
    362 	expr : expr . OP_SUB expr  (8)
    363 	expr : expr . OP_MUL expr  (9)
    364 	expr : expr . OP_DIV expr  (10)
    365 	expr : expr . OP_MOD expr  (11)
    366 	expr : expr . OP_AND expr  (12)
    367 	expr : expr . '|' expr  (13)
    368 
    369 	OP_ADD  shift 16
    370 	OP_SUB  shift 17
    371 	OP_MUL  shift 18
    372 	OP_DIV  shift 19
    373 	OP_MOD  shift 20
    374 	OP_AND  shift 21
    375 	'|'  shift 22
    376 	'\n'  reduce 7
    377 	')'  reduce 7
    378 
    379 
    380 27: shift/reduce conflict (shift 16, reduce 8) on OP_ADD
    381 27: shift/reduce conflict (shift 17, reduce 8) on OP_SUB
    382 27: shift/reduce conflict (shift 18, reduce 8) on OP_MUL
    383 27: shift/reduce conflict (shift 19, reduce 8) on OP_DIV
    384 27: shift/reduce conflict (shift 20, reduce 8) on OP_MOD
    385 27: shift/reduce conflict (shift 21, reduce 8) on OP_AND
    386 27: shift/reduce conflict (shift 22, reduce 8) on '|'
    387 state 27
    388 	expr : expr . OP_ADD expr  (7)
    389 	expr : expr . OP_SUB expr  (8)
    390 	expr : expr OP_SUB expr .  (8)
    391 	expr : expr . OP_MUL expr  (9)
    392 	expr : expr . OP_DIV expr  (10)
    393 	expr : expr . OP_MOD expr  (11)
    394 	expr : expr . OP_AND expr  (12)
    395 	expr : expr . '|' expr  (13)
    396 
    397 	OP_ADD  shift 16
    398 	OP_SUB  shift 17
    399 	OP_MUL  shift 18
    400 	OP_DIV  shift 19
    401 	OP_MOD  shift 20
    402 	OP_AND  shift 21
    403 	'|'  shift 22
    404 	'\n'  reduce 8
    405 	')'  reduce 8
    406 
    407 
    408 28: shift/reduce conflict (shift 16, reduce 9) on OP_ADD
    409 28: shift/reduce conflict (shift 17, reduce 9) on OP_SUB
    410 28: shift/reduce conflict (shift 18, reduce 9) on OP_MUL
    411 28: shift/reduce conflict (shift 19, reduce 9) on OP_DIV
    412 28: shift/reduce conflict (shift 20, reduce 9) on OP_MOD
    413 28: shift/reduce conflict (shift 21, reduce 9) on OP_AND
    414 28: shift/reduce conflict (shift 22, reduce 9) on '|'
    415 state 28
    416 	expr : expr . OP_ADD expr  (7)
    417 	expr : expr . OP_SUB expr  (8)
    418 	expr : expr . OP_MUL expr  (9)
    419 	expr : expr OP_MUL expr .  (9)
    420 	expr : expr . OP_DIV expr  (10)
    421 	expr : expr . OP_MOD expr  (11)
    422 	expr : expr . OP_AND expr  (12)
    423 	expr : expr . '|' expr  (13)
    424 
    425 	OP_ADD  shift 16
    426 	OP_SUB  shift 17
    427 	OP_MUL  shift 18
    428 	OP_DIV  shift 19
    429 	OP_MOD  shift 20
    430 	OP_AND  shift 21
    431 	'|'  shift 22
    432 	'\n'  reduce 9
    433 	')'  reduce 9
    434 
    435 
    436 29: shift/reduce conflict (shift 16, reduce 10) on OP_ADD
    437 29: shift/reduce conflict (shift 17, reduce 10) on OP_SUB
    438 29: shift/reduce conflict (shift 18, reduce 10) on OP_MUL
    439 29: shift/reduce conflict (shift 19, reduce 10) on OP_DIV
    440 29: shift/reduce conflict (shift 20, reduce 10) on OP_MOD
    441 29: shift/reduce conflict (shift 21, reduce 10) on OP_AND
    442 29: shift/reduce conflict (shift 22, reduce 10) on '|'
    443 state 29
    444 	expr : expr . OP_ADD expr  (7)
    445 	expr : expr . OP_SUB expr  (8)
    446 	expr : expr . OP_MUL expr  (9)
    447 	expr : expr . OP_DIV expr  (10)
    448 	expr : expr OP_DIV expr .  (10)
    449 	expr : expr . OP_MOD expr  (11)
    450 	expr : expr . OP_AND expr  (12)
    451 	expr : expr . '|' expr  (13)
    452 
    453 	OP_ADD  shift 16
    454 	OP_SUB  shift 17
    455 	OP_MUL  shift 18
    456 	OP_DIV  shift 19
    457 	OP_MOD  shift 20
    458 	OP_AND  shift 21
    459 	'|'  shift 22
    460 	'\n'  reduce 10
    461 	')'  reduce 10
    462 
    463 
    464 30: shift/reduce conflict (shift 16, reduce 11) on OP_ADD
    465 30: shift/reduce conflict (shift 17, reduce 11) on OP_SUB
    466 30: shift/reduce conflict (shift 18, reduce 11) on OP_MUL
    467 30: shift/reduce conflict (shift 19, reduce 11) on OP_DIV
    468 30: shift/reduce conflict (shift 20, reduce 11) on OP_MOD
    469 30: shift/reduce conflict (shift 21, reduce 11) on OP_AND
    470 30: shift/reduce conflict (shift 22, reduce 11) on '|'
    471 state 30
    472 	expr : expr . OP_ADD expr  (7)
    473 	expr : expr . OP_SUB expr  (8)
    474 	expr : expr . OP_MUL expr  (9)
    475 	expr : expr . OP_DIV expr  (10)
    476 	expr : expr . OP_MOD expr  (11)
    477 	expr : expr OP_MOD expr .  (11)
    478 	expr : expr . OP_AND expr  (12)
    479 	expr : expr . '|' expr  (13)
    480 
    481 	OP_ADD  shift 16
    482 	OP_SUB  shift 17
    483 	OP_MUL  shift 18
    484 	OP_DIV  shift 19
    485 	OP_MOD  shift 20
    486 	OP_AND  shift 21
    487 	'|'  shift 22
    488 	'\n'  reduce 11
    489 	')'  reduce 11
    490 
    491 
    492 31: shift/reduce conflict (shift 16, reduce 12) on OP_ADD
    493 31: shift/reduce conflict (shift 17, reduce 12) on OP_SUB
    494 31: shift/reduce conflict (shift 18, reduce 12) on OP_MUL
    495 31: shift/reduce conflict (shift 19, reduce 12) on OP_DIV
    496 31: shift/reduce conflict (shift 20, reduce 12) on OP_MOD
    497 31: shift/reduce conflict (shift 21, reduce 12) on OP_AND
    498 31: shift/reduce conflict (shift 22, reduce 12) on '|'
    499 state 31
    500 	expr : expr . OP_ADD expr  (7)
    501 	expr : expr . OP_SUB expr  (8)
    502 	expr : expr . OP_MUL expr  (9)
    503 	expr : expr . OP_DIV expr  (10)
    504 	expr : expr . OP_MOD expr  (11)
    505 	expr : expr . OP_AND expr  (12)
    506 	expr : expr OP_AND expr .  (12)
    507 	expr : expr . '|' expr  (13)
    508 
    509 	OP_ADD  shift 16
    510 	OP_SUB  shift 17
    511 	OP_MUL  shift 18
    512 	OP_DIV  shift 19
    513 	OP_MOD  shift 20
    514 	OP_AND  shift 21
    515 	'|'  shift 22
    516 	'\n'  reduce 12
    517 	')'  reduce 12
    518 
    519 
    520 32: shift/reduce conflict (shift 16, reduce 13) on OP_ADD
    521 32: shift/reduce conflict (shift 17, reduce 13) on OP_SUB
    522 32: shift/reduce conflict (shift 18, reduce 13) on OP_MUL
    523 32: shift/reduce conflict (shift 19, reduce 13) on OP_DIV
    524 32: shift/reduce conflict (shift 20, reduce 13) on OP_MOD
    525 32: shift/reduce conflict (shift 21, reduce 13) on OP_AND
    526 state 32
    527 	expr : expr . OP_ADD expr  (7)
    528 	expr : expr . OP_SUB expr  (8)
    529 	expr : expr . OP_MUL expr  (9)
    530 	expr : expr . OP_DIV expr  (10)
    531 	expr : expr . OP_MOD expr  (11)
    532 	expr : expr . OP_AND expr  (12)
    533 	expr : expr . '|' expr  (13)
    534 	expr : expr '|' expr .  (13)
    535 
    536 	OP_ADD  shift 16
    537 	OP_SUB  shift 17
    538 	OP_MUL  shift 18
    539 	OP_DIV  shift 19
    540 	OP_MOD  shift 20
    541 	OP_AND  shift 21
    542 	'|'  reduce 13
    543 	'\n'  reduce 13
    544 	')'  reduce 13
    545 
    546 
    547 State 12 contains 6 shift/reduce conflicts.
    548 State 26 contains 7 shift/reduce conflicts.
    549 State 27 contains 7 shift/reduce conflicts.
    550 State 28 contains 7 shift/reduce conflicts.
    551 State 29 contains 7 shift/reduce conflicts.
    552 State 30 contains 7 shift/reduce conflicts.
    553 State 31 contains 7 shift/reduce conflicts.
    554 State 32 contains 6 shift/reduce conflicts.
    555 
    556 
    557 28 terminals, 5 nonterminals
    558 19 grammar rules, 33 states
    559