line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pegex::CSV; |
2
|
|
|
|
|
|
|
our $VERSION = '0.0.4'; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
1576
|
use Pegex::Base; |
|
2
|
|
|
|
|
1232
|
|
|
2
|
|
|
|
|
11
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
3051
|
use Pegex::Parser; |
|
2
|
|
|
|
|
14386
|
|
|
2
|
|
|
|
|
52
|
|
7
|
2
|
|
|
2
|
|
732
|
use Pegex::CSV::Grammar; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
11
|
|
8
|
2
|
|
|
2
|
|
675
|
use Pegex::CSV::LoL; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
54
|
|
9
|
2
|
|
|
2
|
|
947
|
use Encode; |
|
2
|
|
|
|
|
15227
|
|
|
2
|
|
|
|
|
242
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub load { |
12
|
10
|
|
|
10
|
0
|
299
|
my ($self, $csv) = @_; |
13
|
|
|
|
|
|
|
|
14
|
10
|
|
|
|
|
26
|
my $parser = Pegex::Parser->new( |
15
|
|
|
|
|
|
|
grammar => Pegex::CSV::Grammar->new, |
16
|
|
|
|
|
|
|
receiver => Pegex::CSV::LoL->new, |
17
|
|
|
|
|
|
|
# debug => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
10
|
|
|
|
|
816
|
return $parser->parse(decode_utf8 $csv); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |