File: parsedate.output

package info (click to toggle)
php3 3%3A3.0.18-0potato1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 17,736 kB
  • ctags: 11,198
  • sloc: ansic: 108,120; sh: 2,512; php: 2,024; yacc: 1,887; makefile: 1,038; perl: 537; pascal: 238; awk: 90; cpp: 28; sql: 11
file content (509 lines) | stat: -rw-r--r-- 9,576 bytes parent folder | download | duplicates (3)
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
State 5 contains 1 shift/reduce conflict.
State 7 contains 1 shift/reduce conflict.
State 15 contains 1 shift/reduce conflict.
State 23 contains 1 shift/reduce conflict.
State 29 contains 1 shift/reduce conflict.
State 39 contains 1 shift/reduce conflict.

Grammar
rule 1    spec ->		/* empty */
rule 2    spec -> spec item
rule 3    item -> time
rule 4    item -> time zone
rule 5    item -> date
rule 6    item -> rel
rule 7    time -> tUNUMBER o_merid
rule 8    time -> tUNUMBER ':' tUNUMBER o_merid
rule 9    time -> tUNUMBER ':' tUNUMBER numzone
rule 10   time -> tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid
rule 11   time -> tUNUMBER ':' tUNUMBER ':' tUNUMBER numzone
rule 12   zone -> tZONE
rule 13   zone -> tDAYZONE
rule 14   zone -> tZONE numzone
rule 15   zone -> numzone
rule 16   numzone -> tSNUMBER
rule 17   date -> tUNUMBER '/' tUNUMBER
rule 18   date -> tUNUMBER '/' tUNUMBER '/' tUNUMBER
rule 19   date -> tMONTH tUNUMBER
rule 20   date -> tMONTH tUNUMBER ',' tUNUMBER
rule 21   date -> tUNUMBER tMONTH
rule 22   date -> tUNUMBER tMONTH tUNUMBER
rule 23   date -> tDAY ',' tUNUMBER tMONTH tUNUMBER
rule 24   rel -> tSNUMBER tSEC_UNIT
rule 25   rel -> tUNUMBER tSEC_UNIT
rule 26   rel -> tSNUMBER tMONTH_UNIT
rule 27   rel -> tUNUMBER tMONTH_UNIT
rule 28   o_merid ->		/* empty */
rule 29   o_merid -> tMERIDIAN

Terminals, with rules where they appear

$ (-1)
',' (44) 20 23
'/' (47) 17 18
':' (58) 8 9 10 11
error (256)
tDAY (257) 23
tDAYZONE (258) 13
tMERIDIAN (259) 29
tMONTH (260) 19 20 21 22 23
tMONTH_UNIT (261) 26 27
tSEC_UNIT (262) 24 25
tSNUMBER (263) 16 24 26
tUNUMBER (264) 7 8 9 10 11 17 18 19 20 21 22 23 25 27
tZONE (265) 12 14

Nonterminals, with rules where they appear

spec (15)
    on left: 1 2, on right: 2
item (16)
    on left: 3 4 5 6, on right: 2
time (17)
    on left: 7 8 9 10 11, on right: 3 4
zone (18)
    on left: 12 13 14 15, on right: 4
numzone (19)
    on left: 16, on right: 9 11 14 15
date (20)
    on left: 17 18 19 20 21 22 23, on right: 5
rel (21)
    on left: 24 25 26 27, on right: 6
o_merid (22)
    on left: 28 29, on right: 7 8 10


state 0

    $default	reduce using rule 1 (spec)

    spec	go to state 1



state 1

    spec  ->  spec . item   (rule 2)

    $   	go to state 43
    tDAY	shift, and go to state 2
    tMONTH	shift, and go to state 3
    tSNUMBER	shift, and go to state 4
    tUNUMBER	shift, and go to state 5

    item	go to state 6
    time	go to state 7
    date	go to state 8
    rel 	go to state 9



state 2

    date  ->  tDAY . ',' tUNUMBER tMONTH tUNUMBER   (rule 23)

    ',' 	shift, and go to state 10



state 3

    date  ->  tMONTH . tUNUMBER   (rule 19)
    date  ->  tMONTH . tUNUMBER ',' tUNUMBER   (rule 20)

    tUNUMBER	shift, and go to state 11



state 4

    rel  ->  tSNUMBER . tSEC_UNIT   (rule 24)
    rel  ->  tSNUMBER . tMONTH_UNIT   (rule 26)

    tMONTH_UNIT	shift, and go to state 12
    tSEC_UNIT	shift, and go to state 13



state 5

    time  ->  tUNUMBER . o_merid   (rule 7)
    time  ->  tUNUMBER . ':' tUNUMBER o_merid   (rule 8)
    time  ->  tUNUMBER . ':' tUNUMBER numzone   (rule 9)
    time  ->  tUNUMBER . ':' tUNUMBER ':' tUNUMBER o_merid   (rule 10)
    time  ->  tUNUMBER . ':' tUNUMBER ':' tUNUMBER numzone   (rule 11)
    date  ->  tUNUMBER . '/' tUNUMBER   (rule 17)
    date  ->  tUNUMBER . '/' tUNUMBER '/' tUNUMBER   (rule 18)
    date  ->  tUNUMBER . tMONTH   (rule 21)
    date  ->  tUNUMBER . tMONTH tUNUMBER   (rule 22)
    rel  ->  tUNUMBER . tSEC_UNIT   (rule 25)
    rel  ->  tUNUMBER . tMONTH_UNIT   (rule 27)

    tMERIDIAN	shift, and go to state 14
    tMONTH	shift, and go to state 15
    tMONTH_UNIT	shift, and go to state 16
    tSEC_UNIT	shift, and go to state 17
    ':' 	shift, and go to state 18
    '/' 	shift, and go to state 19

    tMONTH	[reduce using rule 28 (o_merid)]
    $default	reduce using rule 28 (o_merid)

    o_merid	go to state 20



state 6

    spec  ->  spec item .   (rule 2)

    $default	reduce using rule 2 (spec)



state 7

    item  ->  time .   (rule 3)
    item  ->  time . zone   (rule 4)

    tDAYZONE	shift, and go to state 21
    tSNUMBER	shift, and go to state 22
    tZONE	shift, and go to state 23

    tSNUMBER	[reduce using rule 3 (item)]
    $default	reduce using rule 3 (item)

    zone	go to state 24
    numzone	go to state 25



state 8

    item  ->  date .   (rule 5)

    $default	reduce using rule 5 (item)



state 9

    item  ->  rel .   (rule 6)

    $default	reduce using rule 6 (item)



state 10

    date  ->  tDAY ',' . tUNUMBER tMONTH tUNUMBER   (rule 23)

    tUNUMBER	shift, and go to state 26



state 11

    date  ->  tMONTH tUNUMBER .   (rule 19)
    date  ->  tMONTH tUNUMBER . ',' tUNUMBER   (rule 20)

    ',' 	shift, and go to state 27

    $default	reduce using rule 19 (date)



state 12

    rel  ->  tSNUMBER tMONTH_UNIT .   (rule 26)

    $default	reduce using rule 26 (rel)



state 13

    rel  ->  tSNUMBER tSEC_UNIT .   (rule 24)

    $default	reduce using rule 24 (rel)



state 14

    o_merid  ->  tMERIDIAN .   (rule 29)

    $default	reduce using rule 29 (o_merid)



state 15

    date  ->  tUNUMBER tMONTH .   (rule 21)
    date  ->  tUNUMBER tMONTH . tUNUMBER   (rule 22)

    tUNUMBER	shift, and go to state 28

    tUNUMBER	[reduce using rule 21 (date)]
    $default	reduce using rule 21 (date)



state 16

    rel  ->  tUNUMBER tMONTH_UNIT .   (rule 27)

    $default	reduce using rule 27 (rel)



state 17

    rel  ->  tUNUMBER tSEC_UNIT .   (rule 25)

    $default	reduce using rule 25 (rel)



state 18

    time  ->  tUNUMBER ':' . tUNUMBER o_merid   (rule 8)
    time  ->  tUNUMBER ':' . tUNUMBER numzone   (rule 9)
    time  ->  tUNUMBER ':' . tUNUMBER ':' tUNUMBER o_merid   (rule 10)
    time  ->  tUNUMBER ':' . tUNUMBER ':' tUNUMBER numzone   (rule 11)

    tUNUMBER	shift, and go to state 29



state 19

    date  ->  tUNUMBER '/' . tUNUMBER   (rule 17)
    date  ->  tUNUMBER '/' . tUNUMBER '/' tUNUMBER   (rule 18)

    tUNUMBER	shift, and go to state 30



state 20

    time  ->  tUNUMBER o_merid .   (rule 7)

    $default	reduce using rule 7 (time)



state 21

    zone  ->  tDAYZONE .   (rule 13)

    $default	reduce using rule 13 (zone)



state 22

    numzone  ->  tSNUMBER .   (rule 16)

    $default	reduce using rule 16 (numzone)



state 23

    zone  ->  tZONE .   (rule 12)
    zone  ->  tZONE . numzone   (rule 14)

    tSNUMBER	shift, and go to state 22

    tSNUMBER	[reduce using rule 12 (zone)]
    $default	reduce using rule 12 (zone)

    numzone	go to state 31



state 24

    item  ->  time zone .   (rule 4)

    $default	reduce using rule 4 (item)



state 25

    zone  ->  numzone .   (rule 15)

    $default	reduce using rule 15 (zone)



state 26

    date  ->  tDAY ',' tUNUMBER . tMONTH tUNUMBER   (rule 23)

    tMONTH	shift, and go to state 32



state 27

    date  ->  tMONTH tUNUMBER ',' . tUNUMBER   (rule 20)

    tUNUMBER	shift, and go to state 33



state 28

    date  ->  tUNUMBER tMONTH tUNUMBER .   (rule 22)

    $default	reduce using rule 22 (date)



state 29

    time  ->  tUNUMBER ':' tUNUMBER . o_merid   (rule 8)
    time  ->  tUNUMBER ':' tUNUMBER . numzone   (rule 9)
    time  ->  tUNUMBER ':' tUNUMBER . ':' tUNUMBER o_merid   (rule 10)
    time  ->  tUNUMBER ':' tUNUMBER . ':' tUNUMBER numzone   (rule 11)

    tMERIDIAN	shift, and go to state 14
    tSNUMBER	shift, and go to state 22
    ':' 	shift, and go to state 34

    tSNUMBER	[reduce using rule 28 (o_merid)]
    $default	reduce using rule 28 (o_merid)

    numzone	go to state 35
    o_merid	go to state 36



state 30

    date  ->  tUNUMBER '/' tUNUMBER .   (rule 17)
    date  ->  tUNUMBER '/' tUNUMBER . '/' tUNUMBER   (rule 18)

    '/' 	shift, and go to state 37

    $default	reduce using rule 17 (date)



state 31

    zone  ->  tZONE numzone .   (rule 14)

    $default	reduce using rule 14 (zone)



state 32

    date  ->  tDAY ',' tUNUMBER tMONTH . tUNUMBER   (rule 23)

    tUNUMBER	shift, and go to state 38



state 33

    date  ->  tMONTH tUNUMBER ',' tUNUMBER .   (rule 20)

    $default	reduce using rule 20 (date)



state 34

    time  ->  tUNUMBER ':' tUNUMBER ':' . tUNUMBER o_merid   (rule 10)
    time  ->  tUNUMBER ':' tUNUMBER ':' . tUNUMBER numzone   (rule 11)

    tUNUMBER	shift, and go to state 39



state 35

    time  ->  tUNUMBER ':' tUNUMBER numzone .   (rule 9)

    $default	reduce using rule 9 (time)



state 36

    time  ->  tUNUMBER ':' tUNUMBER o_merid .   (rule 8)

    $default	reduce using rule 8 (time)



state 37

    date  ->  tUNUMBER '/' tUNUMBER '/' . tUNUMBER   (rule 18)

    tUNUMBER	shift, and go to state 40



state 38

    date  ->  tDAY ',' tUNUMBER tMONTH tUNUMBER .   (rule 23)

    $default	reduce using rule 23 (date)



state 39

    time  ->  tUNUMBER ':' tUNUMBER ':' tUNUMBER . o_merid   (rule 10)
    time  ->  tUNUMBER ':' tUNUMBER ':' tUNUMBER . numzone   (rule 11)

    tMERIDIAN	shift, and go to state 14
    tSNUMBER	shift, and go to state 22

    tSNUMBER	[reduce using rule 28 (o_merid)]
    $default	reduce using rule 28 (o_merid)

    numzone	go to state 41
    o_merid	go to state 42



state 40

    date  ->  tUNUMBER '/' tUNUMBER '/' tUNUMBER .   (rule 18)

    $default	reduce using rule 18 (date)



state 41

    time  ->  tUNUMBER ':' tUNUMBER ':' tUNUMBER numzone .   (rule 11)

    $default	reduce using rule 11 (time)



state 42

    time  ->  tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid .   (rule 10)

    $default	reduce using rule 10 (time)



state 43

    $   	go to state 44



state 44

    $default	accept