-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser.out
More file actions
195 lines (136 loc) · 5.85 KB
/
parser.out
File metadata and controls
195 lines (136 loc) · 5.85 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
Created by PLY version 3.11 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> command_line
Rule 1 command_line -> job
Rule 2 command_line -> job ;
Rule 3 command_line -> job ; command_line
Rule 4 job -> command
Rule 5 job -> job | command
Rule 6 command -> simple_command
Rule 7 command -> command REDIRECT
Rule 8 command -> command REDIRECT TOKEN
Rule 9 simple_command -> TOKEN
Rule 10 simple_command -> simple_command TOKEN
Terminals, with rules where they appear
; : 2 3
REDIRECT : 7 8
TOKEN : 8 9 10
error :
| : 5
Nonterminals, with rules where they appear
command : 4 5 7 8
command_line : 3 0
job : 1 2 3 5
simple_command : 6 10
Parsing method: LALR
state 0
(0) S' -> . command_line
(1) command_line -> . job
(2) command_line -> . job ;
(3) command_line -> . job ; command_line
(4) job -> . command
(5) job -> . job | command
(6) command -> . simple_command
(7) command -> . command REDIRECT
(8) command -> . command REDIRECT TOKEN
(9) simple_command -> . TOKEN
(10) simple_command -> . simple_command TOKEN
TOKEN shift and go to state 5
command_line shift and go to state 1
job shift and go to state 2
command shift and go to state 3
simple_command shift and go to state 4
state 1
(0) S' -> command_line .
state 2
(1) command_line -> job .
(2) command_line -> job . ;
(3) command_line -> job . ; command_line
(5) job -> job . | command
$end reduce using rule 1 (command_line -> job .)
; shift and go to state 6
| shift and go to state 7
state 3
(4) job -> command .
(7) command -> command . REDIRECT
(8) command -> command . REDIRECT TOKEN
; reduce using rule 4 (job -> command .)
| reduce using rule 4 (job -> command .)
$end reduce using rule 4 (job -> command .)
REDIRECT shift and go to state 8
state 4
(6) command -> simple_command .
(10) simple_command -> simple_command . TOKEN
REDIRECT reduce using rule 6 (command -> simple_command .)
; reduce using rule 6 (command -> simple_command .)
| reduce using rule 6 (command -> simple_command .)
$end reduce using rule 6 (command -> simple_command .)
TOKEN shift and go to state 9
state 5
(9) simple_command -> TOKEN .
TOKEN reduce using rule 9 (simple_command -> TOKEN .)
REDIRECT reduce using rule 9 (simple_command -> TOKEN .)
; reduce using rule 9 (simple_command -> TOKEN .)
| reduce using rule 9 (simple_command -> TOKEN .)
$end reduce using rule 9 (simple_command -> TOKEN .)
state 6
(2) command_line -> job ; .
(3) command_line -> job ; . command_line
(1) command_line -> . job
(2) command_line -> . job ;
(3) command_line -> . job ; command_line
(4) job -> . command
(5) job -> . job | command
(6) command -> . simple_command
(7) command -> . command REDIRECT
(8) command -> . command REDIRECT TOKEN
(9) simple_command -> . TOKEN
(10) simple_command -> . simple_command TOKEN
$end reduce using rule 2 (command_line -> job ; .)
TOKEN shift and go to state 5
job shift and go to state 2
command_line shift and go to state 10
command shift and go to state 3
simple_command shift and go to state 4
state 7
(5) job -> job | . command
(6) command -> . simple_command
(7) command -> . command REDIRECT
(8) command -> . command REDIRECT TOKEN
(9) simple_command -> . TOKEN
(10) simple_command -> . simple_command TOKEN
TOKEN shift and go to state 5
command shift and go to state 11
simple_command shift and go to state 4
state 8
(7) command -> command REDIRECT .
(8) command -> command REDIRECT . TOKEN
REDIRECT reduce using rule 7 (command -> command REDIRECT .)
; reduce using rule 7 (command -> command REDIRECT .)
| reduce using rule 7 (command -> command REDIRECT .)
$end reduce using rule 7 (command -> command REDIRECT .)
TOKEN shift and go to state 12
state 9
(10) simple_command -> simple_command TOKEN .
TOKEN reduce using rule 10 (simple_command -> simple_command TOKEN .)
REDIRECT reduce using rule 10 (simple_command -> simple_command TOKEN .)
; reduce using rule 10 (simple_command -> simple_command TOKEN .)
| reduce using rule 10 (simple_command -> simple_command TOKEN .)
$end reduce using rule 10 (simple_command -> simple_command TOKEN .)
state 10
(3) command_line -> job ; command_line .
$end reduce using rule 3 (command_line -> job ; command_line .)
state 11
(5) job -> job | command .
(7) command -> command . REDIRECT
(8) command -> command . REDIRECT TOKEN
; reduce using rule 5 (job -> job | command .)
| reduce using rule 5 (job -> job | command .)
$end reduce using rule 5 (job -> job | command .)
REDIRECT shift and go to state 8
state 12
(8) command -> command REDIRECT TOKEN .
REDIRECT reduce using rule 8 (command -> command REDIRECT TOKEN .)
; reduce using rule 8 (command -> command REDIRECT TOKEN .)
| reduce using rule 8 (command -> command REDIRECT TOKEN .)
$end reduce using rule 8 (command -> command REDIRECT TOKEN .)