This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parser.out
71 lines (43 loc) · 1.66 KB
/
parser.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Created by PLY version 3.11 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> expression
Rule 1 expression -> expression example expression
Rule 2 expression -> NUMBER
Terminals, with rules where they appear
NUMBER : 2
error :
example : 1
Nonterminals, with rules where they appear
expression : 1 1 0
Parsing method: LALR
state 0
(0) S' -> . expression
(1) expression -> . expression example expression
(2) expression -> . NUMBER
NUMBER shift and go to state 2
expression shift and go to state 1
state 1
(0) S' -> expression .
(1) expression -> expression . example expression
example shift and go to state 3
state 2
(2) expression -> NUMBER .
example reduce using rule 2 (expression -> NUMBER .)
$end reduce using rule 2 (expression -> NUMBER .)
state 3
(1) expression -> expression example . expression
(1) expression -> . expression example expression
(2) expression -> . NUMBER
NUMBER shift and go to state 2
expression shift and go to state 4
state 4
(1) expression -> expression example expression .
(1) expression -> expression . example expression
! shift/reduce conflict for example resolved as shift
$end reduce using rule 1 (expression -> expression example expression .)
example shift and go to state 3
! example [ reduce using rule 1 (expression -> expression example expression .) ]
WARNING:
WARNING: Conflicts:
WARNING:
WARNING: shift/reduce conflict for example in state 4 resolved as shift