line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pegex::CSV; |
2
|
|
|
|
|
|
|
our $VERSION = '0.0.3'; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
1889
|
use Pegex::Base; |
|
2
|
|
|
|
|
1339
|
|
|
2
|
|
|
|
|
14
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
4018
|
use Pegex::Parser; |
|
2
|
|
|
|
|
18724
|
|
|
2
|
|
|
|
|
65
|
|
7
|
2
|
|
|
2
|
|
879
|
use Pegex::CSV::Grammar; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
15
|
|
8
|
2
|
|
|
2
|
|
848
|
use Pegex::CSV::LoL; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
99
|
|
9
|
2
|
|
|
2
|
|
1199
|
use Encode; |
|
2
|
|
|
|
|
19819
|
|
|
2
|
|
|
|
|
352
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub load { |
12
|
10
|
|
|
10
|
0
|
537
|
my ($self, $csv) = @_; |
13
|
|
|
|
|
|
|
|
14
|
10
|
|
|
|
|
44
|
my $parser = Pegex::Parser->new( |
15
|
|
|
|
|
|
|
grammar => Pegex::CSV::Grammar->new, |
16
|
|
|
|
|
|
|
receiver => Pegex::CSV::LoL->new, |
17
|
|
|
|
|
|
|
# debug => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
10
|
|
|
|
|
1394
|
return $parser->parse(decode_utf8 $csv); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |