ld-patch 0.1.0

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.
@@ -0,0 +1,91 @@
1
+ require 'ebnf/ll1/lexer'
2
+
3
+ module LD::Patch
4
+ module Terminals
5
+ # Definitions of token regular expressions used for lexical analysis
6
+
7
+ ##
8
+ # Unicode regular expressions for Ruby 1.9+ with the Oniguruma engine.
9
+ U_CHARS1 = Regexp.compile(<<-EOS.gsub(/\s+/, ''))
10
+ [\\u00C0-\\u00D6]|[\\u00D8-\\u00F6]|[\\u00F8-\\u02FF]|
11
+ [\\u0370-\\u037D]|[\\u037F-\\u1FFF]|[\\u200C-\\u200D]|
12
+ [\\u2070-\\u218F]|[\\u2C00-\\u2FEF]|[\\u3001-\\uD7FF]|
13
+ [\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]|[\\u{10000}-\\u{EFFFF}]
14
+ EOS
15
+ U_CHARS2 = Regexp.compile("\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]").freeze
16
+ IRI_RANGE = Regexp.compile("[[^<>\"{}|^`\\\\]&&[^\\x00-\\x20]]").freeze
17
+
18
+ # 26
19
+ UCHAR = EBNF::LL1::Lexer::UCHAR
20
+ # 159s
21
+ ECHAR = /\\[tbnrf\\"']/.freeze
22
+
23
+ # 18
24
+ IRIREF = /<(?:#{IRI_RANGE}|#{UCHAR})*>/.freeze
25
+ # 144s
26
+ LANGTAG = /@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*/.freeze
27
+ # 154s
28
+ EXPONENT = /[eE][+-]?[0-9]+/
29
+ # 19
30
+ INTEGER = /[+-]?[0-9]+/.freeze
31
+ # 20
32
+ DECIMAL = /[+-]?(?:[0-9]*\.[0-9]+)/.freeze
33
+ # 21
34
+ DOUBLE = /[+-]?(?:[0-9]+\.[0-9]*#{EXPONENT}|\.?[0-9]+#{EXPONENT})/.freeze
35
+ # 22
36
+ STRING_LITERAL_QUOTE = /"([^\"\\\n\r]|#{ECHAR}|#{UCHAR})*"/.freeze
37
+ # 23
38
+ STRING_LITERAL_SINGLE_QUOTE = /'([^\'\\\n\r]|#{ECHAR}|#{UCHAR})*'/.freeze
39
+ # 24
40
+ STRING_LITERAL_LONG_SINGLE_QUOTE = /'''((?:'|'')?(?:[^'\\]|#{ECHAR}|#{UCHAR}))*'''/m.freeze
41
+ # 25
42
+ STRING_LITERAL_LONG_QUOTE = /"""((?:"|"")?(?:[^"\\]|#{ECHAR}|#{UCHAR}))*"""/m.freeze
43
+ # 161s
44
+ WS = /(?:\s|(?:#[^\n\r]*))+/m.freeze
45
+ # 162s
46
+ ANON = /\[#{WS}*\]/m.freeze
47
+ # 170s
48
+ PERCENT = /%[0-9A-Fa-f]{2}/.freeze
49
+
50
+ # 172s
51
+ PN_LOCAL_ESC = /\\[_~\.\-\!$\&'\(\)\*\+,;=:\/\?\#@%]/.freeze
52
+ # 163s
53
+ PN_CHARS_BASE = /[A-Z]|[a-z]|#{U_CHARS1}/.freeze
54
+ # 164s
55
+ PN_CHARS_U = /_|#{PN_CHARS_BASE}/.freeze
56
+ # 166s
57
+ PN_CHARS = /-|[0-9]|#{PN_CHARS_U}|#{U_CHARS2}/.freeze
58
+ # 169s
59
+ PLX = /#{PERCENT}|#{PN_LOCAL_ESC}/.freeze
60
+
61
+ # 141s
62
+ BLANK_NODE_LABEL = /_:(?:[0-9]|#{PN_CHARS_U})((#{PN_CHARS}|\.)*#{PN_CHARS})?/.freeze
63
+ # 166s
64
+ VARNAME = /(?:[0-9]|#{PN_CHARS_U})
65
+ (?:[0-9]|#{PN_CHARS_U}|#{U_CHARS2})*/x.freeze
66
+ # 143s
67
+ VAR1 = /\?#{VARNAME}/.freeze
68
+ # 167s
69
+ PN_CHARS_BODY = /(?:(?:\.|#{PN_CHARS})*#{PN_CHARS})?/.freeze
70
+ PN_PREFIX = /#{PN_CHARS_BASE}#{PN_CHARS_BODY}/.freeze
71
+ # 168s
72
+ PN_LOCAL_BODY = /(?:(?:\.|:|#{PN_CHARS}|#{PLX})*(?:#{PN_CHARS}|:|#{PLX}))?/.freeze
73
+ PN_LOCAL = /(?:[0-9]|:|#{PN_CHARS_U}|#{PLX})#{PN_LOCAL_BODY}/.freeze
74
+ # 139s
75
+ PNAME_NS = /#{PN_PREFIX}?:/.freeze
76
+ # 1402
77
+ PNAME_LN = /(?:#{PNAME_NS})(?:#{PN_LOCAL})/.freeze
78
+
79
+ # String terminals, case sensitive
80
+ STR_EXPR = %r(AddNew|AN|Add
81
+ |Bind
82
+ |Cut
83
+ |DeleteExisting|Delete|DE
84
+ |UpdateList|UL
85
+ |@prefix
86
+ |true|false
87
+ |\^\^|\.\.
88
+ |[\(\),.;\[\]\{\}\=!^\/aABCD]
89
+ )x.freeze
90
+ end
91
+ end
@@ -0,0 +1,18 @@
1
+ module LD::Patch::VERSION
2
+ VERSION_FILE = File.join(File.expand_path(File.dirname(__FILE__)), "..", "..", "..", "VERSION")
3
+ MAJOR, MINOR, TINY, EXTRA = File.read(VERSION_FILE).chop.split(".")
4
+
5
+ STRING = [MAJOR, MINOR, TINY, EXTRA].compact.join('.')
6
+
7
+ ##
8
+ # @return [String]
9
+ def self.to_s() STRING end
10
+
11
+ ##
12
+ # @return [String]
13
+ def self.to_str() STRING end
14
+
15
+ ##
16
+ # @return [Array(Integer, Integer, Integer)]
17
+ def self.to_a() STRING.split(".") end
18
+ end
metadata ADDED
@@ -0,0 +1,275 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ld-patch
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Gregg Kellogg
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rdf
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.1.13
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.1'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.1.13
33
+ - !ruby/object:Gem::Dependency
34
+ name: ebnf
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.3'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 0.3.9
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '0.3'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 0.3.9
53
+ - !ruby/object:Gem::Dependency
54
+ name: sparql
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '1.1'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 1.1.7
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.1'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 1.1.7
73
+ - !ruby/object:Gem::Dependency
74
+ name: sxp
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '0.1'
80
+ type: :runtime
81
+ prerelease: false
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - "~>"
85
+ - !ruby/object:Gem::Version
86
+ version: '0.1'
87
+ - !ruby/object:Gem::Dependency
88
+ name: rdf-xsd
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '1.1'
94
+ type: :runtime
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "~>"
99
+ - !ruby/object:Gem::Version
100
+ version: '1.1'
101
+ - !ruby/object:Gem::Dependency
102
+ name: rack
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: '1.6'
108
+ type: :development
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - "~>"
113
+ - !ruby/object:Gem::Version
114
+ version: '1.6'
115
+ - !ruby/object:Gem::Dependency
116
+ name: linkeddata
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - "~>"
120
+ - !ruby/object:Gem::Version
121
+ version: '1.1'
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - "~>"
127
+ - !ruby/object:Gem::Version
128
+ version: '1.1'
129
+ - !ruby/object:Gem::Dependency
130
+ name: rdf-spec
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '1.1'
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - "~>"
141
+ - !ruby/object:Gem::Version
142
+ version: '1.1'
143
+ - !ruby/object:Gem::Dependency
144
+ name: open-uri-cached
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '0.0'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 0.0.5
153
+ type: :development
154
+ prerelease: false
155
+ version_requirements: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.0'
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 0.0.5
163
+ - !ruby/object:Gem::Dependency
164
+ name: rspec
165
+ requirement: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: 3.2.0
170
+ type: :development
171
+ prerelease: false
172
+ version_requirements: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - "~>"
175
+ - !ruby/object:Gem::Version
176
+ version: 3.2.0
177
+ - !ruby/object:Gem::Dependency
178
+ name: rspec-its
179
+ requirement: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - "~>"
182
+ - !ruby/object:Gem::Version
183
+ version: '1.2'
184
+ type: :development
185
+ prerelease: false
186
+ version_requirements: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - "~>"
189
+ - !ruby/object:Gem::Version
190
+ version: '1.2'
191
+ - !ruby/object:Gem::Dependency
192
+ name: yard
193
+ requirement: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - "~>"
196
+ - !ruby/object:Gem::Version
197
+ version: '0.8'
198
+ type: :development
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ requirements:
202
+ - - "~>"
203
+ - !ruby/object:Gem::Version
204
+ version: '0.8'
205
+ - !ruby/object:Gem::Dependency
206
+ name: webmock
207
+ requirement: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - "~>"
210
+ - !ruby/object:Gem::Version
211
+ version: '1.17'
212
+ type: :development
213
+ prerelease: false
214
+ version_requirements: !ruby/object:Gem::Requirement
215
+ requirements:
216
+ - - "~>"
217
+ - !ruby/object:Gem::Version
218
+ version: '1.17'
219
+ description: |2-
220
+
221
+ Implements the W3C Linked Data Patch Format and operations for RDF.rb.
222
+ Makes use of the SPARQL gem for performing updates
223
+ email: public-rdf-ruby@w3.org
224
+ executables: []
225
+ extensions: []
226
+ extra_rdoc_files: []
227
+ files:
228
+ - AUTHORS
229
+ - LICENSE
230
+ - README.md
231
+ - VERSION
232
+ - bin/ldpatch
233
+ - lib/ld/patch.rb
234
+ - lib/ld/patch/algebra.rb
235
+ - lib/ld/patch/algebra/add.rb
236
+ - lib/ld/patch/algebra/bind.rb
237
+ - lib/ld/patch/algebra/constraint.rb
238
+ - lib/ld/patch/algebra/cut.rb
239
+ - lib/ld/patch/algebra/delete.rb
240
+ - lib/ld/patch/algebra/index.rb
241
+ - lib/ld/patch/algebra/patch.rb
242
+ - lib/ld/patch/algebra/path.rb
243
+ - lib/ld/patch/algebra/prefix.rb
244
+ - lib/ld/patch/algebra/reverse.rb
245
+ - lib/ld/patch/algebra/update_list.rb
246
+ - lib/ld/patch/meta.rb
247
+ - lib/ld/patch/parser.rb
248
+ - lib/ld/patch/terminals.rb
249
+ - lib/ld/patch/version.rb
250
+ homepage: http://github.com/ruby-rdf/ld-patch
251
+ licenses:
252
+ - Public Domain
253
+ metadata: {}
254
+ post_install_message:
255
+ rdoc_options: []
256
+ require_paths:
257
+ - lib
258
+ required_ruby_version: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - ">="
261
+ - !ruby/object:Gem::Version
262
+ version: 2.0.0
263
+ required_rubygems_version: !ruby/object:Gem::Requirement
264
+ requirements:
265
+ - - ">="
266
+ - !ruby/object:Gem::Version
267
+ version: '0'
268
+ requirements: []
269
+ rubyforge_project: ld-patch
270
+ rubygems_version: 2.4.7
271
+ signing_key:
272
+ specification_version: 4
273
+ summary: W3C Linked Data Patch Format for RDF.rb.
274
+ test_files: []
275
+ has_rdoc: false