bel_parser 1.0.0.alpha.59-java → 1.0.0.alpha.60-java

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: 6ec93ad053665079ccc58c21a047638fe49103bd
4
- data.tar.gz: 4a1231dde9ef4ccba22fd46018ff7954db1fef24
3
+ metadata.gz: ae28215133d83c8b2a237eaed70fed02cc9cbdd6
4
+ data.tar.gz: 10c4e0c2296a1e924456bfb01d431272f42c2445
5
5
  SHA512:
6
- metadata.gz: a1071a21013284fbe2b45a36edd0b48ba23e948ae12c4a31abf178141782e23005121e713ad914a5a3cff607074878e4cd45ee0de268d695f0675da26464f1ad
7
- data.tar.gz: 2a3c3b33d383d3470711f2201d0377825a3620a494bf015b6613719705295b9648782ff9d26f712fb9543e1485ce008f9a6d213bd3bc66a24fd9c04c4eedddfc
6
+ metadata.gz: f9392a9d8769f5a469e234de93d524e754f244d9472a21a6636538cb55f04c6d100f944f4225c39ca3cd8c7e795f114fb6194755be5305712e947a488e238254
7
+ data.tar.gz: a649282f4e242ec258a573020e50561db4201d49dd6a07ab4c1ee18ab53542781db5ecc2c1a632e7aae3178fa60b0a9e8426875a35712cd2c77e48cb25523c7c
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: java
6
6
  authors:
7
7
  - Anthony Bargnesi