line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
2
|
1
|
|
|
1
|
|
3
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5; |
5
|
1
|
|
|
1
|
|
338
|
use MarpaX::Languages::ECMAScript::AST::Impl; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Program; |
7
|
|
|
|
|
|
|
use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::StringNumericLiteral; |
8
|
|
|
|
|
|
|
use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Pattern; |
9
|
|
|
|
|
|
|
use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::JSON; |
10
|
|
|
|
|
|
|
use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::URI; |
11
|
|
|
|
|
|
|
use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Template; |
12
|
|
|
|
|
|
|
use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::SpacesAny; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# ABSTRACT: ECMAScript-262, Edition 5, grammar |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.020'; # VERSION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
|
|
|
|
|
|
my ($class, %opts) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $self = {}; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
bless($self, $class); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$self->_init(%opts); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
return $self; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _init { |
32
|
|
|
|
|
|
|
my ($self, %opts) = @_; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
my $spacesAny = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::SpacesAny->new(); |
35
|
|
|
|
|
|
|
$self->{_spacesAny} = { |
36
|
|
|
|
|
|
|
grammar => $spacesAny, |
37
|
|
|
|
|
|
|
impl => MarpaX::Languages::ECMAScript::AST::Impl->new($spacesAny->grammar_option(), $spacesAny->recce_option()) |
38
|
|
|
|
|
|
|
}; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $program = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Program->new(); |
41
|
|
|
|
|
|
|
$self->{_program} = { |
42
|
|
|
|
|
|
|
grammar => $program, |
43
|
|
|
|
|
|
|
impl => MarpaX::Languages::ECMAScript::AST::Impl->new($program->grammar_option(), $program->recce_option()) |
44
|
|
|
|
|
|
|
}; |
45
|
|
|
|
|
|
|
$program->spacesAny($self->spacesAny); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
my $JSON = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::JSON->new(); |
48
|
|
|
|
|
|
|
$self->{_JSON} = { |
49
|
|
|
|
|
|
|
grammar => $JSON, |
50
|
|
|
|
|
|
|
impl => MarpaX::Languages::ECMAScript::AST::Impl->new($JSON->grammar_option(), $JSON->recce_option()) |
51
|
|
|
|
|
|
|
}; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $URI = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::URI->new(); |
54
|
|
|
|
|
|
|
$self->{_URI} = { |
55
|
|
|
|
|
|
|
grammar => $URI, |
56
|
|
|
|
|
|
|
impl => MarpaX::Languages::ECMAScript::AST::Impl->new($URI->grammar_option(), $URI->recce_option()) |
57
|
|
|
|
|
|
|
}; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $stringNumericLiteralOptionsp = exists($opts{StringNumericLiteral}) ? $opts{StringNumericLiteral} : undef; |
60
|
|
|
|
|
|
|
my $stringNumericLiteral = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::StringNumericLiteral->new($stringNumericLiteralOptionsp); |
61
|
|
|
|
|
|
|
$self->{_stringNumericLiteral} = { |
62
|
|
|
|
|
|
|
grammar => $stringNumericLiteral, |
63
|
|
|
|
|
|
|
impl => MarpaX::Languages::ECMAScript::AST::Impl->new($stringNumericLiteral->grammar_option(), $stringNumericLiteral->recce_option()) |
64
|
|
|
|
|
|
|
}; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
my $pattern = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Pattern->new(); |
67
|
|
|
|
|
|
|
$self->{_pattern} = { |
68
|
|
|
|
|
|
|
grammar => $pattern, |
69
|
|
|
|
|
|
|
impl => MarpaX::Languages::ECMAScript::AST::Impl->new($pattern->grammar_option(), $pattern->recce_option()) |
70
|
|
|
|
|
|
|
}; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
my $templateOptionsp = exists($opts{Template}) ? $opts{Template} : undef; |
73
|
|
|
|
|
|
|
$self->{_template} = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Template->new($templateOptionsp); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub program { |
79
|
|
|
|
|
|
|
my ($self) = @_; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
return $self->{_program}; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub JSON { |
86
|
|
|
|
|
|
|
my ($self) = @_; |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
return $self->{_JSON}; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub URI { |
93
|
|
|
|
|
|
|
my ($self) = @_; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
return $self->{_URI}; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub template { |
100
|
|
|
|
|
|
|
my ($self) = @_; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
return $self->{_template}; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub stringNumericLiteral { |
107
|
|
|
|
|
|
|
my ($self) = @_; |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
return $self->{_stringNumericLiteral}; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub pattern { |
114
|
|
|
|
|
|
|
my ($self) = @_; |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
return $self->{_pattern}; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
sub spacesAny { |
121
|
|
|
|
|
|
|
my ($self) = @_; |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
return $self->{_spacesAny}; |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
1; |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
__END__ |