ClassFile/BNF/ChopFrame.pm

filter: Statementstmt 84.0% 21 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 63.6% 7 / 11 Podpod n/a totaltotal 77.7% 28 / 36 SCAR 0.0
CC
1
Cov
84%
grammar
2.0
__ANON__
2.0
callbacks
2.0
CRAP 1.0
« ClassFile/Struct/ExceptionsAttribute.pm ↑ Summary ClassFile/BNF/SameFrame.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::ChopFrame;
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: Parsing of a chop_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::ChopFrame;
22  
23 my $_data = ${ __PACKAGE__->section_data('bnf') };
24 my $_grammar = Marpa::R2::Scanless::G->new( { source => \__PACKAGE__->bnf($_data) } );
25  
26 has preloaded_frame_type => (is => 'ro', required => 1, prod_isa(U1));
27  
28 # --------------------------------------------------------
29 # What role MarpaX::Java::ClassFile::Role::Parser requires
30 # --------------------------------------------------------
31 0 ▶sub grammar { $_grammar }
Subroutine grammar: not called CC=1 SCAR=6.9
32 sub callbacks { return {
33 0 ▶ "'exhausted" => sub { $_[0]->exhausted },
Subroutine __ANON__: not called CC=1 SCAR=6.9
34 }
35 0 ▶ }
Subroutine callbacks: not called CC=1 SCAR=6.9
36  
37 # ---------------
38 # Grammar actions
39 # ---------------
40 sub _chop_frame {
41 # my ($self, $frame_type, $offset_delta) = @_;
42  
43 0 ▶ MarpaX::Java::ClassFile::Struct::ChopFrame->new(
Subroutine _chop_frame: not called CC=1 SCAR=6.9
44 frame_type => $_[1],
45 offset_delta => $_[2]
46 )
47 }
48  
49 with 'MarpaX::Java::ClassFile::Role::Parser';
50  
51 1;
52  
53 =pod
54  
55 =encoding UTF-8
56  
57 =head1 NAME
58  
59 MarpaX::Java::ClassFile::BNF::ChopFrame - Parsing of a chop_frame
60  
61 =head1 VERSION
62  
63 version 0.008
64  
65 =head1 AUTHOR
66  
67 Jean-Damien Durand <jeandamiendurand@free.fr>
68  
69 =head1 COPYRIGHT AND LICENSE
70  
71 This software is copyright (c) 2016 by Jean-Damien Durand.
72  
73 This is free software; you can redistribute it and/or modify it under
74 the same terms as the Perl 5 programming language system itself.
75  
76 =cut
77  
78 __DATA__
79 __[ bnf ]__
80 chop_frame ::= frame_type offset_delta action => _chop_frame
81 frame_type ::= U1 action => u1
82 offset_delta ::= U2 action => u2
« ClassFile/Struct/ExceptionsAttribute.pm ↑ Summary ClassFile/BNF/SameFrame.pm »