| 1 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use warnings FATAL => 'all'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | package MarpaX::Java::ClassFile::BNF::StackMapFrameArray; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use Moo; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | # ABSTRACT: Parsing an array of stack_map_frame | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | our $VERSION = '0.008'; # VERSION | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use Data::Section -setup; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use MarpaX::Java::ClassFile::Util::BNF qw/:all/; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | # require because we do not import ANYTHING from these module, just require they are loaded | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | require Marpa::R2; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | require MarpaX::Java::ClassFile::BNF::SameFrame; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | require MarpaX::Java::ClassFile::BNF::SameLocals1StackItemFrame; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | require MarpaX::Java::ClassFile::BNF::SameLocals1StackItemFrameExtended; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | require MarpaX::Java::ClassFile::BNF::ChopFrame; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | require MarpaX::Java::ClassFile::BNF::SameFrameExtended; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | require MarpaX::Java::ClassFile::BNF::AppendFrame; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | require MarpaX::Java::ClassFile::BNF::FullFrame; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | my $_data = ${ __PACKAGE__->section_data('bnf') }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | my $_grammar = Marpa::R2::Scanless::G->new( { source => \__PACKAGE__->bnf($_data) } ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | # -------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | # What role MarpaX::Java::ClassFile::Common requires | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | # -------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | sub grammar { $_grammar } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
grammar: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | sub callbacks { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 0 | ▶ | "'exhausted" => sub { $_[0]->exhausted }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | ▶ | 'stack_map_frame$' => sub { $_[0]->inc_nbDone }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | '^U1' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | ▶ | my $tag = $_[0]->pauseU1; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=12 SCAR=50.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | ▶ | if ($tag >= 0 && $tag <= 63) { $_[0]->inner('SameFrame', preloaded_frame_type => $tag) } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 7 branches
Condition0%0/3
$tag >= 0 and $tag <= 63
MC/DC0%0/2
$tag >= 0 and $tag <= 63
$tag >= 0
$tag <= 63
Truth table0%0/3
A and B
A= $tag >= 0B= $tag <= 63
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | 0 | ▶ | elsif ($tag >= 64 && $tag <= 127) { $_[0]->inner('SameLocals1StackItemFrame', preloaded_frame_type => $tag) } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$tag >= 64 and $tag <= 127
MC/DC0%0/2
$tag >= 64 and $tag <= 127
$tag >= 64
$tag <= 127
Truth table0%0/3
A and B
A= $tag >= 64B= $tag <= 127
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | elsif ( $tag == 247) { $_[0]->inner('SameLocals1StackItemFrameExtended', preloaded_frame_type => $tag) } | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | ▶ | elsif ($tag >= 248 && $tag <= 250) { $_[0]->inner('ChopFrame', preloaded_frame_type => $tag) } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$tag >= 248 and $tag <= 250
MC/DC0%0/2
$tag >= 248 and $tag <= 250
$tag >= 248
$tag <= 250
Truth table0%0/3
A and B
A= $tag >= 248B= $tag <= 250
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 0 | elsif ( $tag == 251) { $_[0]->inner('SameFrameExtended', preloaded_frame_type => $tag) } | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | ▶ | elsif ($tag >= 252 && $tag <= 254) { $_[0]->inner('AppendFrame', preloaded_frame_type => $tag) } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$tag >= 252 and $tag <= 254
MC/DC0%0/2
$tag >= 252 and $tag <= 254
$tag >= 252
$tag <= 254
Truth table0%0/3
A and B
A= $tag >= 252B= $tag <= 254
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 0 | elsif ( $tag == 255) { $_[0]->inner('FullFrame', preloaded_frame_type => $tag) } | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 0 | else { $_[0]->fatalf('Unmanaged frame type %s', $tag) } | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 0 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
callbacks: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | with qw/MarpaX::Java::ClassFile::Role::Parser::InnerGrammar/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | =pod | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | =encoding UTF-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | MarpaX::Java::ClassFile::BNF::StackMapFrameArray - Parsing an array of stack_map_frame | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | =head1 VERSION | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | version 0.008 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | Jean-Damien Durand <jeandamiendurand@free.fr> | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | This software is copyright (c) 2016 by Jean-Damien Durand. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | __DATA__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | __[ bnf ]__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | :default ::= action => [values] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | :lexeme ~ <U1> pause => before event => '^U1' | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | event 'stack_map_frame$' = completed stack_map_frame | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | stackMapFrameArray ::= stack_map_frame* | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | stack_map_frame ::= U1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | | MANAGED action => ::first | ||||||||||||||||||||||||||||||||||||||||||||||||||||