shex 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,7 +43,11 @@ module ShEx
43
43
  # 160s
44
44
  ECHAR = /\\[tbnrf\\"']/
45
45
 
46
- WS = /(?:\s|(?:#[^\n\r]*))+/m.freeze
46
+ WS = %r((
47
+ \s
48
+ | (?:\#[^\n\r]*)
49
+ | (?:/\*(?:(?:\*[^/])|[^*])*\*/)
50
+ )+)xmu.freeze
47
51
 
48
52
  # 69
49
53
  RDF_TYPE = /a/.freeze
@@ -92,30 +96,6 @@ module ShEx
92
96
  CODE = /\{(?:[^%\\]|\\[%\\]|#{UCHAR})*%#{WS}*\}/m.freeze
93
97
  # 70
94
98
  REPEAT_RANGE = /\{\s*#{INTEGER}(?:,#{WS}*(?:#{INTEGER}|\*)?)?#{WS}*\}/.freeze
95
-
96
- # String terminals, mixed case sensitivity
97
- STR_EXPR = %r(true|false
98
- |\^\^|\/\/
99
- |[\(\)\{\}\[\],\.;\=\-\~!\|\&\@\$\?\+\*\%\^a]|
100
- (?i:OR|AND|NOT
101
- |BASE|PREFIX
102
- |IRI|BNODE|NONLITERAL
103
- |MINLENGTH|MAXLENGTH|LENGTH
104
- |MAXINCLUSIVE|MAXEXCLUSIVE
105
- |MININCLUSIVE|MINEXCLUSIVE
106
- |TOTALDIGITS|FRACTIONDIGITS
107
- |START
108
- |EXTERNAL|CLOSED|EXTRA|LITERAL
109
- )
110
- )x.freeze
111
-
112
- # Map terminals to canonical form
113
- STR_MAP = %w{OR AND NOT BASE PREFIX IRI BNODE NONLITERAL
114
- MINLENGTH MAXLENGTH LENGTH MININCLUSIVE MAXINCLUSIVE MINEXCLUSIVE MAXEXCLUSIVE
115
- TOTALDIGITS FRACTIONDIGITS START EXTERNAL CLOSED EXTRA LITERAL}.
116
- inject({}) do |memo, t|
117
- memo.merge(t.downcase => t)
118
- end
119
99
 
120
100
  end
121
101
  end
data/lib/shex.rb CHANGED
@@ -1,10 +1,12 @@
1
+ require 'rdf'
2
+ require 'sxp'
3
+ require 'shex/format'
4
+
1
5
  ##
2
6
  # A ShEx runtime for RDF.rb.
3
7
  #
4
8
  # @see https://shex.io/shex-semantics/#shexc
5
9
  module ShEx
6
- require 'rdf'
7
- require 'shex/format'
8
10
  autoload :Algebra, 'shex/algebra'
9
11
  autoload :Meta, 'shex/meta'
10
12
  autoload :Parser, 'shex/parser'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-25 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
@@ -230,6 +230,7 @@ files:
230
230
  - lib/shex/algebra/annotation.rb
231
231
  - lib/shex/algebra/each_of.rb
232
232
  - lib/shex/algebra/external.rb
233
+ - lib/shex/algebra/import.rb
233
234
  - lib/shex/algebra/language.rb
234
235
  - lib/shex/algebra/node_constraint.rb
235
236
  - lib/shex/algebra/not.rb
@@ -274,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
275
  - !ruby/object:Gem::Version
275
276
  version: '0'
276
277
  requirements: []
277
- rubygems_version: 3.2.15
278
+ rubygems_version: 3.2.22
278
279
  signing_key:
279
280
  specification_version: 4
280
281
  summary: Implementation of Shape Expressions (ShEx) for RDF.rb