File Coverage

blib/lib/Pegex/CSV/Grammar.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 11 11 100.0


line stmt bran cond sub pod time code
1             package Pegex::CSV::Grammar;
2 2     2   9 use Pegex::Base;
  2         2  
  2         12  
3             extends 'Pegex::Grammar';
4              
5 2     2   3233 use constant file => 'share/csv.pgx';
  2         4  
  2         578  
6              
7             sub make_tree { # Generated/Inlined by Pegex::Grammar (0.57)
8             {
9 10     10 1 1485 '+toprule' => 'csv',
10             'ALL' => {
11             '.rgx' => qr/\G[\s\S]/
12             },
13             'csv' => {
14             '+min' => 0,
15             '.ref' => 'row'
16             },
17             'row' => {
18             '.all' => [
19             {
20             '+asr' => 1,
21             '.ref' => 'ALL'
22             },
23             {
24             '+max' => 1,
25             '.all' => [
26             {
27             '.ref' => 'value'
28             },
29             {
30             '+min' => 0,
31             '-flat' => 1,
32             '.all' => [
33             {
34             '.rgx' => qr/\G[\ \t]*,/
35             },
36             {
37             '.ref' => 'value'
38             }
39             ]
40             }
41             ]
42             },
43             {
44             '.rgx' => qr/\G[\ \t]*(?:\r?\n|\r|\z)/
45             }
46             ]
47             },
48             'value' => {
49             '.rgx' => qr/\G[\ \t]*([\ \t]*"(?:(?:""|[^"])*)"|[\ \t]*(?:[^,"\r\n]*[^\ \t,"\r\n])?)/
50             }
51             }
52             }
53              
54             1;