-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExpList.output
80 lines (50 loc) · 1.01 KB
/
ExpList.output
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
Rules:
------
0: $start -> S $end
1: S -> S x
2: S -> x
3: x -> NUM
4: x -> x OP NUM
States:
-------
State 0:
$start -> . S $end (Rule 0)
NUM shift, and go to state 1
S go to state 2
x go to state 3
State 1:
x -> NUM . (Rule 3)
$default reduce using rule 3 (x)
State 2:
$start -> S . $end (Rule 0)
S -> S . x (Rule 1)
$end shift, and go to state 4
NUM shift, and go to state 1
x go to state 5
State 3:
S -> x . (Rule 2)
x -> x . OP NUM (Rule 4)
OP shift, and go to state 6
$end reduce using rule 2 (S)
NUM reduce using rule 2 (S)
State 4:
$start -> S $end . (Rule 0)
$default accept
State 5:
S -> S x . (Rule 1)
x -> x . OP NUM (Rule 4)
OP shift, and go to state 6
$end reduce using rule 1 (S)
NUM reduce using rule 1 (S)
State 6:
x -> x OP . NUM (Rule 4)
NUM shift, and go to state 7
State 7:
x -> x OP NUM . (Rule 4)
$default reduce using rule 4 (x)
Summary:
--------
Number of rules : 5
Number of terminals : 3
Number of non-terminals : 3
Number of states : 8