bel_parser 1.0.0.alpha.59 → 1.0.0.alpha.60

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 710b6f6cdb79b8ef607578afc5b5dabadf4a024b
4
- data.tar.gz: 383a3d27350fad55e10b371ab9ee1989411b9f43
3
+ metadata.gz: f3ed4d23d9c8ee19ec667828a774abee68c36097
4
+ data.tar.gz: b79fa86a07d35578b26c61d9f23087fd67e3635c
5
5
  SHA512:
6
- metadata.gz: d7855187634cba7dfbf6bbdaef695f522fa91e31bb44324c8945326f2de5c3c8f7927728ac5db402162516dcf08e7c2ed2cd83938c9afd328b665dc7f09810a7
7
- data.tar.gz: db75e40d117f789a082ca6afa5f6ccfa7180f4c0e9351a10f2fcaacd19468965f03a2f01bc69a8cbd9084a99068a46e4818e510cd8e2f39aef1ed0a91301c120
6
+ metadata.gz: 0fd133f1504d68cf9402a21d6107a7f3f19a09bcc576c884452b099ead5f35053f1c1d61e43d359a0a8af1bbe228f71996015a37297d5ef97878d2a22038287b
7
+ data.tar.gz: 93c9d788f9b3d8aca23152b59e21db36da06bd852332d53fd035d03e526378f43a27c2b3cf7fc075ee93e0d816257779fa7207a0840970855ae0cfc87543c6fd
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.alpha.59
1
+ 1.0.0.alpha.60
data/bin/bel2_validator CHANGED
@@ -83,14 +83,12 @@ require 'bel_parser/resource/resource_url_reader'
83
83
 
84
84
  uri_reader, url_reader = options.values_at(:uri_reader, :url_reader)
85
85
 
86
- namespaces =
87
- Hash[
88
- ARGV.map do |ns|
89
- prefix, identifier = ns.split('=')
90
- dataset = uri_reader.retrieve_resource(identifier)
91
- dataset ? [prefix, [:uri, dataset]] : nil
92
- end.compact
93
- ]
86
+ namespaces = Hash[
87
+ ARGV.map do |ns|
88
+ keyword, identifier = ns.split('=')
89
+ [keyword, BELParser::Expression::Model::Namespace.new(keyword, identifier, nil)]
90
+ end.compact
91
+ ]
94
92
 
95
93
  BELParser::Expression::Validator
96
94
  .new(options[:spec], namespaces, uri_reader, url_reader)
@@ -99,12 +97,13 @@ BELParser::Expression::Validator
99
97
  puts " AST Type: #{ast.type}"
100
98
 
101
99
  puts " Syntax results:"
102
- syntax_results(results).each do |res|
100
+
101
+ results.syntax_results.each do |res|
103
102
  puts " #{res}"
104
103
  end
105
104
 
106
105
  puts " Semantics results:"
107
- semantics_results(results).each do |res|
106
+ results.semantics_results.each do |res|
108
107
  if res.is_a?(BELParser::Language::Semantics::SignatureMappingSuccess)
109
108
  puts " Matched signature: #{res.signature.string_form}"
110
109
  end
@@ -59,8 +59,8 @@ module BELParser
59
59
  def on_prefix(prefix_node)
60
60
  return prefix_node unless prefix_node.identifier
61
61
 
62
- @prefix = prefix_node.identifier.string_literal
63
- @namespace = @namespace_hash[@prefix]
62
+ @prefix = prefix_node.identifier.string_literal
63
+ @namespace = @namespace_hash[@prefix]
64
64
  return prefix_node unless @namespace
65
65
 
66
66
  prefix_node.namespace = @namespace
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bel_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.59
4
+ version: 1.0.0.alpha.60
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Bargnesi