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 +4 -4
- data/VERSION +1 -1
- data/bin/bel2_validator +9 -10
- data/lib/bel_parser/language/apply_namespace_encoding.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3ed4d23d9c8ee19ec667828a774abee68c36097
|
4
|
+
data.tar.gz: b79fa86a07d35578b26c61d9f23087fd67e3635c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fd133f1504d68cf9402a21d6107a7f3f19a09bcc576c884452b099ead5f35053f1c1d61e43d359a0a8af1bbe228f71996015a37297d5ef97878d2a22038287b
|
7
|
+
data.tar.gz: 93c9d788f9b3d8aca23152b59e21db36da06bd852332d53fd035d03e526378f43a27c2b3cf7fc075ee93e0d816257779fa7207a0840970855ae0cfc87543c6fd
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0.alpha.
|
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
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
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
|
-
|
100
|
+
|
101
|
+
results.syntax_results.each do |res|
|
103
102
|
puts " #{res}"
|
104
103
|
end
|
105
104
|
|
106
105
|
puts " Semantics results:"
|
107
|
-
|
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
|
63
|
-
@namespace
|
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
|