sportdb-parser 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2f100580b61cccac799cfe9c87a29026c360b2e49602d877bfac1a33c5cd903
4
- data.tar.gz: b19c16e2aefcab864a92da6ff879cf42a79391cf7c0654942cc4702ef5bc0125
3
+ metadata.gz: 2016adc1039046c3994f4d30cfe9f6b9ab9065c22ca6b07a94429e93ddfbe1bb
4
+ data.tar.gz: ab301ed8b121015db6f196fc8a5a6988766ace5478ce8538491ed1ed2b7e21db
5
5
  SHA512:
6
- metadata.gz: d9cf9ad44638f04b4d1be429120b0608365254f00bd327508d439c997125ff985746cb7cb638816bc55e7b41701f9ac5900eea19502848da92b67cf42c1a4957
7
- data.tar.gz: 9b4909d7ab01675f237b6b153ad3151aba3b4e16823317c19e7cafe08853eb653c7f77ca0eedb7c6a5f84cab028d024b41aa252d284ab93868d7812bbcf85b0b
6
+ metadata.gz: 5fb05929a62c6e99e33d52647f71ed48fd8ec57c4db808b3b5f47d47fa78c3308407dfc3eccd8d2fe2dd37b38863ff75a060d32eb8815ebd56792f5f3edafbb5
7
+ data.tar.gz: c3b3c924cc2ff525de7c048bf25ffa2d1cf23eac84d6bf4118ec1aa41d234262aeb805515ceb7e89f32fa78fb527888d9abd6fc6d1155ba8eea3bf4779d9e42c
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 0.5.1
1
+ ### 0.5.2
2
2
  ### 0.0.1 / 2024-07-12
3
3
 
4
4
  * Everything is new. First release.
@@ -9,178 +9,185 @@ class RaccMatchParser < Racc::Parser
9
9
  ##### State transition tables begin ###
10
10
 
11
11
  racc_action_table = [
12
- 29, 50, 12, 92, 28, 53, 26, 50, 22, 33,
13
- 57, 16, 76, 37, 77, 13, 57, 23, 14, 15,
14
- 51, 20, 22, 12, 60, 28, 51, 26, 55, 56,
15
- 60, 38, 16, 26, 55, 56, 13, 108, 23, 14,
16
- 15, 35, 20, 22, 41, 63, 39, 42, 45, 44,
17
- 109, 81, 82, 34, 36, 41, 67, 69, 70, 71,
18
- 72, 94, 95, 106, 107, 47, 61, 65, 66, 79,
19
- 83, 84, 60, 85, 87, 89, 38, 90, 41, 97,
20
- 41, 99, 33, 101, 76, 60, 110, 111, 112, 113,
21
- 60, 41, 41, 33, 116, 60, 118, 119 ]
12
+ 95, 37, 26, 29, 112, 12, 87, 28, 58, 26,
13
+ 81, 82, 41, 16, 39, 51, 113, 13, 38, 23,
14
+ 14, 15, 61, 20, 22, 52, 56, 57, 12, 61,
15
+ 28, 51, 26, 49, 52, 58, 16, 35, 97, 98,
16
+ 13, 41, 23, 14, 15, 33, 20, 22, 34, 49,
17
+ 52, 64, 54, 56, 57, 22, 68, 70, 71, 72,
18
+ 42, 45, 44, 76, 36, 77, 110, 111, 47, 62,
19
+ 66, 67, 79, 83, 84, 61, 85, 89, 91, 38,
20
+ 92, 93, 41, 100, 41, 102, 33, 104, 105, 76,
21
+ 61, 114, 115, 116, 117, 118, 119, 61, 41, 41,
22
+ 33, 122, 61, 124, 125 ]
22
23
 
23
24
  racc_action_check = [
24
- 1, 19, 1, 58, 1, 20, 1, 46, 20, 12,
25
- 23, 1, 33, 15, 33, 1, 47, 1, 1, 1,
26
- 19, 1, 1, 0, 58, 0, 46, 0, 23, 23,
27
- 23, 15, 0, 16, 47, 47, 0, 78, 0, 0,
28
- 0, 13, 0, 0, 16, 25, 16, 17, 17, 17,
29
- 78, 36, 36, 13, 14, 25, 31, 31, 31, 31,
30
- 31, 60, 60, 77, 77, 18, 24, 26, 29, 34,
31
- 39, 40, 41, 43, 49, 51, 53, 54, 62, 63,
32
- 65, 67, 68, 70, 74, 76, 80, 83, 84, 88,
33
- 92, 96, 98, 103, 104, 105, 113, 115 ]
25
+ 59, 15, 16, 1, 78, 1, 49, 1, 23, 1,
26
+ 36, 36, 16, 1, 16, 19, 78, 1, 15, 1,
27
+ 1, 1, 59, 1, 1, 49, 23, 23, 0, 23,
28
+ 0, 46, 0, 19, 19, 47, 0, 13, 61, 61,
29
+ 0, 25, 0, 0, 0, 12, 0, 0, 13, 46,
30
+ 46, 25, 20, 47, 47, 20, 31, 31, 31, 31,
31
+ 17, 17, 17, 33, 14, 33, 77, 77, 18, 24,
32
+ 26, 29, 34, 39, 40, 41, 43, 50, 52, 54,
33
+ 55, 56, 63, 64, 66, 68, 69, 71, 72, 74,
34
+ 76, 80, 83, 84, 88, 90, 93, 95, 99, 101,
35
+ 107, 108, 109, 118, 121 ]
34
36
 
35
37
  racc_action_pointer = [
36
- 21, 0, nil, nil, nil, nil, nil, nil, nil, nil,
37
- nil, nil, 1, 37, 38, 9, 27, 43, 48, -3,
38
- -14, nil, nil, 4, 62, 38, 60, nil, nil, 68,
39
- nil, 53, nil, 3, 52, nil, 32, nil, nil, 58,
40
- 59, 46, nil, 55, nil, nil, 3, 10, nil, 70,
41
- nil, 58, nil, 54, 60, nil, nil, nil, -2, nil,
42
- 34, nil, 61, 75, nil, 63, nil, 77, 74, nil,
43
- 79, nil, nil, nil, 75, nil, 59, 50, 33, nil,
44
- 82, nil, nil, 83, 84, nil, nil, nil, 84, nil,
45
- nil, nil, 64, nil, nil, nil, 74, nil, 75, nil,
46
- nil, nil, nil, 85, 82, 69, nil, nil, nil, nil,
47
- nil, nil, nil, 79, nil, 87, nil, nil, nil, nil ]
38
+ 26, 3, nil, nil, nil, nil, nil, nil, nil, nil,
39
+ nil, nil, 38, 33, 49, -3, -4, 56, 52, 11,
40
+ 34, nil, nil, 2, 65, 25, 44, nil, nil, 71,
41
+ nil, 53, nil, 55, 56, nil, -8, nil, nil, 62,
42
+ 63, 48, nil, 59, nil, nil, 27, 29, nil, 2,
43
+ 73, nil, 62, nil, 58, 64, 65, nil, nil, -5,
44
+ nil, 10, nil, 66, 79, nil, 68, nil, 81, 79,
45
+ nil, 83, 84, nil, 81, nil, 63, 54, 0, nil,
46
+ 87, nil, nil, 88, 89, nil, nil, nil, 90, nil,
47
+ 90, nil, nil, 71, nil, 70, nil, nil, nil, 82,
48
+ nil, 83, nil, nil, nil, nil, nil, 93, 90, 75,
49
+ nil, nil, nil, nil, nil, nil, nil, nil, 87, nil,
50
+ nil, 95, nil, nil, nil, nil ]
48
51
 
49
52
  racc_action_default = [
50
- -80, -80, -1, -3, -4, -5, -6, -7, -8, -9,
51
- -10, -11, -80, -80, -41, -50, -80, -80, -80, -80,
52
- -47, -49, -52, -80, -80, -64, -80, -69, -79, -80,
53
- -2, -80, -13, -20, -80, -39, -80, -37, -51, -80,
54
- -80, -80, -40, -80, -43, -44, -80, -80, -46, -80,
55
- -54, -80, -48, -50, -80, -59, -60, -61, -71, -72,
56
- -75, -63, -80, -67, -70, -80, 120, -80, -80, -15,
57
- -16, -18, -19, -21, -22, -24, -80, -80, -80, -32,
58
- -80, -35, -36, -80, -80, -42, -45, -53, -55, -56,
59
- -58, -73, -80, -76, -77, -78, -66, -68, -65, -12,
60
- -14, -17, -23, -80, -80, -27, -29, -30, -31, -33,
61
- -34, -38, -62, -80, -74, -80, -26, -28, -57, -25 ]
53
+ -83, -83, -1, -3, -4, -5, -6, -7, -8, -9,
54
+ -10, -11, -83, -83, -41, -50, -83, -83, -83, -83,
55
+ -47, -49, -52, -83, -83, -67, -83, -72, -82, -83,
56
+ -2, -83, -13, -20, -83, -39, -83, -37, -51, -83,
57
+ -83, -83, -40, -83, -43, -44, -83, -83, -46, -83,
58
+ -83, -56, -83, -48, -50, -83, -83, -63, -64, -74,
59
+ -75, -78, -66, -83, -70, -73, -83, 126, -83, -83,
60
+ -15, -16, -18, -21, -22, -24, -83, -83, -83, -32,
61
+ -83, -35, -36, -83, -83, -42, -45, -53, -83, -55,
62
+ -57, -58, -60, -61, -76, -83, -79, -80, -81, -69,
63
+ -71, -68, -12, -14, -17, -19, -23, -83, -83, -27,
64
+ -29, -30, -31, -33, -34, -38, -65, -54, -83, -62,
65
+ -77, -83, -26, -28, -59, -25 ]
62
66
 
63
67
  racc_goto_table = [
64
- 32, 64, 91, 75, 48, 96, 2, 30, 98, 1,
65
- 31, 68, 73, 74, 104, 105, 78, 80, 43, 46,
66
- 103, 52, 88, 40, 62, 93, nil, nil, nil, nil,
67
- nil, 86, nil, nil, nil, nil, 114, nil, nil, nil,
68
- nil, nil, nil, nil, 102, nil, nil, nil, nil, 117,
69
- nil, nil, nil, nil, nil, nil, 100, nil, nil, nil,
68
+ 32, 65, 94, 75, 48, 99, 2, 30, 101, 1,
69
+ 31, 69, 73, 74, 108, 109, 78, 80, 43, 107,
70
+ 46, 53, 88, 90, 40, 63, 96, nil, nil, nil,
71
+ nil, 86, nil, nil, nil, nil, nil, nil, 120, nil,
72
+ nil, nil, nil, nil, 106, nil, nil, nil, nil, nil,
73
+ nil, nil, 123, nil, nil, nil, nil, 103, nil, nil,
70
74
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
71
- nil, nil, 64, nil, 64, nil, nil, nil, nil, nil,
75
+ nil, nil, nil, nil, nil, 65, nil, 65, nil, nil,
72
76
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
73
- nil, 115 ]
77
+ nil, nil, nil, nil, nil, 121 ]
74
78
 
75
79
  racc_goto_check = [
76
80
  13, 35, 18, 17, 27, 33, 2, 2, 33, 1,
77
- 12, 14, 15, 16, 19, 20, 21, 22, 24, 26,
78
- 18, 28, 30, 32, 34, 37, nil, nil, nil, nil,
79
- nil, 27, nil, nil, nil, nil, 18, nil, nil, nil,
80
- nil, nil, nil, nil, 17, nil, nil, nil, nil, 18,
81
- nil, nil, nil, nil, nil, nil, 13, nil, nil, nil,
81
+ 12, 14, 15, 16, 19, 20, 21, 22, 24, 18,
82
+ 26, 28, 29, 30, 32, 34, 37, nil, nil, nil,
83
+ nil, 27, nil, nil, nil, nil, nil, nil, 18, nil,
84
+ nil, nil, nil, nil, 17, nil, nil, nil, nil, nil,
85
+ nil, nil, 18, nil, nil, nil, nil, 13, nil, nil,
82
86
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
83
- nil, nil, 35, nil, 35, nil, nil, nil, nil, nil,
87
+ nil, nil, nil, nil, nil, 35, nil, 35, nil, nil,
84
88
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
85
- nil, 13 ]
89
+ nil, nil, nil, nil, nil, 13 ]
86
90
 
87
91
  racc_goto_pointer = [
88
92
  nil, 9, 6, nil, nil, nil, nil, nil, nil, nil,
89
- nil, nil, -2, -12, -20, -21, -20, -30, -56, -63,
90
- -62, -18, -19, nil, 1, nil, 1, -15, 1, nil,
91
- -29, nil, 7, -57, -1, -24, nil, -35 ]
93
+ nil, nil, -2, -12, -20, -21, -20, -30, -57, -63,
94
+ -62, -18, -19, nil, 1, nil, 2, -15, 1, -27,
95
+ -29, nil, 8, -58, 0, -24, nil, -35 ]
92
96
 
93
97
  racc_goto_default = [
94
98
  nil, nil, nil, 3, 4, 5, 6, 7, 8, 9,
95
- 10, 11, nil, nil, nil, nil, nil, nil, 59, nil,
96
- nil, nil, nil, 17, nil, 18, 19, nil, 21, 49,
97
- nil, 54, 24, 25, nil, 27, 58, nil ]
99
+ 10, 11, nil, nil, nil, nil, nil, nil, 60, nil,
100
+ nil, nil, nil, 17, nil, 18, 19, nil, 21, 50,
101
+ nil, 55, 24, 25, nil, 27, 59, nil ]
98
102
 
99
103
  racc_reduce_table = [
100
104
  0, 0, :racc_error,
101
- 1, 30, :_reduce_none,
102
- 2, 30, :_reduce_none,
103
105
  1, 31, :_reduce_none,
104
- 1, 31, :_reduce_none,
105
- 1, 31, :_reduce_none,
106
- 1, 31, :_reduce_none,
107
- 1, 31, :_reduce_none,
108
- 1, 31, :_reduce_none,
109
- 1, 31, :_reduce_none,
110
- 1, 31, :_reduce_none,
111
- 1, 31, :_reduce_none,
112
- 4, 40, :_reduce_12,
113
- 1, 41, :_reduce_13,
114
- 3, 41, :_reduce_14,
115
- 2, 41, :_reduce_15,
116
- 1, 43, :_reduce_none,
117
- 2, 43, :_reduce_17,
118
- 1, 43, :_reduce_none,
119
- 1, 43, :_reduce_none,
120
- 1, 42, :_reduce_20,
121
- 2, 42, :_reduce_21,
122
- 1, 44, :_reduce_22,
123
- 2, 44, :_reduce_23,
124
- 1, 44, :_reduce_24,
125
- 4, 46, :_reduce_25,
126
- 3, 45, :_reduce_26,
127
- 1, 48, :_reduce_27,
128
- 2, 48, :_reduce_28,
129
- 1, 49, :_reduce_none,
130
- 1, 49, :_reduce_none,
131
- 4, 35, :_reduce_31,
132
- 1, 50, :_reduce_32,
133
- 2, 50, :_reduce_33,
134
- 4, 36, :_reduce_34,
135
- 1, 51, :_reduce_35,
136
- 1, 51, :_reduce_36,
137
- 2, 32, :_reduce_37,
138
- 4, 32, :_reduce_38,
139
- 2, 33, :_reduce_39,
140
- 2, 34, :_reduce_40,
141
- 1, 52, :_reduce_41,
142
- 3, 52, :_reduce_42,
143
- 1, 53, :_reduce_none,
144
- 1, 53, :_reduce_none,
145
- 3, 37, :_reduce_45,
146
- 2, 37, :_reduce_46,
147
- 1, 54, :_reduce_47,
148
- 2, 54, :_reduce_48,
106
+ 2, 31, :_reduce_none,
107
+ 1, 32, :_reduce_none,
108
+ 1, 32, :_reduce_none,
109
+ 1, 32, :_reduce_none,
110
+ 1, 32, :_reduce_none,
111
+ 1, 32, :_reduce_none,
112
+ 1, 32, :_reduce_none,
113
+ 1, 32, :_reduce_none,
114
+ 1, 32, :_reduce_none,
115
+ 1, 32, :_reduce_none,
116
+ 4, 41, :_reduce_12,
117
+ 1, 42, :_reduce_13,
118
+ 3, 42, :_reduce_14,
119
+ 2, 42, :_reduce_15,
120
+ 1, 44, :_reduce_none,
121
+ 2, 44, :_reduce_17,
122
+ 1, 44, :_reduce_none,
123
+ 2, 44, :_reduce_19,
124
+ 1, 43, :_reduce_20,
125
+ 2, 43, :_reduce_21,
126
+ 1, 45, :_reduce_22,
127
+ 2, 45, :_reduce_23,
128
+ 1, 45, :_reduce_24,
129
+ 4, 47, :_reduce_25,
130
+ 3, 46, :_reduce_26,
131
+ 1, 49, :_reduce_27,
132
+ 2, 49, :_reduce_28,
133
+ 1, 50, :_reduce_none,
134
+ 1, 50, :_reduce_none,
135
+ 4, 36, :_reduce_31,
136
+ 1, 51, :_reduce_32,
137
+ 2, 51, :_reduce_33,
138
+ 4, 37, :_reduce_34,
139
+ 1, 52, :_reduce_35,
140
+ 1, 52, :_reduce_36,
141
+ 2, 33, :_reduce_37,
142
+ 4, 33, :_reduce_38,
143
+ 2, 34, :_reduce_39,
144
+ 2, 35, :_reduce_40,
145
+ 1, 53, :_reduce_41,
146
+ 3, 53, :_reduce_42,
147
+ 1, 54, :_reduce_none,
149
148
  1, 54, :_reduce_none,
150
- 1, 57, :_reduce_50,
151
- 2, 57, :_reduce_51,
152
- 1, 57, :_reduce_52,
153
- 2, 56, :_reduce_53,
154
- 1, 56, :_reduce_54,
155
- 2, 58, :_reduce_55,
156
- 1, 59, :_reduce_56,
157
- 3, 59, :_reduce_57,
158
- 3, 55, :_reduce_58,
159
- 1, 60, :_reduce_59,
160
- 1, 60, :_reduce_60,
161
- 1, 60, :_reduce_61,
162
- 4, 38, :_reduce_62,
163
- 2, 38, :_reduce_63,
149
+ 3, 38, :_reduce_45,
150
+ 2, 38, :_reduce_46,
151
+ 1, 55, :_reduce_47,
152
+ 2, 55, :_reduce_48,
153
+ 1, 55, :_reduce_none,
154
+ 1, 58, :_reduce_50,
155
+ 2, 58, :_reduce_51,
156
+ 1, 58, :_reduce_52,
157
+ 2, 57, :_reduce_53,
158
+ 3, 57, :_reduce_54,
159
+ 2, 57, :_reduce_55,
160
+ 1, 57, :_reduce_56,
161
+ 2, 59, :_reduce_57,
162
+ 1, 60, :_reduce_58,
163
+ 3, 60, :_reduce_59,
164
+ 3, 56, :_reduce_60,
165
+ 3, 56, :_reduce_61,
166
+ 4, 56, :_reduce_62,
167
+ 1, 61, :_reduce_63,
164
168
  1, 61, :_reduce_64,
165
- 3, 61, :_reduce_65,
166
- 3, 61, :_reduce_66,
167
- 1, 63, :_reduce_none,
168
- 2, 63, :_reduce_none,
169
- 1, 62, :_reduce_69,
170
- 2, 62, :_reduce_70,
171
- 2, 64, :_reduce_71,
172
- 1, 65, :_reduce_72,
173
- 2, 65, :_reduce_73,
174
- 3, 65, :_reduce_74,
175
- 1, 47, :_reduce_75,
176
- 2, 47, :_reduce_76,
177
- 1, 66, :_reduce_77,
178
- 1, 66, :_reduce_78,
179
- 1, 39, :_reduce_79 ]
180
-
181
- racc_reduce_n = 80
182
-
183
- racc_shift_n = 120
169
+ 4, 39, :_reduce_65,
170
+ 2, 39, :_reduce_66,
171
+ 1, 62, :_reduce_67,
172
+ 3, 62, :_reduce_68,
173
+ 3, 62, :_reduce_69,
174
+ 1, 64, :_reduce_none,
175
+ 2, 64, :_reduce_none,
176
+ 1, 63, :_reduce_72,
177
+ 2, 63, :_reduce_73,
178
+ 2, 65, :_reduce_74,
179
+ 1, 66, :_reduce_75,
180
+ 2, 66, :_reduce_76,
181
+ 3, 66, :_reduce_77,
182
+ 1, 48, :_reduce_78,
183
+ 2, 48, :_reduce_79,
184
+ 1, 67, :_reduce_80,
185
+ 1, 67, :_reduce_81,
186
+ 1, 40, :_reduce_82 ]
187
+
188
+ racc_reduce_n = 83
189
+
190
+ racc_shift_n = 126
184
191
 
185
192
  racc_token_table = {
186
193
  false => 0,
@@ -190,30 +197,31 @@ racc_token_table = {
190
197
  :NEWLINE => 4,
191
198
  "," => 5,
192
199
  "-" => 6,
193
- ";" => 7,
194
- :PROP_NAME => 8,
195
- "(" => 9,
196
- ")" => 10,
197
- "[" => 11,
198
- "]" => 12,
199
- :YELLOW_CARD => 13,
200
- :RED_CARD => 14,
201
- :GROUP => 15,
202
- "|" => 16,
203
- :TEXT => 17,
204
- :ROUND => 18,
205
- :DATE => 19,
206
- :DURATION => 20,
207
- :ORD => 21,
208
- :TIME => 22,
200
+ :PROP_NAME => 7,
201
+ "(" => 8,
202
+ ")" => 9,
203
+ "[" => 10,
204
+ "]" => 11,
205
+ :YELLOW_CARD => 12,
206
+ :RED_CARD => 13,
207
+ :GROUP => 14,
208
+ "|" => 15,
209
+ :TEXT => 16,
210
+ :ROUND => 17,
211
+ :DATE => 18,
212
+ :DURATION => 19,
213
+ :ORD => 20,
214
+ :TIME => 21,
215
+ :STATUS => 22,
209
216
  "@" => 23,
210
- :SCORE => 24,
211
- :VS => 25,
212
- :MINUTE => 26,
213
- :OG => 27,
214
- :PEN => 28 }
217
+ :VS => 24,
218
+ :SCORE => 25,
219
+ ";" => 26,
220
+ :MINUTE => 27,
221
+ :OG => 28,
222
+ :PEN => 29 }
215
223
 
216
- racc_nt_base = 29
224
+ racc_nt_base = 30
217
225
 
218
226
  racc_use_result_var = true
219
227
 
@@ -242,7 +250,6 @@ Racc_token_to_s_table = [
242
250
  "NEWLINE",
243
251
  "\",\"",
244
252
  "\"-\"",
245
- "\";\"",
246
253
  "PROP_NAME",
247
254
  "\"(\"",
248
255
  "\")\"",
@@ -258,9 +265,11 @@ Racc_token_to_s_table = [
258
265
  "DURATION",
259
266
  "ORD",
260
267
  "TIME",
268
+ "STATUS",
261
269
  "\"@\"",
262
- "SCORE",
263
270
  "VS",
271
+ "SCORE",
272
+ "\";\"",
264
273
  "MINUTE",
265
274
  "OG",
266
275
  "PEN",
@@ -380,9 +389,14 @@ module_eval(<<'.,.,', 'parser.y', 52)
380
389
 
381
390
  # reduce 18 omitted
382
391
 
383
- # reduce 19 omitted
392
+ module_eval(<<'.,.,', 'parser.y', 54)
393
+ def _reduce_19(val, _values, result)
394
+ result = val[0]
395
+ result
396
+ end
397
+ .,.,
384
398
 
385
- module_eval(<<'.,.,', 'parser.y', 58)
399
+ module_eval(<<'.,.,', 'parser.y', 60)
386
400
  def _reduce_20(val, _values, result)
387
401
  result = Lineup.new( name: val[0] )
388
402
 
@@ -390,7 +404,7 @@ module_eval(<<'.,.,', 'parser.y', 58)
390
404
  end
391
405
  .,.,
392
406
 
393
- module_eval(<<'.,.,', 'parser.y', 62)
407
+ module_eval(<<'.,.,', 'parser.y', 64)
394
408
  def _reduce_21(val, _values, result)
395
409
  kwargs = { name: val[0] }.merge( val[1] )
396
410
  result = Lineup.new( **kwargs )
@@ -399,7 +413,7 @@ module_eval(<<'.,.,', 'parser.y', 62)
399
413
  end
400
414
  .,.,
401
415
 
402
- module_eval(<<'.,.,', 'parser.y', 68)
416
+ module_eval(<<'.,.,', 'parser.y', 70)
403
417
  def _reduce_22(val, _values, result)
404
418
  result = { card: val[0] }
405
419
 
@@ -407,7 +421,7 @@ module_eval(<<'.,.,', 'parser.y', 68)
407
421
  end
408
422
  .,.,
409
423
 
410
- module_eval(<<'.,.,', 'parser.y', 72)
424
+ module_eval(<<'.,.,', 'parser.y', 74)
411
425
  def _reduce_23(val, _values, result)
412
426
  result = { card: val[0], sub: val[1] }
413
427
 
@@ -415,7 +429,7 @@ module_eval(<<'.,.,', 'parser.y', 72)
415
429
  end
416
430
  .,.,
417
431
 
418
- module_eval(<<'.,.,', 'parser.y', 76)
432
+ module_eval(<<'.,.,', 'parser.y', 78)
419
433
  def _reduce_24(val, _values, result)
420
434
  result = { sub: val[0] }
421
435
 
@@ -423,7 +437,7 @@ module_eval(<<'.,.,', 'parser.y', 76)
423
437
  end
424
438
  .,.,
425
439
 
426
- module_eval(<<'.,.,', 'parser.y', 82)
440
+ module_eval(<<'.,.,', 'parser.y', 84)
427
441
  def _reduce_25(val, _values, result)
428
442
  result = Sub.new( minute: val[1], sub: val[2] )
429
443
 
@@ -431,7 +445,7 @@ module_eval(<<'.,.,', 'parser.y', 82)
431
445
  end
432
446
  .,.,
433
447
 
434
- module_eval(<<'.,.,', 'parser.y', 88)
448
+ module_eval(<<'.,.,', 'parser.y', 90)
435
449
  def _reduce_26(val, _values, result)
436
450
  kwargs = val[1]
437
451
  result = Card.new( **kwargs )
@@ -440,14 +454,14 @@ module_eval(<<'.,.,', 'parser.y', 88)
440
454
  end
441
455
  .,.,
442
456
 
443
- module_eval(<<'.,.,', 'parser.y', 93)
457
+ module_eval(<<'.,.,', 'parser.y', 95)
444
458
  def _reduce_27(val, _values, result)
445
459
  result = { name: val[0] }
446
460
  result
447
461
  end
448
462
  .,.,
449
463
 
450
- module_eval(<<'.,.,', 'parser.y', 96)
464
+ module_eval(<<'.,.,', 'parser.y', 98)
451
465
  def _reduce_28(val, _values, result)
452
466
  result = { name: val[0], minute: val[1] }
453
467
  result
@@ -458,7 +472,7 @@ module_eval(<<'.,.,', 'parser.y', 96)
458
472
 
459
473
  # reduce 30 omitted
460
474
 
461
- module_eval(<<'.,.,', 'parser.y', 107)
475
+ module_eval(<<'.,.,', 'parser.y', 109)
462
476
  def _reduce_31(val, _values, result)
463
477
  @tree << GroupDef.new( name: val[0],
464
478
  teams: val[2] )
@@ -467,7 +481,7 @@ module_eval(<<'.,.,', 'parser.y', 107)
467
481
  end
468
482
  .,.,
469
483
 
470
- module_eval(<<'.,.,', 'parser.y', 113)
484
+ module_eval(<<'.,.,', 'parser.y', 115)
471
485
  def _reduce_32(val, _values, result)
472
486
  result = val
473
487
  ## e.g. val is ["Austria"]
@@ -476,7 +490,7 @@ module_eval(<<'.,.,', 'parser.y', 113)
476
490
  end
477
491
  .,.,
478
492
 
479
- module_eval(<<'.,.,', 'parser.y', 117)
493
+ module_eval(<<'.,.,', 'parser.y', 119)
480
494
  def _reduce_33(val, _values, result)
481
495
  result.push( val[1] )
482
496
 
@@ -484,7 +498,7 @@ module_eval(<<'.,.,', 'parser.y', 117)
484
498
  end
485
499
  .,.,
486
500
 
487
- module_eval(<<'.,.,', 'parser.y', 126)
501
+ module_eval(<<'.,.,', 'parser.y', 128)
488
502
  def _reduce_34(val, _values, result)
489
503
  kwargs = { name: val[0] }.merge( val[2] )
490
504
  @tree<< RoundDef.new( **kwargs )
@@ -493,21 +507,21 @@ module_eval(<<'.,.,', 'parser.y', 126)
493
507
  end
494
508
  .,.,
495
509
 
496
- module_eval(<<'.,.,', 'parser.y', 131)
510
+ module_eval(<<'.,.,', 'parser.y', 133)
497
511
  def _reduce_35(val, _values, result)
498
512
  result = { date: val[0][1] }
499
513
  result
500
514
  end
501
515
  .,.,
502
516
 
503
- module_eval(<<'.,.,', 'parser.y', 132)
517
+ module_eval(<<'.,.,', 'parser.y', 134)
504
518
  def _reduce_36(val, _values, result)
505
519
  result = { duration: val[0][1] }
506
520
  result
507
521
  end
508
522
  .,.,
509
523
 
510
- module_eval(<<'.,.,', 'parser.y', 138)
524
+ module_eval(<<'.,.,', 'parser.y', 140)
511
525
  def _reduce_37(val, _values, result)
512
526
  @tree << DateHeader.new( date: val[0][1] )
513
527
 
@@ -515,7 +529,7 @@ module_eval(<<'.,.,', 'parser.y', 138)
515
529
  end
516
530
  .,.,
517
531
 
518
- module_eval(<<'.,.,', 'parser.y', 142)
532
+ module_eval(<<'.,.,', 'parser.y', 144)
519
533
  def _reduce_38(val, _values, result)
520
534
  @tree << DateHeader.new( date: val[1][1] )
521
535
 
@@ -523,7 +537,7 @@ module_eval(<<'.,.,', 'parser.y', 142)
523
537
  end
524
538
  .,.,
525
539
 
526
- module_eval(<<'.,.,', 'parser.y', 149)
540
+ module_eval(<<'.,.,', 'parser.y', 151)
527
541
  def _reduce_39(val, _values, result)
528
542
  @tree << GroupHeader.new( name: val[0] )
529
543
 
@@ -531,7 +545,7 @@ module_eval(<<'.,.,', 'parser.y', 149)
531
545
  end
532
546
  .,.,
533
547
 
534
- module_eval(<<'.,.,', 'parser.y', 159)
548
+ module_eval(<<'.,.,', 'parser.y', 161)
535
549
  def _reduce_40(val, _values, result)
536
550
  @tree << RoundHeader.new( names: val[0] )
537
551
 
@@ -539,14 +553,14 @@ module_eval(<<'.,.,', 'parser.y', 159)
539
553
  end
540
554
  .,.,
541
555
 
542
- module_eval(<<'.,.,', 'parser.y', 162)
556
+ module_eval(<<'.,.,', 'parser.y', 164)
543
557
  def _reduce_41(val, _values, result)
544
558
  result = val
545
559
  result
546
560
  end
547
561
  .,.,
548
562
 
549
- module_eval(<<'.,.,', 'parser.y', 163)
563
+ module_eval(<<'.,.,', 'parser.y', 165)
550
564
  def _reduce_42(val, _values, result)
551
565
  result.push( val[2] )
552
566
  result
@@ -557,7 +571,7 @@ module_eval(<<'.,.,', 'parser.y', 163)
557
571
 
558
572
  # reduce 44 omitted
559
573
 
560
- module_eval(<<'.,.,', 'parser.y', 174)
574
+ module_eval(<<'.,.,', 'parser.y', 176)
561
575
  def _reduce_45(val, _values, result)
562
576
  puts "match:"
563
577
  pp val[1]
@@ -571,7 +585,7 @@ module_eval(<<'.,.,', 'parser.y', 174)
571
585
  end
572
586
  .,.,
573
587
 
574
- module_eval(<<'.,.,', 'parser.y', 184)
588
+ module_eval(<<'.,.,', 'parser.y', 186)
575
589
  def _reduce_46(val, _values, result)
576
590
  kwargs = {}.merge( val[0], val[1] )
577
591
  @tree << MatchLine.new( **kwargs )
@@ -580,14 +594,14 @@ module_eval(<<'.,.,', 'parser.y', 184)
580
594
  end
581
595
  .,.,
582
596
 
583
- module_eval(<<'.,.,', 'parser.y', 189)
597
+ module_eval(<<'.,.,', 'parser.y', 191)
584
598
  def _reduce_47(val, _values, result)
585
599
  result = { ord: val[0][1][:value] }
586
600
  result
587
601
  end
588
602
  .,.,
589
603
 
590
- module_eval(<<'.,.,', 'parser.y', 190)
604
+ module_eval(<<'.,.,', 'parser.y', 192)
591
605
  def _reduce_48(val, _values, result)
592
606
  result = { ord: val[0][1][:value] }.merge( val[1] )
593
607
  result
@@ -596,64 +610,82 @@ module_eval(<<'.,.,', 'parser.y', 190)
596
610
 
597
611
  # reduce 49 omitted
598
612
 
599
- module_eval(<<'.,.,', 'parser.y', 194)
613
+ module_eval(<<'.,.,', 'parser.y', 196)
600
614
  def _reduce_50(val, _values, result)
601
615
  result = { date: val[0][1]}
602
616
  result
603
617
  end
604
618
  .,.,
605
619
 
606
- module_eval(<<'.,.,', 'parser.y', 195)
620
+ module_eval(<<'.,.,', 'parser.y', 197)
607
621
  def _reduce_51(val, _values, result)
608
622
  result = { date: val[0][1], time: val[1][1] }
609
623
  result
610
624
  end
611
625
  .,.,
612
626
 
613
- module_eval(<<'.,.,', 'parser.y', 196)
627
+ module_eval(<<'.,.,', 'parser.y', 198)
614
628
  def _reduce_52(val, _values, result)
615
629
  result = { time: val[0][1]}
616
630
  result
617
631
  end
618
632
  .,.,
619
633
 
620
- module_eval(<<'.,.,', 'parser.y', 200)
634
+ module_eval(<<'.,.,', 'parser.y', 204)
621
635
  def _reduce_53(val, _values, result)
622
- result = { geo: val[0]}
636
+ ## todo - add possible status_notes too!!!
637
+ result = { status: val[0][1][:status] }
638
+
623
639
  result
624
640
  end
625
641
  .,.,
626
642
 
627
- module_eval(<<'.,.,', 'parser.y', 201)
643
+ module_eval(<<'.,.,', 'parser.y', 209)
628
644
  def _reduce_54(val, _values, result)
629
- result = {}
645
+ result = { status: val[0][1][:status],
646
+ geo: val[1] }
647
+
630
648
  result
631
649
  end
632
650
  .,.,
633
651
 
634
- module_eval(<<'.,.,', 'parser.y', 205)
652
+ module_eval(<<'.,.,', 'parser.y', 212)
635
653
  def _reduce_55(val, _values, result)
636
- result = val[1]
654
+ result = { geo: val[0] }
637
655
  result
638
656
  end
639
657
  .,.,
640
658
 
641
- module_eval(<<'.,.,', 'parser.y', 208)
659
+ module_eval(<<'.,.,', 'parser.y', 213)
642
660
  def _reduce_56(val, _values, result)
643
- result = val
661
+ result = {}
644
662
  result
645
663
  end
646
664
  .,.,
647
665
 
648
- module_eval(<<'.,.,', 'parser.y', 209)
666
+ module_eval(<<'.,.,', 'parser.y', 218)
649
667
  def _reduce_57(val, _values, result)
650
- result.push( val[2] )
668
+ result = val[1]
651
669
  result
652
670
  end
653
671
  .,.,
654
672
 
655
- module_eval(<<'.,.,', 'parser.y', 214)
673
+ module_eval(<<'.,.,', 'parser.y', 221)
656
674
  def _reduce_58(val, _values, result)
675
+ result = val
676
+ result
677
+ end
678
+ .,.,
679
+
680
+ module_eval(<<'.,.,', 'parser.y', 222)
681
+ def _reduce_59(val, _values, result)
682
+ result.push( val[2] )
683
+ result
684
+ end
685
+ .,.,
686
+
687
+ module_eval(<<'.,.,', 'parser.y', 227)
688
+ def _reduce_60(val, _values, result)
657
689
  result = { team1: val[0],
658
690
  team2: val[2]
659
691
  }.merge( val[1] )
@@ -662,29 +694,41 @@ module_eval(<<'.,.,', 'parser.y', 214)
662
694
  end
663
695
  .,.,
664
696
 
665
- module_eval(<<'.,.,', 'parser.y', 219)
666
- def _reduce_59(val, _values, result)
667
- result = { score: val[0][1] }
697
+ module_eval(<<'.,.,', 'parser.y', 233)
698
+ def _reduce_61(val, _values, result)
699
+ result = { team1: val[0], team2: val[2] }
700
+
668
701
  result
669
702
  end
670
703
  .,.,
671
704
 
672
- module_eval(<<'.,.,', 'parser.y', 220)
673
- def _reduce_60(val, _values, result)
674
- result = {}
705
+ module_eval(<<'.,.,', 'parser.y', 237)
706
+ def _reduce_62(val, _values, result)
707
+ result = { team1: val[0],
708
+ team2: val[2],
709
+ score: val[3][1]
710
+ }
711
+
675
712
  result
676
713
  end
677
714
  .,.,
678
715
 
679
- module_eval(<<'.,.,', 'parser.y', 221)
680
- def _reduce_61(val, _values, result)
716
+ module_eval(<<'.,.,', 'parser.y', 243)
717
+ def _reduce_63(val, _values, result)
718
+ result = { score: val[0][1] }
719
+ result
720
+ end
721
+ .,.,
722
+
723
+ module_eval(<<'.,.,', 'parser.y', 244)
724
+ def _reduce_64(val, _values, result)
681
725
  result = {}
682
726
  result
683
727
  end
684
728
  .,.,
685
729
 
686
- module_eval(<<'.,.,', 'parser.y', 238)
687
- def _reduce_62(val, _values, result)
730
+ module_eval(<<'.,.,', 'parser.y', 261)
731
+ def _reduce_65(val, _values, result)
688
732
  kwargs = val[1]
689
733
  @tree << GoalLine.new( **kwargs )
690
734
 
@@ -692,8 +736,8 @@ module_eval(<<'.,.,', 'parser.y', 238)
692
736
  end
693
737
  .,.,
694
738
 
695
- module_eval(<<'.,.,', 'parser.y', 243)
696
- def _reduce_63(val, _values, result)
739
+ module_eval(<<'.,.,', 'parser.y', 266)
740
+ def _reduce_66(val, _values, result)
697
741
  kwargs = val[0]
698
742
  @tree << GoalLine.new( **kwargs )
699
743
 
@@ -701,8 +745,8 @@ module_eval(<<'.,.,', 'parser.y', 243)
701
745
  end
702
746
  .,.,
703
747
 
704
- module_eval(<<'.,.,', 'parser.y', 248)
705
- def _reduce_64(val, _values, result)
748
+ module_eval(<<'.,.,', 'parser.y', 271)
749
+ def _reduce_67(val, _values, result)
706
750
  result = { goals1: val[0],
707
751
  goals2: [] }
708
752
 
@@ -710,8 +754,8 @@ module_eval(<<'.,.,', 'parser.y', 248)
710
754
  end
711
755
  .,.,
712
756
 
713
- module_eval(<<'.,.,', 'parser.y', 251)
714
- def _reduce_65(val, _values, result)
757
+ module_eval(<<'.,.,', 'parser.y', 274)
758
+ def _reduce_68(val, _values, result)
715
759
  result = { goals1: [],
716
760
  goals2: val[2] }
717
761
 
@@ -719,8 +763,8 @@ module_eval(<<'.,.,', 'parser.y', 251)
719
763
  end
720
764
  .,.,
721
765
 
722
- module_eval(<<'.,.,', 'parser.y', 254)
723
- def _reduce_66(val, _values, result)
766
+ module_eval(<<'.,.,', 'parser.y', 277)
767
+ def _reduce_69(val, _values, result)
724
768
  result = { goals1: val[0],
725
769
  goals2: val[2] }
726
770
 
@@ -728,26 +772,26 @@ module_eval(<<'.,.,', 'parser.y', 254)
728
772
  end
729
773
  .,.,
730
774
 
731
- # reduce 67 omitted
775
+ # reduce 70 omitted
732
776
 
733
- # reduce 68 omitted
777
+ # reduce 71 omitted
734
778
 
735
- module_eval(<<'.,.,', 'parser.y', 268)
736
- def _reduce_69(val, _values, result)
779
+ module_eval(<<'.,.,', 'parser.y', 291)
780
+ def _reduce_72(val, _values, result)
737
781
  result = val
738
782
  result
739
783
  end
740
784
  .,.,
741
785
 
742
- module_eval(<<'.,.,', 'parser.y', 269)
743
- def _reduce_70(val, _values, result)
786
+ module_eval(<<'.,.,', 'parser.y', 292)
787
+ def _reduce_73(val, _values, result)
744
788
  result.push( val[1])
745
789
  result
746
790
  end
747
791
  .,.,
748
792
 
749
- module_eval(<<'.,.,', 'parser.y', 274)
750
- def _reduce_71(val, _values, result)
793
+ module_eval(<<'.,.,', 'parser.y', 297)
794
+ def _reduce_74(val, _values, result)
751
795
  result = Goal.new( player: val[0],
752
796
  minutes: val[1] )
753
797
 
@@ -755,29 +799,29 @@ module_eval(<<'.,.,', 'parser.y', 274)
755
799
  end
756
800
  .,.,
757
801
 
758
- module_eval(<<'.,.,', 'parser.y', 281)
759
- def _reduce_72(val, _values, result)
802
+ module_eval(<<'.,.,', 'parser.y', 304)
803
+ def _reduce_75(val, _values, result)
760
804
  result = val
761
805
  result
762
806
  end
763
807
  .,.,
764
808
 
765
- module_eval(<<'.,.,', 'parser.y', 282)
766
- def _reduce_73(val, _values, result)
809
+ module_eval(<<'.,.,', 'parser.y', 305)
810
+ def _reduce_76(val, _values, result)
767
811
  result.push( val[1])
768
812
  result
769
813
  end
770
814
  .,.,
771
815
 
772
- module_eval(<<'.,.,', 'parser.y', 283)
773
- def _reduce_74(val, _values, result)
816
+ module_eval(<<'.,.,', 'parser.y', 306)
817
+ def _reduce_77(val, _values, result)
774
818
  result.push( val[2])
775
819
  result
776
820
  end
777
821
  .,.,
778
822
 
779
- module_eval(<<'.,.,', 'parser.y', 289)
780
- def _reduce_75(val, _values, result)
823
+ module_eval(<<'.,.,', 'parser.y', 312)
824
+ def _reduce_78(val, _values, result)
781
825
  kwargs = {}.merge( val[0][1] )
782
826
  result = Minute.new( **kwargs )
783
827
 
@@ -785,8 +829,8 @@ module_eval(<<'.,.,', 'parser.y', 289)
785
829
  end
786
830
  .,.,
787
831
 
788
- module_eval(<<'.,.,', 'parser.y', 294)
789
- def _reduce_76(val, _values, result)
832
+ module_eval(<<'.,.,', 'parser.y', 317)
833
+ def _reduce_79(val, _values, result)
790
834
  kwargs = { }.merge( val[0][1] ).merge( val[1] )
791
835
  result = Minute.new( **kwargs )
792
836
 
@@ -794,22 +838,22 @@ module_eval(<<'.,.,', 'parser.y', 294)
794
838
  end
795
839
  .,.,
796
840
 
797
- module_eval(<<'.,.,', 'parser.y', 298)
798
- def _reduce_77(val, _values, result)
841
+ module_eval(<<'.,.,', 'parser.y', 321)
842
+ def _reduce_80(val, _values, result)
799
843
  result = { og: true }
800
844
  result
801
845
  end
802
846
  .,.,
803
847
 
804
- module_eval(<<'.,.,', 'parser.y', 299)
805
- def _reduce_78(val, _values, result)
848
+ module_eval(<<'.,.,', 'parser.y', 322)
849
+ def _reduce_81(val, _values, result)
806
850
  result = { pen: true }
807
851
  result
808
852
  end
809
853
  .,.,
810
854
 
811
- module_eval(<<'.,.,', 'parser.y', 304)
812
- def _reduce_79(val, _values, result)
855
+ module_eval(<<'.,.,', 'parser.y', 327)
856
+ def _reduce_82(val, _values, result)
813
857
  puts ' MATCH empty_line'
814
858
  result
815
859
  end
@@ -1,15 +1,16 @@
1
-
1
+ module SportDb
2
+ class Parser
3
+
2
4
  ## (match) status
3
5
  ## note: english usage - cancelled (in UK), canceled (in US)
4
6
  ##
5
7
  ## add more variants - why? why not?
6
8
 
7
9
 
8
-
9
-
10
10
  STATUS_RE = %r{
11
- \[
12
- ### allow long forms with note/comment for some stati
11
+ \[
12
+ (?:
13
+ ### opt 1 - allow long forms with note/comment for some stati
13
14
  (?: (?<status> awarded
14
15
  |
15
16
  annulled
@@ -19,7 +20,8 @@ STATUS_RE = %r{
19
20
  [ ]*
20
21
  )
21
22
  |
22
- ## short from only (no note/comments)
23
+
24
+ ## opt 2 - short from only (no note/comments)
23
25
  (?<status>
24
26
  cancelled|canceled|can\.
25
27
  |
@@ -33,6 +35,11 @@ STATUS_RE = %r{
33
35
  |
34
36
  annulled
35
37
  )
36
- \]
37
- }ix
38
+ )
39
+ \]
40
+ }ix
41
+
38
42
 
43
+ end # class Parser
44
+ end # module SportDb
45
+
@@ -4,7 +4,7 @@ module SportDb
4
4
  module Parser
5
5
  MAJOR = 0 ## todo: namespace inside version or something - why? why not??
6
6
  MINOR = 5
7
- PATCH = 1
7
+ PATCH = 2
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
@@ -234,7 +234,8 @@ RoundHeader = Struct.new( :names ) do
234
234
  end
235
235
 
236
236
  MatchLine = Struct.new( :ord, :date, :time,
237
- :team1, :team2, :score,
237
+ :team1, :team2, :score,
238
+ :status,
238
239
  :geo ) do ## change to geos - why? why not?
239
240
 
240
241
  def pretty_print( printer )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportdb-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer