-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser.out
More file actions
87 lines (53 loc) · 1.67 KB
/
parser.out
File metadata and controls
87 lines (53 loc) · 1.67 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Created by PLY version 3.8 (http://www.dabeaz.com/ply)
Unused terminals:
ignore
Grammar
Rule 0 S' -> module
Rule 1 module -> expr
Rule 2 expr -> expr ADD expr
Rule 3 expr -> INT
Terminals, with rules where they appear
ADD : 2
INT : 3
error :
ignore :
Nonterminals, with rules where they appear
expr : 1 2 2
module : 0
Parsing method: LALR
state 0
(0) S' -> . module
(1) module -> . expr
(2) expr -> . expr ADD expr
(3) expr -> . INT
INT shift and go to state 1
expr shift and go to state 2
module shift and go to state 3
state 1
(3) expr -> INT .
ADD reduce using rule 3 (expr -> INT .)
$end reduce using rule 3 (expr -> INT .)
state 2
(1) module -> expr .
(2) expr -> expr . ADD expr
$end reduce using rule 1 (module -> expr .)
ADD shift and go to state 4
state 3
(0) S' -> module .
state 4
(2) expr -> expr ADD . expr
(2) expr -> . expr ADD expr
(3) expr -> . INT
INT shift and go to state 1
expr shift and go to state 5
state 5
(2) expr -> expr ADD expr .
(2) expr -> expr . ADD expr
! shift/reduce conflict for ADD resolved as shift
$end reduce using rule 2 (expr -> expr ADD expr .)
ADD shift and go to state 4
! ADD [ reduce using rule 2 (expr -> expr ADD expr .) ]
WARNING:
WARNING: Conflicts:
WARNING:
WARNING: shift/reduce conflict for ADD in state 5 resolved as shift