parser 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/.gitignore +1 -0
- data/README.md +1 -1
- data/Rakefile +12 -2
- data/bin/benchmark +3 -3
- data/lib/parser/builders/default.rb +46 -3
- data/lib/parser/current.rb +34 -0
- data/lib/parser/lexer.rb +2760 -2667
- data/lib/parser/lexer.rl +38 -14
- data/lib/parser/ruby18.rb +1956 -1957
- data/lib/parser/ruby19.rb +1962 -1969
- data/lib/parser/ruby19.y +2 -0
- data/lib/parser/ruby20.rb +2412 -2407
- data/lib/parser/ruby20.y +16 -2
- data/lib/parser/ruby21.rb +7310 -0
- data/lib/parser/ruby21.y +2352 -0
- data/lib/parser/source/buffer.rb +52 -2
- data/lib/parser.rb +16 -5
- data/parser.gemspec +2 -1
- data/test/helper.rb +1 -1
- data/test/parse_helper.rb +12 -4
- data/test/test_current.rb +17 -0
- data/test/test_encoding.rb +31 -0
- data/test/test_lexer.rb +5 -7
- data/test/test_parse_helper.rb +9 -4
- data/test/test_parser.rb +172 -10
- metadata +93 -125
- data/TODO.md +0 -9
metadata
CHANGED
@@ -1,148 +1,111 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: parser
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Peter Zotov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
|
12
|
+
date: 2013-04-18 00:00:00 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
14
15
|
name: ast
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.0'
|
20
|
-
type: :runtime
|
21
16
|
prerelease: false
|
22
|
-
|
23
|
-
requirements:
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
24
19
|
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: "1.0"
|
22
|
+
type: :runtime
|
23
|
+
version_requirements: *id001
|
24
|
+
- !ruby/object:Gem::Dependency
|
28
25
|
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.2'
|
34
|
-
type: :development
|
35
26
|
prerelease: false
|
36
|
-
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.2'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
27
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
45
29
|
- - ~>
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version:
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: "1.2"
|
48
32
|
type: :development
|
33
|
+
version_requirements: *id002
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: rake
|
49
36
|
prerelease: false
|
50
|
-
|
51
|
-
requirements:
|
37
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
52
39
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: racc
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: "0.9"
|
62
42
|
type: :development
|
43
|
+
version_requirements: *id003
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: racc
|
63
46
|
prerelease: false
|
64
|
-
|
65
|
-
requirements:
|
66
|
-
-
|
67
|
-
-
|
68
|
-
|
69
|
-
|
70
|
-
name: minitest
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ~>
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 4.7.0
|
47
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- &id007
|
50
|
+
- ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: "0"
|
76
53
|
type: :development
|
54
|
+
version_requirements: *id004
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
77
57
|
prerelease: false
|
78
|
-
|
79
|
-
requirements:
|
58
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
80
60
|
- - ~>
|
81
|
-
- !ruby/object:Gem::Version
|
61
|
+
- !ruby/object:Gem::Version
|
82
62
|
version: 4.7.0
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: simplecov
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ~>
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0.7'
|
90
63
|
type: :development
|
64
|
+
version_requirements: *id005
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: simplecov
|
91
67
|
prerelease: false
|
92
|
-
|
93
|
-
requirements:
|
68
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
94
70
|
- - ~>
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version:
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: coveralls
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '>='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: "0.7"
|
104
73
|
type: :development
|
74
|
+
version_requirements: *id006
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: coveralls
|
105
77
|
prerelease: false
|
106
|
-
|
107
|
-
requirements:
|
108
|
-
-
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: json_pure
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - '>='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
78
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- *id007
|
118
81
|
type: :development
|
82
|
+
version_requirements: *id008
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: json_pure
|
119
85
|
prerelease: false
|
120
|
-
|
121
|
-
requirements:
|
122
|
-
-
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: simplecov-sublime-ruby-coverage
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - '>='
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
86
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- *id007
|
132
89
|
type: :development
|
90
|
+
version_requirements: *id009
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: simplecov-sublime-ruby-coverage
|
133
93
|
prerelease: false
|
134
|
-
|
135
|
-
requirements:
|
136
|
-
-
|
137
|
-
|
138
|
-
|
94
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- *id007
|
97
|
+
type: :development
|
98
|
+
version_requirements: *id010
|
139
99
|
description: A Ruby parser written in pure Ruby.
|
140
|
-
email:
|
100
|
+
email:
|
141
101
|
- whitequark@whitequark.org
|
142
102
|
executables: []
|
103
|
+
|
143
104
|
extensions: []
|
105
|
+
|
144
106
|
extra_rdoc_files: []
|
145
|
-
|
107
|
+
|
108
|
+
files:
|
146
109
|
- .gitignore
|
147
110
|
- .travis.yml
|
148
111
|
- AST_FORMAT.md
|
@@ -150,7 +113,6 @@ files:
|
|
150
113
|
- LICENSE.txt
|
151
114
|
- README.md
|
152
115
|
- Rakefile
|
153
|
-
- TODO.md
|
154
116
|
- bin/benchmark
|
155
117
|
- bin/explain-parse
|
156
118
|
- bin/parse
|
@@ -161,6 +123,7 @@ files:
|
|
161
123
|
- lib/parser/base.rb
|
162
124
|
- lib/parser/builders/default.rb
|
163
125
|
- lib/parser/compatibility/ruby1_8.rb
|
126
|
+
- lib/parser/current.rb
|
164
127
|
- lib/parser/diagnostic.rb
|
165
128
|
- lib/parser/diagnostic/engine.rb
|
166
129
|
- lib/parser/lexer.rl
|
@@ -170,6 +133,7 @@ files:
|
|
170
133
|
- lib/parser/ruby18.y
|
171
134
|
- lib/parser/ruby19.y
|
172
135
|
- lib/parser/ruby20.y
|
136
|
+
- lib/parser/ruby21.y
|
173
137
|
- lib/parser/source/buffer.rb
|
174
138
|
- lib/parser/source/map.rb
|
175
139
|
- lib/parser/source/map/operator.rb
|
@@ -181,8 +145,10 @@ files:
|
|
181
145
|
- test/helper.rb
|
182
146
|
- test/parse_helper.rb
|
183
147
|
- test/racc_coverage_helper.rb
|
148
|
+
- test/test_current.rb
|
184
149
|
- test/test_diagnostic.rb
|
185
150
|
- test/test_diagnostic_engine.rb
|
151
|
+
- test/test_encoding.rb
|
186
152
|
- test/test_lexer.rb
|
187
153
|
- test/test_lexer_stack_state.rb
|
188
154
|
- test/test_parse_helper.rb
|
@@ -194,36 +160,38 @@ files:
|
|
194
160
|
- lib/parser/ruby18.rb
|
195
161
|
- lib/parser/ruby19.rb
|
196
162
|
- lib/parser/ruby20.rb
|
163
|
+
- lib/parser/ruby21.rb
|
197
164
|
homepage: http://github.com/whitequark/parser
|
198
|
-
licenses:
|
165
|
+
licenses:
|
199
166
|
- MIT
|
200
167
|
metadata: {}
|
168
|
+
|
201
169
|
post_install_message:
|
202
170
|
rdoc_options: []
|
203
|
-
|
171
|
+
|
172
|
+
require_paths:
|
204
173
|
- lib
|
205
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
206
|
-
requirements:
|
207
|
-
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
requirements:
|
212
|
-
- - '>='
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
version: '0'
|
174
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- *id007
|
177
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- *id007
|
215
180
|
requirements: []
|
181
|
+
|
216
182
|
rubyforge_project:
|
217
|
-
rubygems_version: 2.0.
|
183
|
+
rubygems_version: 2.0.3
|
218
184
|
signing_key:
|
219
185
|
specification_version: 4
|
220
186
|
summary: A Ruby parser written in pure Ruby.
|
221
|
-
test_files:
|
187
|
+
test_files:
|
222
188
|
- test/helper.rb
|
223
189
|
- test/parse_helper.rb
|
224
190
|
- test/racc_coverage_helper.rb
|
191
|
+
- test/test_current.rb
|
225
192
|
- test/test_diagnostic.rb
|
226
193
|
- test/test_diagnostic_engine.rb
|
194
|
+
- test/test_encoding.rb
|
227
195
|
- test/test_lexer.rb
|
228
196
|
- test/test_lexer_stack_state.rb
|
229
197
|
- test/test_parse_helper.rb
|
data/TODO.md
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
# 2.1
|
2
|
-
|
3
|
-
1. https://github.com/ruby/ruby/commit/34a95669dad8843e3e9a4af683682ab2f50856dd
|
4
|
-
2. https://github.com/ruby/ruby/commit/c07d78eb0e8e9d3a8f9e8c860b362964157ff43a
|
5
|
-
3. https://github.com/ruby/ruby/commit/7ea675732ac1dac72f07756498706678d8725719
|
6
|
-
|
7
|
-
# All versions
|
8
|
-
|
9
|
-
1. https://github.com/ruby/ruby/commit/9150340b9bcbe305c2647a8d6f6f8e754769f3e7
|