line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
16
|
|
|
16
|
|
64
|
use strict; |
|
16
|
|
|
|
|
20
|
|
|
16
|
|
|
|
|
433
|
|
2
|
16
|
|
|
16
|
|
51
|
use warnings FATAL => 'all'; |
|
16
|
|
|
|
|
19
|
|
|
16
|
|
|
|
|
813
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# This module is sharing the same mechanism as MarpaX::Database::Terminfo |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
package MarpaX::Database::Terminfo::String; |
8
|
16
|
|
|
16
|
|
74
|
use base 'MarpaX::Database::Terminfo'; |
|
16
|
|
|
|
|
22
|
|
|
16
|
|
|
|
|
1352
|
|
9
|
16
|
|
|
16
|
|
6788
|
use MarpaX::Database::Terminfo::String::Grammar; |
|
16
|
|
|
|
|
30
|
|
|
16
|
|
|
|
|
446
|
|
10
|
16
|
|
|
16
|
|
78
|
use Marpa::R2; |
|
16
|
|
|
|
|
19
|
|
|
16
|
|
|
|
|
358
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# ABSTRACT: Parse a terminfo string using Marpa |
13
|
|
|
|
|
|
|
|
14
|
16
|
|
|
16
|
|
63
|
use Log::Any qw/$log/; |
|
16
|
|
|
|
|
21
|
|
|
16
|
|
|
|
|
87
|
|
15
|
16
|
|
|
16
|
|
1876
|
use Carp qw/croak/; |
|
16
|
|
|
|
|
22
|
|
|
16
|
|
|
|
|
2707
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.012'; # VERSION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------------------- |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new { |
24
|
2
|
|
|
2
|
1
|
3
|
my $class = shift; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
4
|
my $self = {}; |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
|
|
31
|
my $grammarObj = MarpaX::Database::Terminfo::String::Grammar->new(@_); |
29
|
2
|
|
|
|
|
8
|
my $grammar_option = $grammarObj->grammar_option(); |
30
|
2
|
|
|
|
|
5
|
$grammar_option->{bless_package} = __PACKAGE__; |
31
|
2
|
|
|
|
|
24
|
$self->{_G} = Marpa::R2::Scanless::G->new($grammar_option); |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
6972
|
my $recce_option = $grammarObj->recce_option(); |
34
|
2
|
|
|
|
|
10
|
$recce_option->{grammar} = $self->{_G}; |
35
|
2
|
|
|
|
|
29
|
$self->{_R} = Marpa::R2::Scanless::R->new($recce_option); |
36
|
|
|
|
|
|
|
|
37
|
2
|
|
|
|
|
492
|
bless($self, $class); |
38
|
|
|
|
|
|
|
|
39
|
2
|
|
|
|
|
29
|
return $self; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------------------- |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub parse { |
44
|
2
|
|
|
2
|
1
|
3
|
my ($self, $bufferp) = @_; |
45
|
|
|
|
|
|
|
# |
46
|
|
|
|
|
|
|
# No array reference argument: this grammar has no event |
47
|
|
|
|
|
|
|
# |
48
|
2
|
|
|
|
|
26
|
return $self->_parse($bufferp); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |