ClassFile/BNF/ElementValueArray.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 55.5% 5 / 9 Podpod n/a totaltotal 66.6% 20 / 30 SCAR 7.4
CC
2
Cov
71%
__ANON__
6.0
grammar
2.0
__ANON__
2.0
CRAP 2.1
« ClassFile/BNF/AnnotationArray.pm ↑ Summary ClassFile/BNF/ParameterAnnotationArray.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::ElementValueArray;
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: Parsing an array of elementValue
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::ElementValue;
20  
21 my $_data = ${ __PACKAGE__->section_data('bnf') };
22 my $_grammar = Marpa::R2::Scanless::G->new( { source => \__PACKAGE__->bnf($_data) } );
23  
24 # --------------------------------------------------
25 # What role MarpaX::Java::ClassFile::Common requires
26 # --------------------------------------------------
27 0 ▶sub grammar { $_grammar }
Subroutine grammar: not called CC=1 SCAR=6.9
28 sub callbacks {
29 return {
30 0 ▶ "'exhausted" => sub { $_[0]->exhausted },
Subroutine __ANON__: not called CC=1 SCAR=6.9
31 '^elementValueArray' => sub {
32 0 ▶ foreach (1..$_[0]->size) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
33 0 $_[0]->inner_silent('ElementValue');
34 0 $_[0]->inc_nbDone
35 }
36 }
37 }
38 0 ▶}
Subroutine callbacks: not called CC=1 SCAR=6.9
39  
40 with qw/MarpaX::Java::ClassFile::Role::Parser::InnerGrammar/;
41  
42 1;
43  
44 =pod
45  
46 =encoding UTF-8
47  
48 =head1 NAME
49  
50 MarpaX::Java::ClassFile::BNF::ElementValueArray - Parsing an array of elementValue
51  
52 =head1 VERSION
53  
54 version 0.008
55  
56 =head1 AUTHOR
57  
58 Jean-Damien Durand <jeandamiendurand@free.fr>
59  
60 =head1 COPYRIGHT AND LICENSE
61  
62 This software is copyright (c) 2016 by Jean-Damien Durand.
63  
64 This is free software; you can redistribute it and/or modify it under
65 the same terms as the Perl 5 programming language system itself.
66  
67 =cut
68  
69 __DATA__
70 __[ bnf ]__
71 :default ::= action => [values]
72 event '^elementValueArray' = predicted elementValueArray
73 elementValueArray ::= MANAGED*
« ClassFile/BNF/AnnotationArray.pm ↑ Summary ClassFile/BNF/ParameterAnnotationArray.pm »