bel_parser 1.0.0.alpha.46-java → 1.0.0.alpha.47-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: e20aa93f93819b3887705dee241c608ec5234d79
4
- data.tar.gz: 48d67bbc71f3661eb6f9dd352aa0a83fcad48404
3
+ metadata.gz: 4c2fddeaf52fe437892c924831ae99758ab14b95
4
+ data.tar.gz: 0e473e2c5900240e0e02e9e8831bfa41a043418e
5
5
  SHA512:
6
- metadata.gz: 61614dd94800d8fa273a8e73cabab9f22ee70e9c6b7155b45085c5a03ed12174afe41d3bd3f49b543174d835ab7f8ef51fc629d545f1be67700c78f3a89e2ead
7
- data.tar.gz: 5cca53c9d8fab61e84786f0ad5d47f296e9514520b3c4a43e9ae10971f2e72ec557a070eaa97c3ca8a4f40d06985f32956f06d5054ece9a9d7925ad98f77be1c
6
+ metadata.gz: 9913e3f53f9feec89720dac1fb43d78c2713e45b75da34a86e59d3a20f1831384ef13b1a13a2db34067e8b36bff4f7752e79d5774f48896ee3948ad7033a23d3
7
+ data.tar.gz: 16f4963203ecc695f70065a3320c147a32187ae86f7779d72edf39744d47ba8eefa5b34b111b894c083878f719081073a103aad2d308ba30653c486c769f15d6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.alpha.46
1
+ 1.0.0.alpha.47
@@ -93,7 +93,7 @@ module BELParser
93
93
  end
94
94
  Parameter.new(
95
95
  namespace,
96
- unquote(value.children[0].string_literal))
96
+ value.children[0].string_literal)
97
97
  end
98
98
  end
99
99
  end
@@ -1,4 +1,3 @@
1
- require 'bel_parser/quoting'
2
1
  require 'bel_parser/language/relationship'
3
2
 
4
3
  module BELParser
@@ -114,7 +113,6 @@ module BELParser
114
113
  end
115
114
 
116
115
  module Converters
117
- include BELParser::Quoting
118
116
  include BELParser::Parsers::AST
119
117
 
120
118
  def ast_to_statement(ast, spec, namespaces = {})
@@ -1,5 +1,3 @@
1
- require 'bel_parser/quoting'
2
-
3
1
  module BELParser
4
2
  module Expression
5
3
  module Model
@@ -60,7 +60,7 @@ module BELParser
60
60
  return prefix_node unless prefix_node.identifier
61
61
 
62
62
  @prefix = prefix_node.identifier.string_literal
63
- @type, @dataset = @namespace_hash[@prefix]
63
+ @type, @dataset = @namespace_hash[@prefix.downcase]
64
64
  return prefix_node unless @dataset
65
65
 
66
66
  prefix_node.namespace = @dataset
@@ -1,4 +1,3 @@
1
- require 'bel_parser/quoting'
2
1
  require_relative 'semantics_match'
3
2
  require_relative 'semantics_result'
4
3
  require_relative 'semantics_ast_warnings'
@@ -739,14 +738,12 @@ module BELParser
739
738
  UNDETERMINED = /[1?]_[?*]/
740
739
  UNKNOWN_START_STOP = '?'.freeze
741
740
 
742
- include BELParser::Quoting
743
-
744
741
  def initialize(**properties)
745
742
  super(:is_amino_acid_range, [], properties)
746
743
  end
747
744
 
748
745
  def match(value_node, spec)
749
- string_literal = unquote(value_node.children[0])
746
+ string_literal = value_node.children[0]
750
747
  case string_literal
751
748
  when START_STOP, UNDETERMINED, UNKNOWN_START_STOP
752
749
  success(value_node, spec)
@@ -758,14 +755,12 @@ module BELParser
758
755
 
759
756
  # AST node for IsSequencePosition is a semantic AST.
760
757
  class SemanticIsSequencePosition < SemanticASTNode
761
- include BELParser::Quoting
762
-
763
758
  def initialize(**properties)
764
759
  super(:is_sequence_position, [], properties)
765
760
  end
766
761
 
767
762
  def match(value_node, spec)
768
- string_literal = unquote(value_node.children[0].string_literal)
763
+ string_literal = value_node.children[0].string_literal
769
764
  integer_position =
770
765
  begin
771
766
  Integer(string_literal)
@@ -17,7 +17,7 @@ module BELParser
17
17
  return nil if prefix_identifier.nil?
18
18
 
19
19
  prefix = prefix_identifier.string_literal
20
- unless namespaces[prefix]
20
+ unless namespaces[prefix.downcase]
21
21
  UndefinedNamespaceError.new(prefix_node, spec, prefix, namespaces)
22
22
  end
23
23
  end
@@ -1,5 +1,4 @@
1
1
  require 'bel_parser/parsers/ast/node'
2
- require 'bel_parser/quoting'
3
2
 
4
3
  module BELParser
5
4
  module Language
@@ -7,7 +6,6 @@ module BELParser
7
6
  # Undefined namespace value finds values that are missing from their
8
7
  # purported namespaces.
9
8
  class UndefinedNamespaceValue
10
- extend BELParser::Quoting
11
9
  include SyntaxFunction
12
10
 
13
11
  private_class_method :new
@@ -17,7 +15,7 @@ module BELParser
17
15
  return nil unless value_node.namespace
18
16
 
19
17
  unless value_node.namespace_value
20
- value = unquote(value_node.children[0].string_literal)
18
+ value = value_node.children[0].string_literal
21
19
  UndefinedNamespaceValueWarning.new(value_node, spec, value)
22
20
  end
23
21
  end
@@ -1,4 +1,3 @@
1
- require 'bel_parser/quoting'
2
1
  require_relative '../parsers/serializer'
3
2
 
4
3
  module BELParser
@@ -7,7 +6,6 @@ module BELParser
7
6
  # nanopub hash objects.
8
7
  class NanopubMapper
9
8
  include BELParser::Parsers
10
- include BELParser::Quoting
11
9
 
12
10
  STATEMENT_TYPES = [
13
11
  :simple_statement,
@@ -90,19 +88,19 @@ module BELParser
90
88
  def citation(citation)
91
89
  return nil unless citation
92
90
  citation.each do |field, value|
93
- citation[field] = unquote(value)
91
+ citation[field] = value
94
92
  end
95
93
  end
96
94
 
97
95
  def support(support)
98
- unquote(support)
96
+ support
99
97
  end
100
98
 
101
99
  def experiment_context(annotations)
102
100
  (annotations || []).map do |name, value|
103
101
  {
104
102
  name: name,
105
- value: unquote(value)
103
+ value: value
106
104
  }
107
105
  end
108
106
  end
@@ -1,6 +1,5 @@
1
1
  require 'bel_parser/language'
2
2
  require 'bel_parser/parsers/ast/node'
3
- require 'bel_parser/quoting'
4
3
  require 'concurrent/hash'
5
4
  require_relative '../keywords'
6
5
  require_relative '../state_function'
@@ -10,7 +9,6 @@ module BELParser
10
9
  module State
11
10
  class BELVersion
12
11
  extend StateFunction
13
- extend BELParser::Quoting
14
12
  extend Keyword
15
13
 
16
14
  TARGET_NODE = BELParser::Parsers::AST::DocumentProperty
@@ -22,7 +20,7 @@ module BELParser
22
20
  name_string = name.identifier.string_literal
23
21
  return unless is_bel_version?(name_string)
24
22
 
25
- value_string = unquote(value.children[0].string_literal)
23
+ value_string = value.children[0].string_literal
26
24
  begin
27
25
  spec = BELParser::Language.specification(value_string)
28
26
  rescue ArgumentError
@@ -1,5 +1,4 @@
1
1
  require 'bel_parser/parsers/ast/node'
2
- require 'bel_parser/quoting'
3
2
  require 'concurrent/hash'
4
3
  require_relative '../state_function'
5
4
 
@@ -8,7 +7,6 @@ module BELParser
8
7
  module State
9
8
  class DocumentProperty
10
9
  extend StateFunction
11
- extend BELParser::Quoting
12
10
 
13
11
  TARGET_NODE = BELParser::Parsers::AST::DocumentProperty
14
12
 
@@ -20,7 +18,7 @@ module BELParser
20
18
  if name && value
21
19
  name_string = name.identifier.string_literal
22
20
  value_string = value.children[0].string_literal
23
- hash[name_string] = unquote(value_string)
21
+ hash[name_string] = value_string
24
22
  end
25
23
  end
26
24
  end
@@ -1,5 +1,4 @@
1
1
  require 'bel_parser/language'
2
- require 'bel_parser/quoting'
3
2
  require 'bel_parser/parsers/ast/node'
4
3
  require 'concurrent/hash'
5
4
  require_relative '../keywords'
@@ -11,7 +10,6 @@ module BELParser
11
10
  class Set
12
11
  extend StateFunction
13
12
  extend BELParser::Script::Keyword
14
- extend BELParser::Quoting
15
13
 
16
14
  TARGET_NODE = BELParser::Parsers::AST::Set
17
15
  LIST_NODE = BELParser::Parsers::AST::List
@@ -1,5 +1,4 @@
1
1
  require 'bel_parser/language'
2
- require 'bel_parser/quoting'
3
2
  require 'bel_parser/parsers/ast/node'
4
3
  require 'concurrent/hash'
5
4
  require_relative '../keywords'
@@ -11,7 +10,6 @@ module BELParser
11
10
  class Unset
12
11
  extend StateFunction
13
12
  extend BELParser::Script::Keyword
14
- extend BELParser::Quoting
15
13
 
16
14
  TARGET_NODE = BELParser::Parsers::AST::Unset
17
15
 
@@ -2,7 +2,6 @@ require 'bel_parser/language'
2
2
  require 'bel_parser/language/expression_validator'
3
3
  require 'bel_parser/language/syntax_function'
4
4
  require 'bel_parser/language/syntax_warning'
5
- require 'bel_parser/quoting'
6
5
  require 'bel_parser/parsers/ast/node'
7
6
  require 'concurrent/hash'
8
7
 
@@ -11,7 +10,6 @@ module BELParser
11
10
  module Syntax
12
11
  class ExpressionValidation
13
12
  extend BELParser::Language::Syntax::SyntaxFunction
14
- extend BELParser::Quoting
15
13
 
16
14
  TARGET_NODES = [
17
15
  BELParser::Parsers::AST::ObservedTerm,
@@ -1,7 +1,6 @@
1
1
  require 'bel_parser/language'
2
2
  require 'bel_parser/language/syntax_function'
3
3
  require 'bel_parser/language/syntax_error'
4
- require 'bel_parser/quoting'
5
4
  require 'bel_parser/parsers/ast/node'
6
5
  require 'concurrent/hash'
7
6
 
@@ -10,13 +9,12 @@ module BELParser
10
9
  module Syntax
11
10
  class InvalidRegexPattern
12
11
  extend BELParser::Language::Syntax::SyntaxFunction
13
- extend BELParser::Quoting
14
12
 
15
13
  TARGET_NODE = BELParser::Parsers::AST::Pattern
16
14
 
17
15
  def self.map(ast_node, script_context)
18
16
  return nil unless ast_node.is_a?(TARGET_NODE)
19
- pattern = unquote(ast_node.string.string_literal)
17
+ pattern = ast_node.string.string_literal
20
18
  begin
21
19
  Regexp.new(pattern)
22
20
  nil
@@ -1,7 +1,6 @@
1
1
  require 'bel_parser/language'
2
2
  require 'bel_parser/language/syntax_function'
3
3
  require 'bel_parser/language/syntax_warning'
4
- require 'bel_parser/quoting'
5
4
  require 'bel_parser/parsers/ast/node'
6
5
  require 'concurrent/hash'
7
6
  require_relative '../keywords'
@@ -11,7 +10,6 @@ module BELParser
11
10
  module Syntax
12
11
  class UndefinedAnnotationValue
13
12
  extend BELParser::Language::Syntax::SyntaxFunction
14
- extend BELParser::Quoting
15
13
  extend BELParser::Script::Keyword
16
14
 
17
15
  TARGET_NODE = BELParser::Parsers::AST::Set
@@ -57,7 +55,6 @@ module BELParser
57
55
  end
58
56
 
59
57
  def self.map_value(ast_node, name_string, value_string, identifier, reader)
60
- value_string = unquote(value_string)
61
58
  value = reader.retrieve_value_from_resource(identifier, value_string)
62
59
  UndefinedAnnotationValueWarning.new(
63
60
  ast_node,
@@ -1,7 +1,6 @@
1
1
  require 'bel_parser/language'
2
2
  require 'bel_parser/language/syntax_function'
3
3
  require 'bel_parser/language/syntax_error'
4
- require 'bel_parser/quoting'
5
4
  require 'bel_parser/parsers/ast/node'
6
5
  require 'concurrent/hash'
7
6
  require_relative '../keywords'
@@ -11,18 +10,17 @@ module BELParser
11
10
  module Syntax
12
11
  class UnsupportedBELVersion
13
12
  extend BELParser::Language::Syntax::SyntaxFunction
14
- extend BELParser::Quoting
15
13
  extend Keyword
16
14
 
17
- TARGET_NODE = BELParser::Parsers::AST::DocumentProperty
15
+ TARGET_NODE = BELParser::Parsers::AST::DocumentProperty
18
16
 
19
17
  def self.map(ast_node, script_context)
20
18
  return nil unless ast_node.is_a?(TARGET_NODE)
21
19
  name, value = ast_node.children
22
- name_string = name.identifier.string_literal
20
+ name_string = name.identifier.string_literal
23
21
  return nil unless is_bel_version?(name_string)
24
22
 
25
- value_string = unquote(value.children[0].string_literal)
23
+ value_string = value.children[0].string_literal
26
24
  begin
27
25
  BELParser::Language.specification(value_string)
28
26
  nil
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.46
4
+ version: 1.0.0.alpha.47
5
5
  platform: java
6
6
  authors:
7
7
  - Anthony Bargnesi