line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pegex::Chess; |
2
|
|
|
|
|
|
|
our $VERSION = '0.0.8'; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
50471
|
use Pegex::Base; |
|
1
|
|
|
|
|
2943
|
|
|
1
|
|
|
|
|
5
|
|
5
|
1
|
|
|
1
|
|
4724
|
use Pegex::Parser; |
|
1
|
|
|
|
|
23200
|
|
|
1
|
|
|
|
|
30
|
|
6
|
1
|
|
|
1
|
|
469
|
use Pegex::Chess::Grammar; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
7
|
1
|
|
|
1
|
|
350
|
use Pegex::Chess::Data; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
8
|
1
|
|
|
1
|
|
736
|
use IO::All; |
|
1
|
|
|
|
|
16986
|
|
|
1
|
|
|
|
|
11
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub parse_chess_board_file { |
11
|
1
|
|
|
1
|
0
|
38
|
my ($self, $chess_board_file, $debug) = @_; |
12
|
1
|
|
|
|
|
7
|
my $input = io->file($chess_board_file)->all; |
13
|
1
|
|
|
|
|
17435
|
my $parser = Pegex::Parser->new( |
14
|
|
|
|
|
|
|
grammar => Pegex::Chess::Grammar->new, |
15
|
|
|
|
|
|
|
receiver => Pegex::Chess::Data->new, |
16
|
|
|
|
|
|
|
debug => $debug, |
17
|
|
|
|
|
|
|
); |
18
|
1
|
|
|
|
|
189
|
return $parser->parse($input); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |