ClassFile/BNF/SameLocals1StackItemFrame.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/AppendFrame.pm ↑ Summary ClassFile/BNF/SameLocals1StackItemFrameExtended.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::SameLocals1StackItemFrame;
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: Parsing of a same_locals_1_stack_item_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 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::SameLocals1StackItemFrame;
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 ▶ 'frame_type$' => sub { $_[0]->inner('VerificationTypeInfoArray', size => 1) },
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 _same_locals_1_stack_item_frame {
43 # my ($self, $frame_type, $stack) = @_;
44  
45 0 ▶ MarpaX::Java::ClassFile::Struct::SameLocals1StackItemFrame->new(
Subroutine _same_locals_1_stack_item_frame: not called CC=1 SCAR=6.9
46 frame_type => $_[1],
47 stack => $_[2]
48 )
49 }
50  
51 with 'MarpaX::Java::ClassFile::Role::Parser';
52  
53 1;
54  
55 =pod
56  
57 =encoding UTF-8
58  
59 =head1 NAME
60  
61 MarpaX::Java::ClassFile::BNF::SameLocals1StackItemFrame - Parsing of a same_locals_1_stack_item_frame
62  
63 =head1 VERSION
64  
65 version 0.008
66  
67 =head1 AUTHOR
68  
69 Jean-Damien Durand <jeandamiendurand@free.fr>
70  
71 =head1 COPYRIGHT AND LICENSE
72  
73 This software is copyright (c) 2016 by Jean-Damien Durand.
74  
75 This is free software; you can redistribute it and/or modify it under
76 the same terms as the Perl 5 programming language system itself.
77  
78 =cut
79  
80 __DATA__
81 __[ bnf ]__
82 event 'frame_type$' = completed frame_type
83 same_locals_1_stack_item_frame ::= frame_type stack action => _same_locals_1_stack_item_frame
84 frame_type ::= U1 action => u1
85 stack ::= MANAGED action => ::first
« ClassFile/BNF/AppendFrame.pm ↑ Summary ClassFile/BNF/SameLocals1StackItemFrameExtended.pm »