line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
662040
|
use strict; |
|
2
|
|
|
|
|
23
|
|
|
2
|
|
|
|
|
63
|
|
2
|
2
|
|
|
2
|
|
12
|
use warnings FATAL => 'all'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
128
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package MarpaX::ESLIF; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: ESLIF is Extended ScanLess InterFace |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
14
|
use vars qw/$VERSION/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
136
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
BEGIN { |
13
|
2
|
|
|
2
|
|
6
|
our $VERSION = '2.0.23'; # VERSION |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
10
|
require XSLoader; |
16
|
2
|
|
|
|
|
1511
|
XSLoader::load(__PACKAGE__, $VERSION); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Load our explicit sub-modules |
20
|
|
|
|
|
|
|
use MarpaX::ESLIF::Event::Type; |
21
|
|
|
|
|
|
|
use MarpaX::ESLIF::Grammar; |
22
|
|
|
|
|
|
|
use MarpaX::ESLIF::Grammar::Properties; |
23
|
|
|
|
|
|
|
use MarpaX::ESLIF::Grammar::Rule::Properties; |
24
|
|
|
|
|
|
|
use MarpaX::ESLIF::Grammar::Symbol::Properties; |
25
|
|
|
|
|
|
|
use MarpaX::ESLIF::Logger::Level; |
26
|
|
|
|
|
|
|
use MarpaX::ESLIF::Symbol::PropertyBitSet; |
27
|
|
|
|
|
|
|
use MarpaX::ESLIF::Symbol::Type; |
28
|
|
|
|
|
|
|
use MarpaX::ESLIF::Value::Type; |
29
|
|
|
|
|
|
|
use MarpaX::ESLIF::Rule::PropertyBitSet; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my @REGISTRY = (); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _logger_to_self { |
35
|
|
|
|
|
|
|
my ($class, $loggerInterface) = @_; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $definedLoggerInterface = defined($loggerInterface); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
foreach (@REGISTRY) { |
40
|
|
|
|
|
|
|
my $_loggerInterface = $_->_getLoggerInterface; |
41
|
|
|
|
|
|
|
my $_definedLoggerInterface = defined($_loggerInterface); |
42
|
|
|
|
|
|
|
return $_ |
43
|
|
|
|
|
|
|
if ( |
44
|
|
|
|
|
|
|
(! $definedLoggerInterface && ! $_definedLoggerInterface) |
45
|
|
|
|
|
|
|
|| |
46
|
|
|
|
|
|
|
($definedLoggerInterface && $_definedLoggerInterface && ($loggerInterface == $_loggerInterface)) |
47
|
|
|
|
|
|
|
) |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
return |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub new { |
54
|
|
|
|
|
|
|
my ($class, $loggerInterface) = @_; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $self = $class->_logger_to_self($loggerInterface); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
push(@REGISTRY, $self = bless [ MarpaX::ESLIF::Engine->allocate($loggerInterface), $loggerInterface ], $class) if ! defined($self); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
return $self |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub getInstance { |
64
|
|
|
|
|
|
|
goto &new |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub version { |
68
|
|
|
|
|
|
|
return MarpaX::ESLIF::Engine::version |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub _getInstance { |
72
|
|
|
|
|
|
|
return $_[0]->[0] |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub _getLoggerInterface { |
76
|
|
|
|
|
|
|
return $_[0]->[1] |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub CLONE { |
80
|
|
|
|
|
|
|
# |
81
|
|
|
|
|
|
|
# One perl thread <-> one perl interpreter |
82
|
|
|
|
|
|
|
# |
83
|
|
|
|
|
|
|
map { $_->[0] = MarpaX::ESLIF::Engine->allocate($_->_getLoggerInterface) } @REGISTRY |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
sub DESTROY { |
87
|
|
|
|
|
|
|
MarpaX::ESLIF::Engine->dispose($_[0]->[0]) |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
1; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
__END__ |