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 +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: ae28215133d83c8b2a237eaed70fed02cc9cbdd6
|
4
|
+
data.tar.gz: 10c4e0c2296a1e924456bfb01d431272f42c2445
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9392a9d8769f5a469e234de93d524e754f244d9472a21a6636538cb55f04c6d100f944f4225c39ca3cd8c7e795f114fb6194755be5305712e947a488e238254
|
7
|
+
data.tar.gz: a649282f4e242ec258a573020e50561db4201d49dd6a07ab4c1ee18ab53542781db5ecc2c1a632e7aae3178fa60b0a9e8426875a35712cd2c77e48cb25523c7c
|
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
|