rdf-turtle 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/VERSION +1 -1
- data/lib/rdf/turtle/reader.rb +1 -1
- data/lib/rdf/turtle/terminals.rb +31 -31
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cab6a95280c9ece9d97ed7bde134044c247d0990cd9451772b3726a85c1dafce
|
4
|
+
data.tar.gz: 56c87a3f41a22ffae491aed4197261e204332541855777f1822bd24d965047f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5ce46d746a7ed5ac19c3b8fde60934485781149302d6b02e64d1b45dd70a6402c46ba8ca9e7eb06c3d96030c93c26646751bc92155dc239dbc41179d9c72c49
|
7
|
+
data.tar.gz: ad9a7a6ea210992f5a0ddbd037ded7b7f0a0129e4fc4a5610ad03f313381354207394840c9c729c70192906dfac58294c216a62382316b909f79a34c3db9d172
|
data/README.md
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/rdf-turtle.png)](https://badge.fury.io/rb/rdf-turtle)
|
6
6
|
[![Build Status](https://travis-ci.org/ruby-rdf/rdf-turtle.png?branch=master)](https://travis-ci.org/ruby-rdf/rdf-turtle)
|
7
7
|
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-turtle/badge.svg)](https://coveralls.io/r/ruby-rdf/rdf-turtle)
|
8
|
-
[![Dependency Status](https://gemnasium.com/ruby-rdf/rdf-turtle.png)](https://gemnasium.com/ruby-rdf/rdf-turtle)
|
9
8
|
|
10
9
|
## Description
|
11
10
|
This is a [Ruby][] implementation of a [Turtle][] parser for [RDF.rb][].
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.
|
1
|
+
3.1.2
|
data/lib/rdf/turtle/reader.rb
CHANGED
@@ -163,7 +163,7 @@ module RDF::Turtle
|
|
163
163
|
# @return [RDF::Statement] Added statement
|
164
164
|
# @raise [RDF::ReaderError] Checks parameter types and raises if they are incorrect if parsing mode is _validate_.
|
165
165
|
def add_statement(production, statement)
|
166
|
-
error("Statement is invalid: #{statement.inspect
|
166
|
+
error("Statement is invalid: #{statement.inspect}", production: produciton) if validate? && statement.invalid?
|
167
167
|
@callback.call(statement) if statement.subject &&
|
168
168
|
statement.predicate &&
|
169
169
|
statement.object &&
|
data/lib/rdf/turtle/terminals.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
require 'ebnf/ll1/lexer'
|
2
3
|
|
3
4
|
module RDF::Turtle
|
4
5
|
module Terminals
|
5
6
|
# Definitions of token regular expressions used for lexical analysis
|
6
|
-
|
7
7
|
##
|
8
8
|
# Unicode regular expressions for Ruby 1.9+ with the Oniguruma engine.
|
9
9
|
U_CHARS1 = Regexp.compile(<<-EOS.gsub(/\s+/, ''))
|
@@ -12,66 +12,66 @@ module RDF::Turtle
|
|
12
12
|
[\\u2070-\\u218F]|[\\u2C00-\\u2FEF]|[\\u3001-\\uD7FF]|
|
13
13
|
[\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]|[\\u{10000}-\\u{EFFFF}]
|
14
14
|
EOS
|
15
|
-
U_CHARS2 = Regexp.compile("\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]").freeze
|
16
|
-
IRI_RANGE = Regexp.compile("[[^<>\"{}|^`\\\\]&&[^\\x00-\\x20]]").freeze
|
15
|
+
U_CHARS2 = Regexp.compile("\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]", Regexp::FIXEDENCODING).freeze
|
16
|
+
IRI_RANGE = Regexp.compile("[[^<>\"{}|^`\\\\]&&[^\\x00-\\x20]]", Regexp::FIXEDENCODING).freeze
|
17
17
|
|
18
18
|
# 26
|
19
19
|
UCHAR = EBNF::LL1::Lexer::UCHAR
|
20
20
|
# 170s
|
21
|
-
PERCENT = /%[0-9A-Fa-f]{2}
|
21
|
+
PERCENT = /%[0-9A-Fa-f]{2}/u.freeze
|
22
22
|
# 172s
|
23
|
-
PN_LOCAL_ESC = /\\[_~\.\-\!$\&'\(\)\*\+,;=\/\?\#@%]
|
23
|
+
PN_LOCAL_ESC = /\\[_~\.\-\!$\&'\(\)\*\+,;=\/\?\#@%]/u.freeze
|
24
24
|
# 169s
|
25
|
-
PLX = /#{PERCENT}|#{PN_LOCAL_ESC}
|
25
|
+
PLX = /#{PERCENT}|#{PN_LOCAL_ESC}/u.freeze
|
26
26
|
# 163s
|
27
|
-
PN_CHARS_BASE = /[A-Z]|[a-z]|#{U_CHARS1}
|
27
|
+
PN_CHARS_BASE = /[A-Z]|[a-z]|#{U_CHARS1}/u.freeze
|
28
28
|
# 164s
|
29
|
-
PN_CHARS_U = /_|#{PN_CHARS_BASE}
|
29
|
+
PN_CHARS_U = /_|#{PN_CHARS_BASE}/u.freeze
|
30
30
|
# 166s
|
31
|
-
PN_CHARS = /-|[0-9]|#{PN_CHARS_U}|#{U_CHARS2}
|
32
|
-
PN_LOCAL_BODY = /(?:(?:\.|:|#{PN_CHARS}|#{PLX})*(?:#{PN_CHARS}|:|#{PLX}))
|
33
|
-
PN_CHARS_BODY = /(?:(?:\.|#{PN_CHARS})*#{PN_CHARS})
|
31
|
+
PN_CHARS = /-|[0-9]|#{PN_CHARS_U}|#{U_CHARS2}/u.freeze
|
32
|
+
PN_LOCAL_BODY = /(?:(?:\.|:|#{PN_CHARS}|#{PLX})*(?:#{PN_CHARS}|:|#{PLX}))?/u.freeze
|
33
|
+
PN_CHARS_BODY = /(?:(?:\.|#{PN_CHARS})*#{PN_CHARS})?/u.freeze
|
34
34
|
# 167s
|
35
|
-
PN_PREFIX = /#{PN_CHARS_BASE}#{PN_CHARS_BODY}
|
35
|
+
PN_PREFIX = /#{PN_CHARS_BASE}#{PN_CHARS_BODY}/u.freeze
|
36
36
|
# 168s
|
37
|
-
PN_LOCAL = /(?:[0-9]|:|#{PN_CHARS_U}|#{PLX})#{PN_LOCAL_BODY}
|
37
|
+
PN_LOCAL = /(?:[0-9]|:|#{PN_CHARS_U}|#{PLX})#{PN_LOCAL_BODY}/u.freeze
|
38
38
|
# 154s
|
39
|
-
EXPONENT = /[eE][+-]?[0-9]+/
|
39
|
+
EXPONENT = /[eE][+-]?[0-9]+/u.freeze
|
40
40
|
# 159s
|
41
|
-
ECHAR = /\\[tbnrf\\"']/
|
41
|
+
ECHAR = /\\[tbnrf\\"']/u.freeze
|
42
42
|
# 18
|
43
|
-
IRIREF = /<(?:#{IRI_RANGE}|#{UCHAR})
|
43
|
+
IRIREF = /<(?:#{IRI_RANGE}|#{UCHAR})*>/u.freeze
|
44
44
|
# 139s
|
45
|
-
PNAME_NS = /#{PN_PREFIX}
|
45
|
+
PNAME_NS = /#{PN_PREFIX}?:/u.freeze
|
46
46
|
# 140s
|
47
|
-
PNAME_LN = /#{PNAME_NS}#{PN_LOCAL}
|
47
|
+
PNAME_LN = /#{PNAME_NS}#{PN_LOCAL}/u.freeze
|
48
48
|
# 141s
|
49
|
-
BLANK_NODE_LABEL = /_:(?:[0-9]|#{PN_CHARS_U})(?:(?:#{PN_CHARS}|\.)*#{PN_CHARS})
|
49
|
+
BLANK_NODE_LABEL = /_:(?:[0-9]|#{PN_CHARS_U})(?:(?:#{PN_CHARS}|\.)*#{PN_CHARS})?/u.freeze
|
50
50
|
# 144s
|
51
|
-
LANGTAG = /@[a-zA-Z]+(?:-[a-zA-Z0-9]+)
|
51
|
+
LANGTAG = /@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*/u.freeze
|
52
52
|
# 19
|
53
|
-
INTEGER = /[+-]?[0-9]
|
53
|
+
INTEGER = /[+-]?[0-9]+/u.freeze
|
54
54
|
# 20
|
55
|
-
DECIMAL = /[+-]?(?:[0-9]*\.[0-9]+)
|
55
|
+
DECIMAL = /[+-]?(?:[0-9]*\.[0-9]+)/u.freeze
|
56
56
|
# 21
|
57
|
-
DOUBLE = /[+-]?(?:[0-9]+\.[0-9]*#{EXPONENT}|\.?[0-9]+#{EXPONENT})
|
57
|
+
DOUBLE = /[+-]?(?:[0-9]+\.[0-9]*#{EXPONENT}|\.?[0-9]+#{EXPONENT})/u.freeze
|
58
58
|
# 22
|
59
|
-
STRING_LITERAL_SINGLE_QUOTE = /'(?:[^\'\\\n\r]|#{ECHAR}|#{UCHAR})*'
|
59
|
+
STRING_LITERAL_SINGLE_QUOTE = /'(?:[^\'\\\n\r]|#{ECHAR}|#{UCHAR})*'/u.freeze
|
60
60
|
# 23
|
61
|
-
STRING_LITERAL_QUOTE = /"(?:[^\"\\\n\r]|#{ECHAR}|#{UCHAR})*"
|
61
|
+
STRING_LITERAL_QUOTE = /"(?:[^\"\\\n\r]|#{ECHAR}|#{UCHAR})*"/u.freeze
|
62
62
|
# 24
|
63
|
-
STRING_LITERAL_LONG_SINGLE_QUOTE = /'''(?:(?:'|'')?(?:[^'\\]|#{ECHAR}|#{UCHAR}))*'''/
|
63
|
+
STRING_LITERAL_LONG_SINGLE_QUOTE = /'''(?:(?:'|'')?(?:[^'\\]|#{ECHAR}|#{UCHAR}))*'''/um.freeze
|
64
64
|
# 25
|
65
|
-
STRING_LITERAL_LONG_QUOTE = /"""(?:(?:"|"")?(?:[^"\\]|#{ECHAR}|#{UCHAR}))*"""/
|
65
|
+
STRING_LITERAL_LONG_QUOTE = /"""(?:(?:"|"")?(?:[^"\\]|#{ECHAR}|#{UCHAR}))*"""/um.freeze
|
66
66
|
|
67
67
|
# 161s
|
68
|
-
WS = /(?:\s|(?:#[^\n\r]*))+/
|
68
|
+
WS = /(?:\s|(?:#[^\n\r]*))+/um.freeze
|
69
69
|
# 162s
|
70
|
-
ANON = /\[#{WS}*\]/
|
70
|
+
ANON = /\[#{WS}*\]/um.freeze
|
71
71
|
# 28t
|
72
|
-
PREFIX = /@?prefix/
|
72
|
+
PREFIX = /@?prefix/ui.freeze
|
73
73
|
# 29t
|
74
|
-
BASE = /@?base/
|
74
|
+
BASE = /@?base/ui.freeze
|
75
75
|
|
76
76
|
end
|
77
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-turtle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg Kellogg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdf
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '2.0'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '2.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|