toastyapps-excelsior 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ PKG_FILES = %w(Rakefile) +
8
8
 
9
9
  gem_spec = Gem::Specification.new do |gem_spec|
10
10
  gem_spec.name = 'excelsior'
11
- gem_spec.version = '0.0.3'
11
+ gem_spec.version = '0.0.4'
12
12
  gem_spec.summary = 'A Ruby gem that uses C bindings to read CSV files superfast. I\'m totally serial!'
13
13
  gem_spec.description = 'A Ruby gem that uses C bindings to read CSV files superfast. I\'m totally serial!'
14
14
  gem_spec.email = 'matt@toastyapps.com'
@@ -15,13 +15,12 @@ VALUE e_parse(VALUE self, VALUE data) {
15
15
  pe = p + len;
16
16
  eof = pe;
17
17
  int has_found = 0;
18
-
19
18
 
20
- #line 32 "excelsior_reader.rl"
19
+ #line 31 "excelsior_reader.rl"
21
20
 
22
21
 
23
22
 
24
- #line 25 "excelsior_reader.c"
23
+ #line 24 "excelsior_reader.c"
25
24
  static const char _excelsior_scan_actions[] = {
26
25
  0, 1, 2, 1, 7, 1, 8, 1,
27
26
  9, 1, 10, 1, 11, 2, 0, 1,
@@ -80,9 +79,9 @@ static const int excelsior_scan_error = 0;
80
79
  static const int excelsior_scan_en_main = 2;
81
80
 
82
81
 
83
- #line 35 "excelsior_reader.rl"
82
+ #line 34 "excelsior_reader.rl"
84
83
 
85
- #line 86 "excelsior_reader.c"
84
+ #line 85 "excelsior_reader.c"
86
85
  {
87
86
  cs = excelsior_scan_start;
88
87
  ts = 0;
@@ -90,9 +89,9 @@ static const int excelsior_scan_en_main = 2;
90
89
  act = 0;
91
90
  }
92
91
 
93
- #line 36 "excelsior_reader.rl"
92
+ #line 35 "excelsior_reader.rl"
94
93
 
95
- #line 96 "excelsior_reader.c"
94
+ #line 95 "excelsior_reader.c"
96
95
  {
97
96
  int _klen;
98
97
  unsigned int _trans;
@@ -113,7 +112,7 @@ _resume:
113
112
  #line 1 "excelsior_reader.rl"
114
113
  {ts = p;}
115
114
  break;
116
- #line 117 "excelsior_reader.c"
115
+ #line 116 "excelsior_reader.c"
117
116
  }
118
117
  }
119
118
 
@@ -183,31 +182,31 @@ _eof_trans:
183
182
  {te = p+1;}
184
183
  break;
185
184
  case 4:
186
- #line 27 "excelsior_reader.rl"
185
+ #line 26 "excelsior_reader.rl"
187
186
  {act = 2;}
188
187
  break;
189
188
  case 5:
190
- #line 28 "excelsior_reader.rl"
189
+ #line 27 "excelsior_reader.rl"
191
190
  {act = 3;}
192
191
  break;
193
192
  case 6:
194
- #line 29 "excelsior_reader.rl"
193
+ #line 28 "excelsior_reader.rl"
195
194
  {act = 4;}
196
195
  break;
197
196
  case 7:
198
- #line 26 "excelsior_reader.rl"
199
- {te = p+1;{ rb_ary_push(rows, arr); arr = rb_ary_new(); }}
197
+ #line 25 "excelsior_reader.rl"
198
+ {te = p+1;{ rb_ary_push(rows, arr); arr = rb_ary_new(); has_found = 0; }}
200
199
  break;
201
200
  case 8:
202
- #line 30 "excelsior_reader.rl"
201
+ #line 29 "excelsior_reader.rl"
203
202
  {te = p+1;{ if(has_found == 0) rb_ary_push(arr, Qnil); has_found = 0;}}
204
203
  break;
205
204
  case 9:
206
- #line 26 "excelsior_reader.rl"
207
- {te = p;p--;{ rb_ary_push(rows, arr); arr = rb_ary_new(); }}
205
+ #line 25 "excelsior_reader.rl"
206
+ {te = p;p--;{ rb_ary_push(rows, arr); arr = rb_ary_new(); has_found = 0; }}
208
207
  break;
209
208
  case 10:
210
- #line 29 "excelsior_reader.rl"
209
+ #line 28 "excelsior_reader.rl"
211
210
  {te = p;p--;{ rb_ary_push(arr, rb_str_new(ts + 1, te - ts - 2)); has_found = 1;}}
212
211
  break;
213
212
  case 11:
@@ -228,7 +227,7 @@ _eof_trans:
228
227
  }
229
228
  }
230
229
  break;
231
- #line 232 "excelsior_reader.c"
230
+ #line 231 "excelsior_reader.c"
232
231
  }
233
232
  }
234
233
 
@@ -245,7 +244,7 @@ _again:
245
244
  #line 1 "excelsior_reader.rl"
246
245
  {act = 0;}
247
246
  break;
248
- #line 249 "excelsior_reader.c"
247
+ #line 248 "excelsior_reader.c"
249
248
  }
250
249
  }
251
250
 
@@ -265,7 +264,7 @@ _again:
265
264
  _out: {}
266
265
  }
267
266
 
268
- #line 37 "excelsior_reader.rl"
267
+ #line 36 "excelsior_reader.rl"
269
268
  if(RARRAY_LEN(arr) > 0) {
270
269
  rb_ary_push(rows, arr);
271
270
  }
@@ -13,7 +13,6 @@ VALUE e_parse(VALUE self, VALUE data) {
13
13
  pe = p + len;
14
14
  eof = pe;
15
15
  int has_found = 0;
16
-
17
16
  %%{
18
17
  machine excelsior_scan;
19
18
  delimeter = ",";
@@ -23,7 +22,7 @@ VALUE e_parse(VALUE self, VALUE data) {
23
22
  string = '"' (schar | '""')* '"' ;
24
23
  value = letter+;
25
24
  main := |*
26
- newline { rb_ary_push(rows, arr); arr = rb_ary_new(); };
25
+ newline { rb_ary_push(rows, arr); arr = rb_ary_new(); has_found = 0; };
27
26
  space;
28
27
  value { rb_ary_push(arr, rb_str_new(ts, te - ts)); has_found = 1;};
29
28
  string { rb_ary_push(arr, rb_str_new(ts + 1, te - ts - 2)); has_found = 1;};
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toastyapps-excelsior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Mongeau