ClassFile/BNF/PathArray.pm

filter: Statementstmt 78.2% 18 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 54.5% 6 / 11 Podpod n/a totaltotal 70.5% 24 / 34 SCAR 0.1
CC
1
Cov
78%
grammar
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.0
« ClassFile/BNF/FullFrame.pm ↑ Summary ClassFile/BNF/TableArray.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::PathArray;
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: Parsing an array of path
8  
9 our $VERSION = '0.008'; # VERSION
10  
11 our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY
12  
13 1 ▶use Carp qw/croak/;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use Data::Section -setup;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use MarpaX::Java::ClassFile::Util::BNF qw/bnf/;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 #
17 # require because we do not import ANYTHING from these module, just require they are loaded
18 #
19 require Marpa::R2;
20 require MarpaX::Java::ClassFile::Struct::Path;
21  
22 my $_data = ${ __PACKAGE__->section_data('bnf') };
23 my $_grammar = Marpa::R2::Scanless::G->new( { source => \__PACKAGE__->bnf($_data) } );
24  
25 # --------------------------------------------------
26 # What role MarpaX::Java::ClassFile::Common requires
27 # --------------------------------------------------
28 0 ▶sub grammar { $_grammar }
Subroutine grammar: not called CC=1 SCAR=6.9
29 sub callbacks { return {
30 0 ▶ "'exhausted" => sub { $_[0]->exhausted },
Subroutine __ANON__: not called CC=1 SCAR=6.9
31 0 ▶ 'path$' => sub { $_[0]->inc_nbDone }
Subroutine __ANON__: not called CC=1 SCAR=6.9
32 }
33 0 ▶}
Subroutine callbacks: not called CC=1 SCAR=6.9
34  
35 # ---------------
36 # Grammar actions
37 # ---------------
38 sub _path {
39 # my ($self, $type_path_kind, $type_argument_index) = @_;
40  
41 0 ▶ MarpaX::Java::ClassFile::Struct::Path->new(
Subroutine _path: not called CC=1 SCAR=6.9
42 type_path_kind => $_[1],
43 type_argument_index => $_[2]
44 )
45 }
46  
47 with qw/MarpaX::Java::ClassFile::Role::Parser::InnerGrammar/;
48  
49 1;
50  
51 =pod
52  
53 =encoding UTF-8
54  
55 =head1 NAME
56  
57 MarpaX::Java::ClassFile::BNF::PathArray - Parsing an array of path
58  
59 =head1 VERSION
60  
61 version 0.008
62  
63 =head1 AUTHOR
64  
65 Jean-Damien Durand <jeandamiendurand@free.fr>
66  
67 =head1 COPYRIGHT AND LICENSE
68  
69 This software is copyright (c) 2016 by Jean-Damien Durand.
70  
71 This is free software; you can redistribute it and/or modify it under
72 the same terms as the Perl 5 programming language system itself.
73  
74 =cut
75  
76 __DATA__
77 __[ bnf ]__
78 event 'path$' = completed path
79 :default ::= action => [values]
80 pathArray ::= path*
81 path ::= type_path_kind type_argument_index action => _path
82 type_path_kind ::= U1 action => u1
83 type_argument_index ::= U1 action => u1
« ClassFile/BNF/FullFrame.pm ↑ Summary ClassFile/BNF/TableArray.pm »