Branch Coverage

blib/lib/RDF/Trine/Parser/Turtle/Lexer.pm
Criterion Covered Total %
branch 178 236 75.4


line true false branch
108 412 0 if (scalar @_ == 1) { }
172 516 18311 unless (length $self->{'buffer'})
177 301 18526 unless defined $c and length $c
182 1 18525 if ($c eq '.' and $self->{'buffer'} =~ /$r_decimal/)
186 2953 15572 if (defined(my $name = $CHAR_TOKEN{$c})) { }
3672 11900 elsif (defined(my $method = $METHOD_TOKEN{$c})) { }
196 11704 elsif ($c eq '#') { }
9011 2693 elsif ($c =~ /[ \r\n\t]/) { }
2649 44 elsif ($c =~ /[A-Za-z\x{00C0}-\x{00D6}\x{00D8}-\x{00F6}\x{00F8}-\x{02FF}\x{0370}-\x{037D}\x{037F}-\x{1FFF}\x{200C}-\x{200D}\x{2070}-\x{218F}\x{2C00}-\x{2FEF}\x{3001}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFFD}\x{10000}-\x{EFFFF}]/) { }
38 6 elsif ($c eq '^') { }
204 60 2589 if ($self->{'buffer'} =~ /^a(?!:)\s/) { }
10 2579 elsif ($self->{'buffer'} =~ /^(?:true|false)(?!:)\b/) { }
4 2575 elsif ($self->{'buffer'} =~ /^BASE(?!:)\b/i) { }
3 2572 elsif ($self->{'buffer'} =~ /^PREFIX(?!:)\b/i) { }
241 4590 0 unless (length $self->buffer)
243 3698 892 if (defined $line)
258 1 386 if (defined $c and $c eq "\x{feff}")
267 0 5888 if ($c ne $char)
275 0 26 if (length $self->{'buffer'} == 0)
277 0 0 if (length $self->{'buffer'} == 0)
282 0 26 if ($c eq "\n") { }
296 3555 29497 if ($c eq "\n") { }
309 4047 43713 if (length $self->{'buffer'} == 0)
311 587 3460 if (length $self->{'buffer'} == 0)
326 1 506 if (substr($self->{'buffer'}, 0, length $word) ne $word)
334 0 506 if ($lines) { }
354 31 5998 if ($lines) { }
366 2839 280 if ($self->{'buffer'} =~ /^$r_PNAME_LN/) { }
385 0 3755 unless defined $c
386 11 3744 if (substr($self->{'buffer'}, 0, 1) eq '\\') { }
1875 1869 elsif ($self->{'buffer'} =~ /^[^<>\x00-\x20\\"{}|^`]+/) { }
1865 4 elsif (substr($self->{'buffer'}, 0, 1) eq '>') { }
389 0 11 if ($esc eq '\\') { }
3 8 elsif ($esc eq 'U') { }
6 2 elsif ($esc eq 'u') { }
393 1 2 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
399 1 5 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
403 3 2 if ($char =~ /[<>" {}|\\^`]/)
425 0 83 unless ($self->{'buffer'} =~ /^$r_bnode_id/o)
435 9 72 if ($self->{'buffer'} =~ /^$r_double/) { }
11 61 elsif ($self->{'buffer'} =~ /^$r_decimal/) { }
59 2 elsif ($self->{'buffer'} =~ /^$r_integer/) { }
455 196 0 if (length $c and $c =~ /[\r\n]/)
465 29 736 if (substr($self->{'buffer'}, 0, 2) eq '""') { }
472 23 161 if (length $self->{'buffer'} == 0)
474 3 20 if (length $self->{'buffer'} == 0)
478 88 93 if (substr($self->{'buffer'}, 0, 1) eq '"') { }
481 26 62 if ($quote_count == 3)
485 8 85 if ($quote_count)
489 26 67 if (substr($self->{'buffer'}, 0, 1) eq '\\') { }
493 1 25 if ($esc eq '\\') { }
5 20 elsif ($esc eq '"') { }
0 20 elsif ($esc eq q[']) { }
4 16 elsif ($esc eq 'r') { }
4 12 elsif ($esc eq 't') { }
4 8 elsif ($esc eq 'n') { }
0 8 elsif ($esc eq 'b') { }
0 8 elsif ($esc eq 'f') { }
0 8 elsif ($esc eq '>') { }
4 4 elsif ($esc eq 'U') { }
4 0 elsif ($esc eq 'u') { }
504 0 4 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
511 0 4 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
530 96 1527 if (substr($self->{'buffer'}, 0, 1) eq '\\') { }
795 732 elsif ($self->{'buffer'} =~ /^[^"\\]+/) { }
730 2 elsif (substr($self->{'buffer'}, 0, 1) eq '"') { }
534 45 51 if ($esc eq '\\') { }
44 7 elsif ($esc eq '"') { }
0 7 elsif ($esc eq q[']) { }
0 7 elsif ($esc eq 'r') { }
0 7 elsif ($esc eq 't') { }
1 6 elsif ($esc eq 'n') { }
0 6 elsif ($esc eq 'b') { }
0 6 elsif ($esc eq 'f') { }
0 6 elsif ($esc eq '>') { }
3 3 elsif ($esc eq 'U') { }
2 1 elsif ($esc eq 'u') { }
545 2 1 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
552 1 1 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
577 10 22 if (substr($self->{'buffer'}, 0, 2) eq q['']) { }
584 4 43 if (length $self->{'buffer'} == 0)
586 1 3 if (length $self->{'buffer'} == 0)
590 31 15 if (substr($self->{'buffer'}, 0, 1) eq q[']) { }
593 9 22 if ($quote_count == 3)
597 3 12 if ($quote_count)
601 0 15 if (substr($self->{'buffer'}, 0, 1) eq '\\') { }
605 0 0 if ($esc eq '\\') { }
0 0 elsif ($esc eq '"') { }
0 0 elsif ($esc eq q[']) { }
0 0 elsif ($esc eq 'r') { }
0 0 elsif ($esc eq 't') { }
0 0 elsif ($esc eq 'n') { }
0 0 elsif ($esc eq 'b') { }
0 0 elsif ($esc eq 'f') { }
0 0 elsif ($esc eq '>') { }
0 0 elsif ($esc eq 'U') { }
0 0 elsif ($esc eq 'u') { }
616 0 0 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
623 0 0 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
642 8 36 if (substr($self->{'buffer'}, 0, 1) eq '\\') { }
14 22 elsif ($self->{'buffer'} =~ /^[^'\\]+/) { }
20 2 elsif (substr($self->{'buffer'}, 0, 1) eq q[']) { }
646 1 7 if ($esc eq '\\') { }
0 7 elsif ($esc eq '"') { }
0 7 elsif ($esc eq q[']) { }
1 6 elsif ($esc eq 'r') { }
1 5 elsif ($esc eq 't') { }
1 4 elsif ($esc eq 'n') { }
1 3 elsif ($esc eq 'b') { }
1 2 elsif ($esc eq 'f') { }
0 2 elsif ($esc eq '>') { }
1 1 elsif ($esc eq 'U') { }
1 0 elsif ($esc eq 'u') { }
657 0 1 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
664 0 1 unless ($codepoint =~ /^[0-9A-Fa-f]+$/)
688 7 282 if ($self->{'buffer'} =~ /^base/) { }
257 25 elsif ($self->{'buffer'} =~ /^prefix/) { }
695 24 1 if ($self->{'buffer'} =~ /^[a-zA-Z]+(-[a-zA-Z0-9]+)*\b/) { }