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