webidl 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +4 -0
- data/LICENSE +1 -1
- data/README.rdoc +1 -1
- data/Rakefile +5 -33
- data/lib/webidl/parser/idl.rb +201 -117
- data/lib/webidl/parser/idl.treetop +16 -8
- data/lib/webidl/version.rb +3 -0
- data/spec/parser_spec.rb +8 -0
- data/spec/spec_helper.rb +2 -3
- data/webidl.gemspec +18 -127
- metadata +39 -32
- data/VERSION +0 -1
data/Gemfile
ADDED
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -1,39 +1,13 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "webidl"
|
8
|
-
gem.summary = %Q{WebIDL parser/generator for ruby}
|
9
|
-
gem.description = %Q{Built on Treetop, this gem will parse an interface declaration in WebIDL and generate ruby code}
|
10
|
-
gem.email = "jari.bakken@gmail.com"
|
11
|
-
gem.homepage = "http://github.com/jarib/webidl"
|
12
|
-
gem.authors = ["Jari Bakken"]
|
13
|
-
gem.bindir = "bin"
|
14
|
-
|
15
|
-
gem.add_dependency "treetop"
|
16
|
-
gem.add_dependency "ruby2ruby"
|
17
|
-
gem.add_development_dependency "rspec"
|
18
|
-
end
|
19
|
-
|
20
|
-
Jeweler::GemcutterTasks.new
|
21
|
-
rescue LoadError
|
22
|
-
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
23
|
-
end
|
4
|
+
require 'bundler'
|
5
|
+
Bundler::GemHelper.install_tasks
|
24
6
|
|
25
|
-
require '
|
26
|
-
|
27
|
-
spec.libs << 'lib' << 'spec'
|
28
|
-
spec.spec_files = FileList['spec/**/*_spec.rb']
|
29
|
-
end
|
7
|
+
require 'rspec/core/rake_task'
|
8
|
+
RSpec::Core::RakeTask.new
|
30
9
|
|
31
|
-
|
32
|
-
spec.libs << 'lib' << 'spec'
|
33
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
34
|
-
spec.rcov = true
|
35
|
-
spec.rcov_opts = %w[--exclude spec,ruby-debug,/Library/Ruby,.gem --include lib/webidl]
|
36
|
-
end
|
10
|
+
# TODO: simplecov
|
37
11
|
|
38
12
|
namespace :parser do
|
39
13
|
|
@@ -84,8 +58,6 @@ namespace :webidl do
|
|
84
58
|
|
85
59
|
end
|
86
60
|
|
87
|
-
task :spec => :check_dependencies
|
88
|
-
|
89
61
|
task :default => :spec
|
90
62
|
|
91
63
|
begin
|
data/lib/webidl/parser/idl.rb
CHANGED
@@ -3604,7 +3604,7 @@ module WebIDL
|
|
3604
3604
|
end
|
3605
3605
|
s0 << r1
|
3606
3606
|
if r1
|
3607
|
-
r6 =
|
3607
|
+
r6 = _nt_Array
|
3608
3608
|
s0 << r6
|
3609
3609
|
end
|
3610
3610
|
if s0.last
|
@@ -4186,10 +4186,10 @@ module WebIDL
|
|
4186
4186
|
r0
|
4187
4187
|
end
|
4188
4188
|
|
4189
|
-
def
|
4189
|
+
def _nt_Array
|
4190
4190
|
start_index = index
|
4191
|
-
if node_cache[:
|
4192
|
-
cached = node_cache[:
|
4191
|
+
if node_cache[:Array].has_key?(index)
|
4192
|
+
cached = node_cache[:Array][index]
|
4193
4193
|
if cached
|
4194
4194
|
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4195
4195
|
@index = cached.interval.end
|
@@ -4210,7 +4210,7 @@ module WebIDL
|
|
4210
4210
|
r0 = instantiate_node(SyntaxNode,input, index...index)
|
4211
4211
|
end
|
4212
4212
|
|
4213
|
-
node_cache[:
|
4213
|
+
node_cache[:Array][start_index] = r0
|
4214
4214
|
|
4215
4215
|
r0
|
4216
4216
|
end
|
@@ -4604,15 +4604,6 @@ module WebIDL
|
|
4604
4604
|
end
|
4605
4605
|
|
4606
4606
|
module Integer0
|
4607
|
-
end
|
4608
|
-
|
4609
|
-
module Integer1
|
4610
|
-
end
|
4611
|
-
|
4612
|
-
module Integer2
|
4613
|
-
end
|
4614
|
-
|
4615
|
-
module Integer3
|
4616
4607
|
def build() Integer(text_value) end
|
4617
4608
|
end
|
4618
4609
|
|
@@ -4628,151 +4619,244 @@ module WebIDL
|
|
4628
4619
|
end
|
4629
4620
|
|
4630
4621
|
i0 = index
|
4631
|
-
|
4622
|
+
r1 = _nt_hexint
|
4623
|
+
if r1
|
4624
|
+
r0 = r1
|
4625
|
+
r0.extend(Integer0)
|
4626
|
+
else
|
4627
|
+
r2 = _nt_octint
|
4628
|
+
if r2
|
4629
|
+
r0 = r2
|
4630
|
+
r0.extend(Integer0)
|
4631
|
+
else
|
4632
|
+
r3 = _nt_decint
|
4633
|
+
if r3
|
4634
|
+
r0 = r3
|
4635
|
+
r0.extend(Integer0)
|
4636
|
+
else
|
4637
|
+
@index = i0
|
4638
|
+
r0 = nil
|
4639
|
+
end
|
4640
|
+
end
|
4641
|
+
end
|
4642
|
+
|
4643
|
+
node_cache[:integer][start_index] = r0
|
4644
|
+
|
4645
|
+
r0
|
4646
|
+
end
|
4647
|
+
|
4648
|
+
module Hexint0
|
4649
|
+
end
|
4650
|
+
|
4651
|
+
def _nt_hexint
|
4652
|
+
start_index = index
|
4653
|
+
if node_cache[:hexint].has_key?(index)
|
4654
|
+
cached = node_cache[:hexint][index]
|
4655
|
+
if cached
|
4656
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4657
|
+
@index = cached.interval.end
|
4658
|
+
end
|
4659
|
+
return cached
|
4660
|
+
end
|
4661
|
+
|
4662
|
+
i0, s0 = index, []
|
4632
4663
|
if has_terminal?("-", false, index)
|
4633
|
-
|
4664
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
4634
4665
|
@index += 1
|
4635
4666
|
else
|
4636
4667
|
terminal_parse_failure("-")
|
4637
|
-
|
4668
|
+
r2 = nil
|
4638
4669
|
end
|
4639
|
-
if
|
4640
|
-
|
4670
|
+
if r2
|
4671
|
+
r1 = r2
|
4641
4672
|
else
|
4642
|
-
|
4673
|
+
r1 = instantiate_node(SyntaxNode,input, index...index)
|
4643
4674
|
end
|
4644
|
-
|
4645
|
-
if
|
4675
|
+
s0 << r1
|
4676
|
+
if r1
|
4646
4677
|
if has_terminal?("0", false, index)
|
4647
|
-
|
4678
|
+
r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
4648
4679
|
@index += 1
|
4649
4680
|
else
|
4650
4681
|
terminal_parse_failure("0")
|
4651
|
-
|
4682
|
+
r3 = nil
|
4652
4683
|
end
|
4653
|
-
|
4654
|
-
if
|
4655
|
-
|
4656
|
-
|
4657
|
-
|
4658
|
-
if has_terminal?('\G[0-7]', true, index)
|
4659
|
-
r7 = true
|
4660
|
-
@index += 1
|
4661
|
-
else
|
4662
|
-
r7 = nil
|
4663
|
-
end
|
4664
|
-
if r7
|
4665
|
-
s6 << r7
|
4666
|
-
else
|
4667
|
-
break
|
4668
|
-
end
|
4669
|
-
end
|
4670
|
-
r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
|
4671
|
-
if r6
|
4672
|
-
r5 = r6
|
4684
|
+
s0 << r3
|
4685
|
+
if r3
|
4686
|
+
if has_terminal?('\G[Xx]', true, index)
|
4687
|
+
r4 = true
|
4688
|
+
@index += 1
|
4673
4689
|
else
|
4674
|
-
|
4675
|
-
|
4676
|
-
|
4677
|
-
|
4678
|
-
|
4679
|
-
|
4680
|
-
|
4681
|
-
|
4682
|
-
|
4683
|
-
|
4684
|
-
|
4685
|
-
if has_terminal?('\G[0-9A-Fa-f]', true, index)
|
4686
|
-
r11 = true
|
4687
|
-
@index += 1
|
4688
|
-
else
|
4689
|
-
r11 = nil
|
4690
|
-
end
|
4691
|
-
if r11
|
4692
|
-
s10 << r11
|
4693
|
-
else
|
4694
|
-
break
|
4695
|
-
end
|
4690
|
+
r4 = nil
|
4691
|
+
end
|
4692
|
+
s0 << r4
|
4693
|
+
if r4
|
4694
|
+
s5, i5 = [], index
|
4695
|
+
loop do
|
4696
|
+
if has_terminal?('\G[0-9A-Fa-f]', true, index)
|
4697
|
+
r6 = true
|
4698
|
+
@index += 1
|
4699
|
+
else
|
4700
|
+
r6 = nil
|
4696
4701
|
end
|
4697
|
-
if
|
4698
|
-
|
4699
|
-
r10 = nil
|
4702
|
+
if r6
|
4703
|
+
s5 << r6
|
4700
4704
|
else
|
4701
|
-
|
4705
|
+
break
|
4702
4706
|
end
|
4703
|
-
s8 << r10
|
4704
|
-
end
|
4705
|
-
if s8.last
|
4706
|
-
r8 = instantiate_node(SyntaxNode,input, i8...index, s8)
|
4707
|
-
r8.extend(Integer0)
|
4708
|
-
else
|
4709
|
-
@index = i8
|
4710
|
-
r8 = nil
|
4711
4707
|
end
|
4712
|
-
if
|
4713
|
-
r5 = r8
|
4714
|
-
else
|
4708
|
+
if s5.empty?
|
4715
4709
|
@index = i5
|
4716
4710
|
r5 = nil
|
4711
|
+
else
|
4712
|
+
r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
|
4717
4713
|
end
|
4714
|
+
s0 << r5
|
4718
4715
|
end
|
4719
|
-
s1 << r5
|
4720
4716
|
end
|
4721
4717
|
end
|
4722
|
-
if
|
4723
|
-
|
4724
|
-
|
4718
|
+
if s0.last
|
4719
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
4720
|
+
r0.extend(Hexint0)
|
4725
4721
|
else
|
4726
|
-
@index =
|
4727
|
-
|
4722
|
+
@index = i0
|
4723
|
+
r0 = nil
|
4728
4724
|
end
|
4729
|
-
|
4730
|
-
|
4731
|
-
|
4725
|
+
|
4726
|
+
node_cache[:hexint][start_index] = r0
|
4727
|
+
|
4728
|
+
r0
|
4729
|
+
end
|
4730
|
+
|
4731
|
+
module Octint0
|
4732
|
+
end
|
4733
|
+
|
4734
|
+
def _nt_octint
|
4735
|
+
start_index = index
|
4736
|
+
if node_cache[:octint].has_key?(index)
|
4737
|
+
cached = node_cache[:octint][index]
|
4738
|
+
if cached
|
4739
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4740
|
+
@index = cached.interval.end
|
4741
|
+
end
|
4742
|
+
return cached
|
4743
|
+
end
|
4744
|
+
|
4745
|
+
i0, s0 = index, []
|
4746
|
+
if has_terminal?("-", false, index)
|
4747
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
4748
|
+
@index += 1
|
4732
4749
|
else
|
4733
|
-
|
4734
|
-
|
4735
|
-
|
4750
|
+
terminal_parse_failure("-")
|
4751
|
+
r2 = nil
|
4752
|
+
end
|
4753
|
+
if r2
|
4754
|
+
r1 = r2
|
4755
|
+
else
|
4756
|
+
r1 = instantiate_node(SyntaxNode,input, index...index)
|
4757
|
+
end
|
4758
|
+
s0 << r1
|
4759
|
+
if r1
|
4760
|
+
if has_terminal?("0", false, index)
|
4761
|
+
r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
4736
4762
|
@index += 1
|
4737
4763
|
else
|
4738
|
-
|
4764
|
+
terminal_parse_failure("0")
|
4765
|
+
r3 = nil
|
4739
4766
|
end
|
4740
|
-
|
4741
|
-
if
|
4742
|
-
|
4767
|
+
s0 << r3
|
4768
|
+
if r3
|
4769
|
+
s4, i4 = [], index
|
4743
4770
|
loop do
|
4744
|
-
if has_terminal?('\G[0-
|
4745
|
-
|
4771
|
+
if has_terminal?('\G[0-7]', true, index)
|
4772
|
+
r5 = true
|
4746
4773
|
@index += 1
|
4747
4774
|
else
|
4748
|
-
|
4775
|
+
r5 = nil
|
4749
4776
|
end
|
4750
|
-
if
|
4751
|
-
|
4777
|
+
if r5
|
4778
|
+
s4 << r5
|
4752
4779
|
else
|
4753
4780
|
break
|
4754
4781
|
end
|
4755
4782
|
end
|
4756
|
-
|
4757
|
-
|
4783
|
+
if s4.empty?
|
4784
|
+
@index = i4
|
4785
|
+
r4 = nil
|
4786
|
+
else
|
4787
|
+
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
4788
|
+
end
|
4789
|
+
s0 << r4
|
4758
4790
|
end
|
4759
|
-
|
4760
|
-
|
4761
|
-
|
4762
|
-
|
4763
|
-
|
4764
|
-
|
4791
|
+
end
|
4792
|
+
if s0.last
|
4793
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
4794
|
+
r0.extend(Octint0)
|
4795
|
+
else
|
4796
|
+
@index = i0
|
4797
|
+
r0 = nil
|
4798
|
+
end
|
4799
|
+
|
4800
|
+
node_cache[:octint][start_index] = r0
|
4801
|
+
|
4802
|
+
r0
|
4803
|
+
end
|
4804
|
+
|
4805
|
+
module Decint0
|
4806
|
+
end
|
4807
|
+
|
4808
|
+
def _nt_decint
|
4809
|
+
start_index = index
|
4810
|
+
if node_cache[:decint].has_key?(index)
|
4811
|
+
cached = node_cache[:decint][index]
|
4812
|
+
if cached
|
4813
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4814
|
+
@index = cached.interval.end
|
4765
4815
|
end
|
4766
|
-
|
4767
|
-
|
4768
|
-
|
4769
|
-
|
4770
|
-
|
4771
|
-
|
4816
|
+
return cached
|
4817
|
+
end
|
4818
|
+
|
4819
|
+
i0, s0 = index, []
|
4820
|
+
if has_terminal?("-", false, index)
|
4821
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
4822
|
+
@index += 1
|
4823
|
+
else
|
4824
|
+
terminal_parse_failure("-")
|
4825
|
+
r2 = nil
|
4826
|
+
end
|
4827
|
+
if r2
|
4828
|
+
r1 = r2
|
4829
|
+
else
|
4830
|
+
r1 = instantiate_node(SyntaxNode,input, index...index)
|
4831
|
+
end
|
4832
|
+
s0 << r1
|
4833
|
+
if r1
|
4834
|
+
s3, i3 = [], index
|
4835
|
+
loop do
|
4836
|
+
if has_terminal?('\G[0-9]', true, index)
|
4837
|
+
r4 = true
|
4838
|
+
@index += 1
|
4839
|
+
else
|
4840
|
+
r4 = nil
|
4841
|
+
end
|
4842
|
+
if r4
|
4843
|
+
s3 << r4
|
4844
|
+
else
|
4845
|
+
break
|
4846
|
+
end
|
4772
4847
|
end
|
4848
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
4849
|
+
s0 << r3
|
4850
|
+
end
|
4851
|
+
if s0.last
|
4852
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
4853
|
+
r0.extend(Decint0)
|
4854
|
+
else
|
4855
|
+
@index = i0
|
4856
|
+
r0 = nil
|
4773
4857
|
end
|
4774
4858
|
|
4775
|
-
node_cache[:
|
4859
|
+
node_cache[:decint][start_index] = r0
|
4776
4860
|
|
4777
4861
|
r0
|
4778
4862
|
end
|
@@ -280,7 +280,7 @@ module WebIDL
|
|
280
280
|
/ ScopedName
|
281
281
|
/ "any" # not sure why these two are here, since
|
282
282
|
/ "object" # they will be caught by ScopedName anyway..
|
283
|
-
) array:
|
283
|
+
) array:Array <ParseTree::Type>
|
284
284
|
end
|
285
285
|
|
286
286
|
#
|
@@ -313,11 +313,7 @@ module WebIDL
|
|
313
313
|
"?"?
|
314
314
|
end
|
315
315
|
|
316
|
-
|
317
|
-
# added: can't find anything about this in the spec's LL grammar
|
318
|
-
#
|
319
|
-
|
320
|
-
rule OptionalArray
|
316
|
+
rule Array
|
321
317
|
"[]"?
|
322
318
|
end
|
323
319
|
|
@@ -354,7 +350,19 @@ module WebIDL
|
|
354
350
|
end
|
355
351
|
|
356
352
|
rule integer
|
357
|
-
(
|
353
|
+
(hexint / octint / decint) { def build() Integer(text_value) end} # TODO: check edge cases
|
354
|
+
end
|
355
|
+
|
356
|
+
rule hexint
|
357
|
+
"-"? "0" [Xx] [0-9A-Fa-f]+
|
358
|
+
end
|
359
|
+
|
360
|
+
rule octint
|
361
|
+
"-"? "0" [0-7]+
|
362
|
+
end
|
363
|
+
|
364
|
+
rule decint
|
365
|
+
"-"? [0-9]*
|
358
366
|
end
|
359
367
|
|
360
368
|
rule float
|
@@ -362,7 +370,7 @@ module WebIDL
|
|
362
370
|
end
|
363
371
|
|
364
372
|
rule identifier
|
365
|
-
[A-Z_a-z] [0-9A-Z_a-z]* { def build() text_value[/^_?(.+)/, 1] end}
|
373
|
+
[A-Z_a-z] [0-9A-Z_a-z]* { def build() text_value[/^_?(.+)/, 1] end }
|
366
374
|
end
|
367
375
|
|
368
376
|
rule string
|
data/spec/parser_spec.rb
CHANGED
@@ -60,6 +60,14 @@ describe WebIDL::Parser::IDLParser do
|
|
60
60
|
parse(str).should_not be_nil
|
61
61
|
end
|
62
62
|
|
63
|
+
it "parses hex numbers" do
|
64
|
+
str = <<-IDL
|
65
|
+
interface Bar { const unsigned long NULL = 0x0000; };
|
66
|
+
IDL
|
67
|
+
|
68
|
+
parse(str).should_not be_nil
|
69
|
+
end
|
70
|
+
|
63
71
|
it "parses the WebSocket interface idl" do
|
64
72
|
parse(fixture("websocket.idl")).should_not be_nil
|
65
73
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -3,8 +3,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
3
3
|
|
4
4
|
require "rubygems"
|
5
5
|
require 'webidl'
|
6
|
-
require '
|
7
|
-
require 'spec/autorun'
|
6
|
+
require 'rspec'
|
8
7
|
require "pp"
|
9
8
|
|
10
9
|
# require "ruby-debug"
|
@@ -36,7 +35,7 @@ module ParseHelper
|
|
36
35
|
end
|
37
36
|
end
|
38
37
|
|
39
|
-
|
38
|
+
RSpec.configure do |c|
|
40
39
|
c.include(ParseHelper)
|
41
40
|
c.before(:each) do
|
42
41
|
@parser = WebIDL::Parser::IDLParser.new
|
data/webidl.gemspec
CHANGED
@@ -1,134 +1,25 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "webidl/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
6
|
+
s.name = "webidl"
|
7
|
+
s.version = WebIDL::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Jari Bakken"]
|
10
|
+
s.email = ["jari.bakken@gmail.com"]
|
11
|
+
s.homepage = "http://github.com/jarib/webidl"
|
12
|
+
s.summary = %q{Ruby parser for WebIDL}
|
13
|
+
s.description = %q{Built on Treetop, this gem will parse interface declarations in WebIDL and generate ruby code}
|
9
14
|
|
10
|
-
s.
|
11
|
-
s.authors = ["Jari Bakken"]
|
12
|
-
s.date = %q{2010-10-06}
|
13
|
-
s.default_executable = %q{webidl2ruby}
|
14
|
-
s.description = %q{Built on Treetop, this gem will parse an interface declaration in WebIDL and generate ruby code}
|
15
|
-
s.email = %q{jari.bakken@gmail.com}
|
16
|
-
s.executables = ["webidl2ruby"]
|
17
|
-
s.extra_rdoc_files = [
|
18
|
-
"LICENSE",
|
19
|
-
"README.rdoc"
|
20
|
-
]
|
21
|
-
s.files = [
|
22
|
-
".document",
|
23
|
-
".gitignore",
|
24
|
-
"LICENSE",
|
25
|
-
"README.rdoc",
|
26
|
-
"Rakefile",
|
27
|
-
"VERSION",
|
28
|
-
"bin/webidl2ruby",
|
29
|
-
"examples/html5.rb",
|
30
|
-
"lib/webidl.rb",
|
31
|
-
"lib/webidl/ast/argument.rb",
|
32
|
-
"lib/webidl/ast/attribute.rb",
|
33
|
-
"lib/webidl/ast/const.rb",
|
34
|
-
"lib/webidl/ast/exception.rb",
|
35
|
-
"lib/webidl/ast/extended_attribute.rb",
|
36
|
-
"lib/webidl/ast/field.rb",
|
37
|
-
"lib/webidl/ast/implements_statement.rb",
|
38
|
-
"lib/webidl/ast/interface.rb",
|
39
|
-
"lib/webidl/ast/module.rb",
|
40
|
-
"lib/webidl/ast/node.rb",
|
41
|
-
"lib/webidl/ast/operation.rb",
|
42
|
-
"lib/webidl/ast/scoped_name.rb",
|
43
|
-
"lib/webidl/ast/type.rb",
|
44
|
-
"lib/webidl/ast/typedef.rb",
|
45
|
-
"lib/webidl/extensions/string.rb",
|
46
|
-
"lib/webidl/extensions/syntax_node.rb",
|
47
|
-
"lib/webidl/generator.rb",
|
48
|
-
"lib/webidl/generator/ruby_sexp_visitor.rb",
|
49
|
-
"lib/webidl/parse_tree/absolute_scoped_name.rb",
|
50
|
-
"lib/webidl/parse_tree/argument.rb",
|
51
|
-
"lib/webidl/parse_tree/argument_list.rb",
|
52
|
-
"lib/webidl/parse_tree/attribute.rb",
|
53
|
-
"lib/webidl/parse_tree/const.rb",
|
54
|
-
"lib/webidl/parse_tree/definitions.rb",
|
55
|
-
"lib/webidl/parse_tree/exception.rb",
|
56
|
-
"lib/webidl/parse_tree/exception_field.rb",
|
57
|
-
"lib/webidl/parse_tree/extended_attributes.rb",
|
58
|
-
"lib/webidl/parse_tree/implements_statement.rb",
|
59
|
-
"lib/webidl/parse_tree/interface.rb",
|
60
|
-
"lib/webidl/parse_tree/interface_inheritance.rb",
|
61
|
-
"lib/webidl/parse_tree/interface_members.rb",
|
62
|
-
"lib/webidl/parse_tree/module.rb",
|
63
|
-
"lib/webidl/parse_tree/nullable_type.rb",
|
64
|
-
"lib/webidl/parse_tree/operation.rb",
|
65
|
-
"lib/webidl/parse_tree/relative_scoped_name.rb",
|
66
|
-
"lib/webidl/parse_tree/scoped_name_list.rb",
|
67
|
-
"lib/webidl/parse_tree/specials.rb",
|
68
|
-
"lib/webidl/parse_tree/stringifier_attribute_or_operation.rb",
|
69
|
-
"lib/webidl/parse_tree/type.rb",
|
70
|
-
"lib/webidl/parse_tree/typedef.rb",
|
71
|
-
"lib/webidl/parser/debug_helper.rb",
|
72
|
-
"lib/webidl/parser/idl.rb",
|
73
|
-
"lib/webidl/parser/idl.treetop",
|
74
|
-
"spec/ast_spec.rb",
|
75
|
-
"spec/fixtures/empty_interface.idl",
|
76
|
-
"spec/fixtures/empty_module.idl",
|
77
|
-
"spec/fixtures/framework.idl",
|
78
|
-
"spec/fixtures/html5.idl",
|
79
|
-
"spec/fixtures/interface_with_array_member.idl",
|
80
|
-
"spec/fixtures/interface_with_attribute.idl",
|
81
|
-
"spec/fixtures/interface_with_inheritance.idl",
|
82
|
-
"spec/fixtures/interface_with_members.idl",
|
83
|
-
"spec/fixtures/interface_with_specials.idl",
|
84
|
-
"spec/fixtures/interface_with_stringifiers.idl",
|
85
|
-
"spec/fixtures/module_with_exception.idl",
|
86
|
-
"spec/fixtures/module_with_implements_statement.idl",
|
87
|
-
"spec/fixtures/module_with_typedef.idl",
|
88
|
-
"spec/fixtures/module_with_xattr_ident.idl",
|
89
|
-
"spec/fixtures/module_with_xattr_named_args.idl",
|
90
|
-
"spec/fixtures/module_with_xattr_no_arg.idl",
|
91
|
-
"spec/fixtures/module_with_xattr_scoped.idl",
|
92
|
-
"spec/fixtures/module_with_xattr_two_args.idl",
|
93
|
-
"spec/fixtures/nested.idl",
|
94
|
-
"spec/fixtures/websocket.idl",
|
95
|
-
"spec/generator_spec.rb",
|
96
|
-
"spec/parser_spec.rb",
|
97
|
-
"spec/spec.opts",
|
98
|
-
"spec/spec_helper.rb",
|
99
|
-
"support/webidl-spec-2010-08-05.html",
|
100
|
-
"webidl.gemspec"
|
101
|
-
]
|
102
|
-
s.homepage = %q{http://github.com/jarib/webidl}
|
103
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
104
|
-
s.require_paths = ["lib"]
|
105
|
-
s.rubygems_version = %q{1.3.7}
|
106
|
-
s.summary = %q{WebIDL parser/generator for ruby}
|
107
|
-
s.test_files = [
|
108
|
-
"spec/ast_spec.rb",
|
109
|
-
"spec/generator_spec.rb",
|
110
|
-
"spec/parser_spec.rb",
|
111
|
-
"spec/spec_helper.rb",
|
112
|
-
"examples/html5.rb"
|
113
|
-
]
|
15
|
+
s.rubyforge_project = "webidl"
|
114
16
|
|
115
|
-
|
116
|
-
|
117
|
-
|
17
|
+
s.add_runtime_dependency "treetop"
|
18
|
+
s.add_runtime_dependency "ruby2ruby"
|
19
|
+
s.add_development_dependency "rspec", "~> 2.5"
|
118
20
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
else
|
124
|
-
s.add_dependency(%q<treetop>, [">= 0"])
|
125
|
-
s.add_dependency(%q<ruby2ruby>, [">= 0"])
|
126
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
127
|
-
end
|
128
|
-
else
|
129
|
-
s.add_dependency(%q<treetop>, [">= 0"])
|
130
|
-
s.add_dependency(%q<ruby2ruby>, [">= 0"])
|
131
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
132
|
-
end
|
21
|
+
s.files = `git ls-files`.split("\n")
|
22
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
|
+
s.require_paths = ["lib"]
|
133
25
|
end
|
134
|
-
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webidl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 6
|
9
|
-
version: 0.0.6
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.7
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Jari Bakken
|
@@ -14,8 +10,8 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date:
|
18
|
-
default_executable:
|
13
|
+
date: 2011-02-28 00:00:00 +01:00
|
14
|
+
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
21
17
|
name: treetop
|
@@ -25,8 +21,6 @@ dependencies:
|
|
25
21
|
requirements:
|
26
22
|
- - ">="
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 0
|
30
24
|
version: "0"
|
31
25
|
type: :runtime
|
32
26
|
version_requirements: *id001
|
@@ -38,8 +32,6 @@ dependencies:
|
|
38
32
|
requirements:
|
39
33
|
- - ">="
|
40
34
|
- !ruby/object:Gem::Version
|
41
|
-
segments:
|
42
|
-
- 0
|
43
35
|
version: "0"
|
44
36
|
type: :runtime
|
45
37
|
version_requirements: *id002
|
@@ -49,29 +41,27 @@ dependencies:
|
|
49
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
50
42
|
none: false
|
51
43
|
requirements:
|
52
|
-
- -
|
44
|
+
- - ~>
|
53
45
|
- !ruby/object:Gem::Version
|
54
|
-
|
55
|
-
- 0
|
56
|
-
version: "0"
|
46
|
+
version: "2.5"
|
57
47
|
type: :development
|
58
48
|
version_requirements: *id003
|
59
|
-
description: Built on Treetop, this gem will parse
|
60
|
-
email:
|
49
|
+
description: Built on Treetop, this gem will parse interface declarations in WebIDL and generate ruby code
|
50
|
+
email:
|
51
|
+
- jari.bakken@gmail.com
|
61
52
|
executables:
|
62
53
|
- webidl2ruby
|
63
54
|
extensions: []
|
64
55
|
|
65
|
-
extra_rdoc_files:
|
66
|
-
|
67
|
-
- README.rdoc
|
56
|
+
extra_rdoc_files: []
|
57
|
+
|
68
58
|
files:
|
69
59
|
- .document
|
70
60
|
- .gitignore
|
61
|
+
- Gemfile
|
71
62
|
- LICENSE
|
72
63
|
- README.rdoc
|
73
64
|
- Rakefile
|
74
|
-
- VERSION
|
75
65
|
- bin/webidl2ruby
|
76
66
|
- examples/html5.rb
|
77
67
|
- lib/webidl.rb
|
@@ -118,6 +108,7 @@ files:
|
|
118
108
|
- lib/webidl/parser/debug_helper.rb
|
119
109
|
- lib/webidl/parser/idl.rb
|
120
110
|
- lib/webidl/parser/idl.treetop
|
111
|
+
- lib/webidl/version.rb
|
121
112
|
- spec/ast_spec.rb
|
122
113
|
- spec/fixtures/empty_interface.idl
|
123
114
|
- spec/fixtures/empty_module.idl
|
@@ -150,8 +141,8 @@ homepage: http://github.com/jarib/webidl
|
|
150
141
|
licenses: []
|
151
142
|
|
152
143
|
post_install_message:
|
153
|
-
rdoc_options:
|
154
|
-
|
144
|
+
rdoc_options: []
|
145
|
+
|
155
146
|
require_paths:
|
156
147
|
- lib
|
157
148
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -159,27 +150,43 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
150
|
requirements:
|
160
151
|
- - ">="
|
161
152
|
- !ruby/object:Gem::Version
|
162
|
-
segments:
|
163
|
-
- 0
|
164
153
|
version: "0"
|
165
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
155
|
none: false
|
167
156
|
requirements:
|
168
157
|
- - ">="
|
169
158
|
- !ruby/object:Gem::Version
|
170
|
-
segments:
|
171
|
-
- 0
|
172
159
|
version: "0"
|
173
160
|
requirements: []
|
174
161
|
|
175
|
-
rubyforge_project:
|
176
|
-
rubygems_version: 1.
|
162
|
+
rubyforge_project: webidl
|
163
|
+
rubygems_version: 1.5.2
|
177
164
|
signing_key:
|
178
165
|
specification_version: 3
|
179
|
-
summary:
|
166
|
+
summary: Ruby parser for WebIDL
|
180
167
|
test_files:
|
181
168
|
- spec/ast_spec.rb
|
169
|
+
- spec/fixtures/empty_interface.idl
|
170
|
+
- spec/fixtures/empty_module.idl
|
171
|
+
- spec/fixtures/framework.idl
|
172
|
+
- spec/fixtures/html5.idl
|
173
|
+
- spec/fixtures/interface_with_array_member.idl
|
174
|
+
- spec/fixtures/interface_with_attribute.idl
|
175
|
+
- spec/fixtures/interface_with_inheritance.idl
|
176
|
+
- spec/fixtures/interface_with_members.idl
|
177
|
+
- spec/fixtures/interface_with_specials.idl
|
178
|
+
- spec/fixtures/interface_with_stringifiers.idl
|
179
|
+
- spec/fixtures/module_with_exception.idl
|
180
|
+
- spec/fixtures/module_with_implements_statement.idl
|
181
|
+
- spec/fixtures/module_with_typedef.idl
|
182
|
+
- spec/fixtures/module_with_xattr_ident.idl
|
183
|
+
- spec/fixtures/module_with_xattr_named_args.idl
|
184
|
+
- spec/fixtures/module_with_xattr_no_arg.idl
|
185
|
+
- spec/fixtures/module_with_xattr_scoped.idl
|
186
|
+
- spec/fixtures/module_with_xattr_two_args.idl
|
187
|
+
- spec/fixtures/nested.idl
|
188
|
+
- spec/fixtures/websocket.idl
|
182
189
|
- spec/generator_spec.rb
|
183
190
|
- spec/parser_spec.rb
|
191
|
+
- spec/spec.opts
|
184
192
|
- spec/spec_helper.rb
|
185
|
-
- examples/html5.rb
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.6
|