ClassFile/BNF/AppendFrame.pm

filter: Statementstmt 80.7% 21 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 58.3% 7 / 12 Podpod n/a totaltotal 73.6% 28 / 38 SCAR 0.1
CC
1
Cov
81%
grammar
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.0
« ClassFile/BNF/TypeParameterTarget.pm ↑ Summary ClassFile/BNF/SameLocals1StackItemFrame.pm »
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::AppendFrame;
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: Parsing of a append_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/bnf/;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use MarpaX::Java::ClassFile::Struct::_Types qw/U1/;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶use MarpaX::Java::ClassFile::Util::ProductionMode qw/prod_isa/;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 #
18 # require because we do not import ANYTHING from these module, just require they are loaded
19 #
20 require Marpa::R2;
21 require MarpaX::Java::ClassFile::Struct::AppendFrame;
22 require MarpaX::Java::ClassFile::BNF::VerificationTypeInfoArray;
23  
24 my $_data = ${ __PACKAGE__->section_data('bnf') };
25 my $_grammar = Marpa::R2::Scanless::G->new( { source => \__PACKAGE__->bnf($_data) } );
26  
27 has preloaded_frame_type => (is => 'ro', required => 1, prod_isa(U1));
28  
29 # --------------------------------------------------------
30 # What role MarpaX::Java::ClassFile::Role::Parser requires
31 # --------------------------------------------------------
32 0 ▶sub grammar { $_grammar }
Subroutine grammar: not called CC=1 SCAR=6.9
33 sub callbacks { return {
34 0 ▶ "'exhausted" => sub { $_[0]->exhausted },
Subroutine __ANON__: not called CC=1 SCAR=6.9
35 0 ▶ 'offset_delta$' => sub { $_[0]->inner('VerificationTypeInfoArray', size => $_[0]->preloaded_frame_type - 251) }
Subroutine __ANON__: not called CC=1 SCAR=6.9
36 }
37 0 ▶ }
Subroutine callbacks: not called CC=1 SCAR=6.9
38  
39 # ---------------
40 # Grammar actions
41 # ---------------
42 sub _append_frame {
43 # my ($self, $frame_type, $offset_delta, $locals) = @_;
44  
45 0 ▶ MarpaX::Java::ClassFile::Struct::AppendFrame->new(
Subroutine _append_frame: not called CC=1 SCAR=6.9
46 frame_type => $_[1],
47 offset_delta => $_[2],
48 locals => $_[3]
49 )
50 }
51  
52 with 'MarpaX::Java::ClassFile::Role::Parser';
53  
54 1;
55  
56 =pod
57  
58 =encoding UTF-8
59  
60 =head1 NAME
61  
62 MarpaX::Java::ClassFile::BNF::AppendFrame - Parsing of a append_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 event 'offset_delta$' = completed offset_delta
84 append_frame ::= frame_type offset_delta locals action => _append_frame
85 frame_type ::= U1 action => u1
86 offset_delta ::= U2 action => u2
87 locals ::= MANAGED action => ::first
« ClassFile/BNF/TypeParameterTarget.pm ↑ Summary ClassFile/BNF/SameLocals1StackItemFrame.pm »