« blib/lib/DTL/Fast/Cache/Serialized.pm
↑ Summary
blib/lib/DTL/Fast/Expression/Operator/Binary/Ge.pm »
| 1 | package DTL::Fast::Expression; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 98 | ▶ | use strict; use utf8; use warnings FATAL => 'all'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 98 | ▶ | use parent 'DTL::Fast::Replacer'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | 98 | ▶ | use DTL::Fast; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 98 | ▶ | use DTL::Fast::Variable; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 98 | ▶ | use DTL::Fast::Expression::Operator; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 98 | ▶ | use DTL::Fast::Replacer::Replacement; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||
| 10 | 98 | ▶ | use Data::Dumper; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | 98 | our %EXPRESSION_CACHE = (); | |||||||||||||||||||||||||||||||||||||||||
| 13 | 98 | our $EXPRESSION_CACHE_HITS = 0; | |||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | # @todo cache mechanism via get_expression | ||||||||||||||||||||||||||||||||||||||||||
| 16 | sub new | ||||||||||||||||||||||||||||||||||||||||||
| 17 | { | ||||||||||||||||||||||||||||||||||||||||||
| 18 | 1817 | ▶ | my( $proto, $expression, %kwargs ) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | 1817 | my $result = undef; | |||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||
| 21 | 1817 | $expression =~ s/^\s+|\s+$//xgsi; | |||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | 1817 | ▶ | if( | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
not $kwargs{"replacement"} || $kwargs{"level"} and $DTL::Fast::Expression::EXPRESSION_CACHE{$expression}
$kwargs{'replacement'} || $kwargs{'level'}
MC/DC66%2/3
not $kwargs{"replacement"} || $kwargs{"level"} and $DTL::Fast::Expression::EXPRESSION_CACHE{$expression}
$kwargs{'replacement'}
$kwargs{'level'}
$DTL::Fast::Expression::EXPRESSION_CACHE{$expression}
Truth table75%3/4
not(A || B) and C
A= $kwargs{'replacement'}B= $kwargs{'level'}C= $DTL::Fast::Expression::EXPRESSION_CACHE{$expression}
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | not $kwargs{'replacement'} # cache only top-level expressions | ||||||||||||||||||||||||||||||||||||||||||
| 25 | and not $kwargs{'level'} # same ^^ | ||||||||||||||||||||||||||||||||||||||||||
| 26 | and $EXPRESSION_CACHE{$expression} # has cached expression | ||||||||||||||||||||||||||||||||||||||||||
| 27 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 28 | { | ||||||||||||||||||||||||||||||||||||||||||
| 29 | 1367 | $result = $EXPRESSION_CACHE{$expression}; | |||||||||||||||||||||||||||||||||||||||||
| 30 | 1367 | $EXPRESSION_CACHE_HITS++; | |||||||||||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||||||||||||
| 32 | else | ||||||||||||||||||||||||||||||||||||||||||
| 33 | { | ||||||||||||||||||||||||||||||||||||||||||
| 34 | 450 | $kwargs{'expression'} = $expression; | |||||||||||||||||||||||||||||||||||||||||
| 35 | 450 | ▶ | $kwargs{'level'} //= 0; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$kwargs{"level"} //= 0
MC/DC100%1/1
$kwargs{"level"} //= 0
$kwargs{"level"}
Truth table100%2/2
A
A= $kwargs{"level"}
| |||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | 450 | my $self = $proto->SUPER::new(%kwargs); | |||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | 450 | $self->{'expression'} = $self->_parse_expression( | |||||||||||||||||||||||||||||||||||||||||
| 40 | $self->_parse_brackets( | ||||||||||||||||||||||||||||||||||||||||||
| 41 | $self->backup_strings($expression) | ||||||||||||||||||||||||||||||||||||||||||
| 42 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 43 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | 441 | $EXPRESSION_CACHE{$expression} = $result = $self->{'expression'}; | |||||||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | 1808 | return $result; | |||||||||||||||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||
| 51 | sub _parse_brackets | ||||||||||||||||||||||||||||||||||||||||||
| 52 | { | ||||||||||||||||||||||||||||||||||||||||||
| 53 | 450 | ▶ | my( $self, $expression ) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_parse_brackets: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||
| 55 | 450 | $expression =~ s/\s+/ /xgsi; | |||||||||||||||||||||||||||||||||||||||||
| 56 | 450 | ▶ | while( $expression =~ s/ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 57 | \(\s*([^()]+)\s*\) | ||||||||||||||||||||||||||||||||||||||||||
| 58 | / | ||||||||||||||||||||||||||||||||||||||||||
| 59 | 11 | $self->backup_expression($1) | |||||||||||||||||||||||||||||||||||||||||
| 60 | /xge ){}; | ||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||
| 62 | 450 | ▶ | die $self->get_parse_error('unpaired brackets in expression') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 63 | if $expression =~ /[()]/; | ||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||
| 65 | 449 | return $expression; | |||||||||||||||||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||
| 68 | sub get_parse_error | ||||||||||||||||||||||||||||||||||||||||||
| 69 | { | ||||||||||||||||||||||||||||||||||||||||||
| 70 | 4 | ▶ | my ($self, $message, @additional) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_parse_error: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | return $self->SUPER::get_parse_error( | ||||||||||||||||||||||||||||||||||||||||||
| 73 | $message | ||||||||||||||||||||||||||||||||||||||||||
| 74 | , @additional | ||||||||||||||||||||||||||||||||||||||||||
| 75 | 4 | , 'Expression' => $self->{'expression'} | |||||||||||||||||||||||||||||||||||||||||
| 76 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||
| 79 | sub _parse_expression | ||||||||||||||||||||||||||||||||||||||||||
| 80 | { | ||||||||||||||||||||||||||||||||||||||||||
| 81 | 449 | ▶ | my( $self, $expression ) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_parse_expression: called CC=22 SCAR=31.3
| |||||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||
| 83 | 449 | my $result = undef; | |||||||||||||||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||||||||||||||||
| 85 | 449 | ▶ | for( my $level = $self->{'level'}; $level < scalar @DTL::Fast::OPS_RE; $level++ ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 86 | { | ||||||||||||||||||||||||||||||||||||||||||
| 87 | 2034 | my $operators = $DTL::Fast::OPS_RE[$level]; | |||||||||||||||||||||||||||||||||||||||||
| 88 | 2034 | my @result = (); | |||||||||||||||||||||||||||||||||||||||||
| 89 | 2034 | my @source = split / | |||||||||||||||||||||||||||||||||||||||||
| 90 | (?:^|\s+) | ||||||||||||||||||||||||||||||||||||||||||
| 91 | ($operators) | ||||||||||||||||||||||||||||||||||||||||||
| 92 | (?:$|\s+) | ||||||||||||||||||||||||||||||||||||||||||
| 93 | /six, $expression; | ||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||
| 95 | 2034 | ▶ | if( scalar @source > 1 ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 96 | { | ||||||||||||||||||||||||||||||||||||||||||
| 97 | # processing operands | ||||||||||||||||||||||||||||||||||||||||||
| 98 | 186 | ▶ | while( defined ( my $token = shift @source) ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 99 | { | ||||||||||||||||||||||||||||||||||||||||||
| 100 | 565 | ▶ | next if $token eq ''; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||
| 102 | 519 | ▶ | if( $token =~ /^$operators$/six ) # operation | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 103 | { | ||||||||||||||||||||||||||||||||||||||||||
| 104 | 190 | push @result, $token; | |||||||||||||||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||||||||||||||||
| 106 | else | ||||||||||||||||||||||||||||||||||||||||||
| 107 | { | ||||||||||||||||||||||||||||||||||||||||||
| 108 | 329 | push @result, $self->get_backup_or_expression($token, $level); | |||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||
| 112 | # processing operators | ||||||||||||||||||||||||||||||||||||||||||
| 113 | 182 | ▶ | while( my $token = shift @result ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 114 | { | ||||||||||||||||||||||||||||||||||||||||||
| 115 | 323 | ▶ | if( ref $token ) # operand | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 116 | { | ||||||||||||||||||||||||||||||||||||||||||
| 117 | 136 | $result = $token; | |||||||||||||||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||||||||||||||||
| 119 | else # operator | ||||||||||||||||||||||||||||||||||||||||||
| 120 | { | ||||||||||||||||||||||||||||||||||||||||||
| 121 | 187 | ▶ | if( | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
scalar @result and ref $result[0]
MC/DC50%1/2
scalar @result and ref $result[0]
scalar @result
ref $result[0]
Truth table66%2/3
A and B
A= scalar @resultB= ref $result[0]
| |||||||||||||||||||||||||||||||||||||||||||
| 122 | scalar @result # there is a next token | ||||||||||||||||||||||||||||||||||||||||||
| 123 | and ref $result[0] # it's an operand | ||||||||||||||||||||||||||||||||||||||||||
| 124 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 125 | { | ||||||||||||||||||||||||||||||||||||||||||
| 126 | 186 | my $operand = shift @result; | |||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||
| 128 | 186 | ▶ | if( not exists $DTL::Fast::OPS_HANDLERS{$token} | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
not exists $DTL::Fast::OPS_HANDLERS{$token} and exists $DTL::Fast::KNOWN_OPS_PLAIN{$token}
MC/DC50%1/2
not exists $DTL::Fast::OPS_HANDLERS{$token} and exists $DTL::Fast::KNOWN_OPS_PLAIN{$token}
not exists $DTL::Fast::OPS_HANDLERS{$token}
exists $DTL::Fast::KNOWN_OPS_PLAIN{$token}
Truth table66%2/3
not(A) and B
A= not exists $DTL::Fast::OPS_HANDLERS{$token}B= exists $DTL::Fast::KNOWN_OPS_PLAIN{$token}
| |||||||||||||||||||||||||||||||||||||||||||
| 129 | and exists $DTL::Fast::KNOWN_OPS_PLAIN{$token} | ||||||||||||||||||||||||||||||||||||||||||
| 130 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 131 | { | ||||||||||||||||||||||||||||||||||||||||||
| 132 | 31 | require Module::Load; | |||||||||||||||||||||||||||||||||||||||||
| 133 | 31 | Module::Load::load($DTL::Fast::KNOWN_OPS_PLAIN{$token}); | |||||||||||||||||||||||||||||||||||||||||
| 134 | 31 | $DTL::Fast::LOADED_MODULES{$DTL::Fast::KNOWN_OPS_PLAIN{$token}} = time; | |||||||||||||||||||||||||||||||||||||||||
| 135 | 31 | $DTL::Fast::OPS_HANDLERS{$token} = $DTL::Fast::KNOWN_OPS_PLAIN{$token}; | |||||||||||||||||||||||||||||||||||||||||
| 136 | } | ||||||||||||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||||||||||||
| 138 | 186 | ▶ | my $handler = $DTL::Fast::OPS_HANDLERS{$token} || die $self->get_parse_error("there is no processor for $token operator"); | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$DTL::Fast::OPS_HANDLERS{$token} || die($self->get_parse_error("there is no processor for $token operator"))
MC/DC0%0/1
$DTL::Fast::OPS_HANDLERS{$token} || die($self->get_parse_error("there is no processor for $token operator"))
$DTL::Fast::OPS_HANDLERS{$token}
Truth table50%1/2
A
A= $DTL::Fast::OPS_HANDLERS{$token}
| |||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||
| 140 | 186 | ▶ | if($handler->isa('DTL::Fast::Expression::Operator::Binary')) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 141 | { | ||||||||||||||||||||||||||||||||||||||||||
| 142 | 140 | ▶ | if( defined $result ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 143 | { | ||||||||||||||||||||||||||||||||||||||||||
| 144 | 139 | $result = $handler->new( $result, $operand ); | |||||||||||||||||||||||||||||||||||||||||
| 145 | } | ||||||||||||||||||||||||||||||||||||||||||
| 146 | else | ||||||||||||||||||||||||||||||||||||||||||
| 147 | { | ||||||||||||||||||||||||||||||||||||||||||
| 148 | 1 | ▶ | die $self->get_parse_error( | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$token // "undef"
MC/DC0%0/1
$token // "undef"
$token
Truth table50%1/2
A
A= $token
| |||||||||||||||||||||||||||||||||||||||||||
| 149 | sprintf('binary operator `%s` has no left argument' | ||||||||||||||||||||||||||||||||||||||||||
| 150 | , $token // 'undef' | ||||||||||||||||||||||||||||||||||||||||||
| 151 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 152 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||||||||||||||
| 155 | elsif( $handler->isa('DTL::Fast::Expression::Operator::Unary') ) | ||||||||||||||||||||||||||||||||||||||||||
| 156 | { | ||||||||||||||||||||||||||||||||||||||||||
| 157 | 46 | ▶ | if( defined $result ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 158 | { | ||||||||||||||||||||||||||||||||||||||||||
| 159 | 1 | ▶ | die $self->get_parse_error( | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$token // "undef"
MC/DC0%0/1
$token // "undef"
$token
Truth table50%1/2
A
A= $token
| |||||||||||||||||||||||||||||||||||||||||||
| 160 | sprintf('unary operator `%s` got left argument' | ||||||||||||||||||||||||||||||||||||||||||
| 161 | , $token // 'undef' | ||||||||||||||||||||||||||||||||||||||||||
| 162 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 163 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 164 | } | ||||||||||||||||||||||||||||||||||||||||||
| 165 | else | ||||||||||||||||||||||||||||||||||||||||||
| 166 | { | ||||||||||||||||||||||||||||||||||||||||||
| 167 | 45 | $result = $handler->new( $operand); | |||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||||||||||||||||
| 170 | else | ||||||||||||||||||||||||||||||||||||||||||
| 171 | { | ||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | die $self->get_parse_error('Unknown operator handler: '.$handler); | |||||||||||||||||||||||||||||||||||||||||
| 173 | } | ||||||||||||||||||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||||||||||||||||
| 175 | else # got operator but there is no more operands | ||||||||||||||||||||||||||||||||||||||||||
| 176 | { | ||||||||||||||||||||||||||||||||||||||||||
| 177 | 1 | ▶ | die $self->get_parse_error( | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$token // "undef"
MC/DC0%0/1
$token // "undef"
$token
Truth table50%1/2
A
A= $token
| |||||||||||||||||||||||||||||||||||||||||||
| 178 | sprintf('operator `%s` has no right argument' | ||||||||||||||||||||||||||||||||||||||||||
| 179 | , $token // 'undef' | ||||||||||||||||||||||||||||||||||||||||||
| 180 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 181 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 182 | } | ||||||||||||||||||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||||||||||||||||
| 185 | 179 | ▶ | last if $result; # parsed level | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 186 | } | ||||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||||
| 188 | } | ||||||||||||||||||||||||||||||||||||||||||
| 189 | return | ||||||||||||||||||||||||||||||||||||||||||
| 190 | 442 | ▶ | $result | ||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$result // $self->get_backup_or_variable($expression)
MC/DC0%0/2
$result // $self->get_backup_or_variable($expression)
$result
$self->get_backup_or_variable($expression)
Truth table66%2/3
A // B
A= $resultB= $self->get_backup_or_variable($expression)
| |||||||||||||||||||||||||||||||||||||||||||
| 191 | // $self->get_backup_or_variable($expression) | ||||||||||||||||||||||||||||||||||||||||||
| 192 | ; | ||||||||||||||||||||||||||||||||||||||||||
| 193 | } | ||||||||||||||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||||||||||||
| 195 | 98 | 1; | |||||||||||||||||||||||||||||||||||||||||