rdf-turtle 0.1.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,38 +17,31 @@ module RDF::Turtle
17
17
  terminal(:BLANK_NODE_LABEL, BLANK_NODE_LABEL) do |reader, prod, token, input|
18
18
  input[:resource] = reader.bnode(token.value[2..-1])
19
19
  end
20
- terminal(:IRI_REF, IRI_REF, :unescape => true) do |reader, prod, token, input|
21
- input[:resource] = reader.process_iri(token.value[1..-2])
20
+ terminal(:IRIREF, IRIREF, :unescape => true) do |reader, prod, token, input|
21
+ begin
22
+ input[:resource] = reader.process_iri(token.value[1..-2])
23
+ rescue ArgumentError => e
24
+ raise RDF::ReaderError, e.message
25
+ end
22
26
  end
23
27
  terminal(:DOUBLE, DOUBLE) do |reader, prod, token, input|
24
- input[:resource] = reader.literal(token.value, :datatype => RDF::XSD.double)
25
- end
26
- terminal(:DOUBLE_NEGATIVE, DOUBLE_NEGATIVE) do |reader, prod, token, input|
27
- input[:resource] = reader.literal(token.value, :datatype => RDF::XSD.double)
28
- end
29
- terminal(:DOUBLE_POSITIVE, DOUBLE_POSITIVE) do |reader, prod, token, input|
30
- input[:resource] = reader.literal(token.value, :datatype => RDF::XSD.double)
28
+ # Note that a Turtle Double may begin with a '.[eE]', so tack on a leading
29
+ # zero if necessary
30
+ value = token.value.sub(/\.([eE])/, '.0\1')
31
+ input[:resource] = reader.literal(value, :datatype => RDF::XSD.double)
31
32
  end
32
33
  terminal(:DECIMAL, DECIMAL) do |reader, prod, token, input|
33
- input[:resource] = reader.literal(token.value, :datatype => RDF::XSD.decimal)
34
- end
35
- terminal(:DECIMAL_NEGATIVE, DECIMAL_NEGATIVE) do |reader, prod, token, input|
36
- input[:resource] = reader.literal(token.value, :datatype => RDF::XSD.decimal)
37
- end
38
- terminal(:DECIMAL_POSITIVE, DECIMAL_POSITIVE) do |reader, prod, token, input|
39
- input[:resource] = reader.literal(token.value, :datatype => RDF::XSD.decimal)
34
+ # Note that a Turtle Decimal may begin with a '.', so tack on a leading
35
+ # zero if necessary
36
+ value = token.value
37
+ value = "0#{token.value}" if token.value[0,1] == "."
38
+ input[:resource] = reader.literal(value, :datatype => RDF::XSD.decimal)
40
39
  end
41
40
  terminal(:INTEGER, INTEGER) do |reader, prod, token, input|
42
41
  input[:resource] = reader.literal(token.value, :datatype => RDF::XSD.integer)
43
42
  end
44
- terminal(:INTEGER_NEGATIVE, INTEGER_NEGATIVE) do |reader, prod, token, input|
45
- input[:resource] = reader.literal(token.value, :datatype => RDF::XSD.integer)
46
- end
47
- terminal(:INTEGER_POSITIVE, INTEGER_POSITIVE) do |reader, prod, token, input|
48
- input[:resource] = reader.literal(token.value, :datatype => RDF::XSD.integer)
49
- end
50
43
  # Spec confusion: spec says : "Literals , prefixed names and IRIs may also contain escape sequences"
51
- terminal(:PNAME_LN, PNAME_LN) do |reader, prod, token, input|
44
+ terminal(:PNAME_LN, PNAME_LN, :unescape => true) do |reader, prod, token, input|
52
45
  prefix, suffix = token.value.split(":", 2)
53
46
  input[:resource] = reader.pname(prefix, suffix)
54
47
  end
@@ -58,37 +51,46 @@ module RDF::Turtle
58
51
 
59
52
  # Two contexts, one when prefix is being defined, the other when being used
60
53
  case prod
61
- when :prefixID
54
+ when :prefixID, :sparqlPrefix
62
55
  input[:prefix] = prefix
63
56
  else
64
57
  input[:resource] = reader.pname(prefix, '')
65
58
  end
66
59
  end
67
- terminal(:STRING_LITERAL_LONG1, STRING_LITERAL_LONG1, :unescape => true) do |reader, prod, token, input|
60
+ terminal(:STRING_LITERAL_LONG_SINGLE_QUOTE, STRING_LITERAL_LONG_SINGLE_QUOTE, :unescape => true) do |reader, prod, token, input|
68
61
  input[:string_value] = token.value[3..-4]
69
62
  end
70
- terminal(:STRING_LITERAL_LONG2, STRING_LITERAL_LONG2, :unescape => true) do |reader, prod, token, input|
63
+ terminal(:STRING_LITERAL_LONG_QUOTE, STRING_LITERAL_LONG_QUOTE, :unescape => true) do |reader, prod, token, input|
71
64
  input[:string_value] = token.value[3..-4]
72
65
  end
73
- terminal(:STRING_LITERAL1, STRING_LITERAL1, :unescape => true) do |reader, prod, token, input|
66
+ terminal(:STRING_LITERAL_QUOTE, STRING_LITERAL_QUOTE, :unescape => true) do |reader, prod, token, input|
74
67
  input[:string_value] = token.value[1..-2]
75
68
  end
76
- terminal(:STRING_LITERAL2, STRING_LITERAL2, :unescape => true) do |reader, prod, token, input|
69
+ terminal(:STRING_LITERAL_SINGLE_QUOTE, STRING_LITERAL_SINGLE_QUOTE, :unescape => true) do |reader, prod, token, input|
77
70
  input[:string_value] = token.value[1..-2]
78
71
  end
79
72
 
80
73
  # String terminals
81
74
  terminal(nil, %r([\(\),.;\[\]a]|\^\^|@base|@prefix|true|false)) do |reader, prod, token, input|
82
75
  case token.value
83
- when 'a' then input[:resource] = RDF.type
84
- when 'true', 'false' then input[:resource] = RDF::Literal::Boolean.new(token.value)
85
- else input[:string] = token.value
76
+ when 'a' then input[:resource] = RDF.type
77
+ when 'true', 'false' then input[:resource] = RDF::Literal::Boolean.new(token.value)
78
+ when '@base', '@prefix' then input[:lang] = token.value[1..-1]
79
+ else input[:string] = token.value
86
80
  end
87
81
  end
82
+
88
83
  terminal(:LANGTAG, LANGTAG) do |reader, prod, token, input|
89
84
  input[:lang] = token.value[1..-1]
90
85
  end
91
86
 
87
+ terminal(:SPARQL_PREFIX, SPARQL_PREFIX) do |reader, prod, token, input|
88
+ input[:string_value] = token.value.downcase
89
+ end
90
+ terminal(:SPARQL_BASE, SPARQL_BASE) do |reader, prod, token, input|
91
+ input[:string_value] = token.value.downcase
92
+ end
93
+
92
94
  # Productions
93
95
 
94
96
  # [4] prefixID defines a prefix mapping
@@ -108,6 +110,30 @@ module RDF::Turtle
108
110
  reader.options[:base_uri] = iri
109
111
  end
110
112
 
113
+ # [28s] sparqlPrefix ::= [Pp][Rr][Ee][Ff][Ii][Xx] PNAME_NS IRIREF
114
+ production(:sparqlPrefix) do |reader, phase, input, current, callback|
115
+ next unless phase == :finish
116
+ prefix = current[:prefix]
117
+ iri = current[:resource]
118
+ callback.call(:trace, "sparqlPrefix", lambda {"Defined prefix #{prefix.inspect} mapping to #{iri.inspect}"})
119
+ reader.prefix(prefix, iri)
120
+ end
121
+
122
+ # [29s] sparqlBase ::= [Bb][Aa][Ss][Ee] IRIREF
123
+ production(:sparqlBase) do |reader, phase, input, current, callback|
124
+ next unless phase == :finish
125
+ iri = current[:resource]
126
+ callback.call(:trace, ":sparqlBase", lambda {"Defined base as #{iri}"})
127
+ reader.options[:base_uri] = iri
128
+ end
129
+
130
+ # [6] triples
131
+ production(:triples) do |reader, phase, input, current, callback|
132
+ # Note production as triples for blankNodePropertyList
133
+ # to set :subject instead of :resource
134
+ current[:triples] = true
135
+ end
136
+
111
137
  # [9] verb ::= predicate | "a"
112
138
  production(:verb) do |reader, phase, input, current, callback|
113
139
  input[:predicate] = current[:resource] if phase == :finish
@@ -115,10 +141,11 @@ module RDF::Turtle
115
141
 
116
142
  # [10] subject ::= IRIref | blank
117
143
  production(:subject) do |reader, phase, input, current, callback|
144
+ current[:triples] = nil if phase == :start
118
145
  input[:subject] = current[:resource] if phase == :finish
119
146
  end
120
147
 
121
- # [12] object ::= IRIref | blank | literal
148
+ # [12] object ::= iri | blank | blankNodePropertyList | literal
122
149
  production(:object) do |reader, phase, input, current, callback|
123
150
  next unless phase == :finish
124
151
  if input[:object_list]
@@ -134,6 +161,8 @@ module RDF::Turtle
134
161
  production(:blankNodePropertyList) do |reader, phase, input, current, callback|
135
162
  if phase == :start
136
163
  current[:subject] = reader.bnode
164
+ elsif input[:triples]
165
+ input[:subject] = current[:subject]
137
166
  else
138
167
  input[:resource] = current[:subject]
139
168
  end
@@ -162,7 +191,7 @@ module RDF::Turtle
162
191
  end
163
192
  end
164
193
 
165
- # [60s] RDFLiteral ::= String ( LANGTAG | ( "^^" IRIref ) )?
194
+ # [17] RDFLiteral ::= String ( LanguageTag | ( "^^" IRIref ) )?
166
195
  production(:RDFLiteral) do |reader, phase, input, current, callback|
167
196
  next unless phase == :finish
168
197
  opts = {}
@@ -240,11 +269,11 @@ module RDF::Turtle
240
269
  when :statement
241
270
  add_statement(loc, RDF::Statement.from(data))
242
271
  when :trace
243
- debug(loc, *data)
272
+ debug(loc, *(data.dup << {:level => 0}))
244
273
  end
245
274
  end
246
275
  rescue RDF::LL1::Parser::Error => e
247
- debug("Parsing completed with errors:\n\t#{e.message}")
276
+ progress("Parsing completed with errors:\n\t#{e.message}")
248
277
  raise RDF::ReaderError, e.message if validate?
249
278
  end
250
279
 
@@ -264,15 +293,13 @@ module RDF::Turtle
264
293
 
265
294
  # add a statement, object can be literal or URI or bnode
266
295
  #
267
- # @param [Nokogiri::XML::Node, any] node:: XML Node or string for showing context
268
- # @param [URI, Node] subject:: the subject of the statement
269
- # @param [URI] predicate:: the predicate of the statement
270
- # @param [URI, Node, Literal] object:: the object of the statement
271
- # @return [Statement]:: Added statement
272
- # @raise [RDF::ReaderError]:: Checks parameter types and raises if they are incorrect if parsing mode is _validate_.
296
+ # @param [Nokogiri::XML::Node, any] node XML Node or string for showing context
297
+ # @param [RDF::Statement] statement the subject of the statement
298
+ # @return [RDF::Statement] Added statement
299
+ # @raise [RDF::ReaderError] Checks parameter types and raises if they are incorrect if parsing mode is _validate_.
273
300
  def add_statement(node, statement)
274
301
  if statement.valid?
275
- debug(node) {"generate statement: #{statement}"}
302
+ progress(node) {"generate statement: #{statement}"}
276
303
  @callback.call(statement)
277
304
  else
278
305
  error(node, "Statement is invalid: #{statement.inspect}")
@@ -343,12 +370,14 @@ module RDF::Turtle
343
370
 
344
371
  ##
345
372
  # Progress output when debugging
346
- # @param [String] node relative location in input
347
- # @param [String] message ("")
348
- # @yieldreturn [String] added to message
373
+ # param [String] node relative location in input
374
+ # param [String] message ("")
375
+ # yieldreturn [String] added to message
349
376
  def debug(*args)
350
377
  return unless @options[:debug] || RDF::Turtle.debug?
351
378
  options = args.last.is_a?(Hash) ? args.pop : {}
379
+ debug_level = options.fetch(:level, 1)
380
+ return unless debug_level <= DEBUG_LEVEL
352
381
  depth = options[:depth] || self.depth
353
382
  message = args.pop
354
383
  message = message.call if message.is_a?(Proc)
@@ -14,7 +14,8 @@ module RDF::Turtle
14
14
  [\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]|[\\u{10000}-\\u{EFFFF}]
15
15
  EOS
16
16
  U_CHARS2 = Regexp.compile("\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]")
17
- IRI_RANGE = Regexp.compile("[[^<>\"{}|^`\\\\]&&[^\\x00-\\x20]]") # [^<>\"{}|^`\\] - [#x00-#x20]
17
+ # [^<>\"{}|^`\\] - [#x00-#x20]
18
+ IRI_RANGE = Regexp.compile("[[^<>\"{}|^`\\\\]&&[^\\x00-\\x20]]")
18
19
  else
19
20
  ##
20
21
  # UTF-8 regular expressions for Ruby 1.8.x.
@@ -58,41 +59,66 @@ module RDF::Turtle
58
59
  [\\x7e-\\xff]
59
60
  EOS
60
61
  end
61
- UCHAR = RDF::LL1::Lexer::UCHAR
62
62
 
63
- WS = / |\t|\r|\n / # [93s]
64
- PERCENT = /%[0-9A-Fa-f]{2}/ # [162s]
65
- PN_LOCAL_ESC = /\\[_~\.\-\!$\&'\(\)\*\+,;=:\/\?\#@%]/ # [163s] # [163s]
66
- PLX = /#{PERCENT}|#{PN_LOCAL_ESC}/ # [160s]
67
- PN_CHARS_BASE = /[A-Z]|[a-z]|#{U_CHARS1}|#{UCHAR}/ # [95s]
68
- PN_CHARS_U = /_|#{PN_CHARS_BASE}/ # [96s]
69
- PN_CHARS = /-|[0-9]|#{PN_CHARS_U}|#{U_CHARS2}/ # [98s]
63
+ # [27]
64
+ UCHAR = RDF::LL1::Lexer::UCHAR
65
+ # [170s]
66
+ PERCENT = /%[0-9A-Fa-f]{2}/
67
+ # [172s]
68
+ PN_LOCAL_ESC = /\\[_~\.\-\!$\&'\(\)\*\+,;=:\/\?\#@%]/
69
+ # [169s]
70
+ PLX = /#{PERCENT}|#{PN_LOCAL_ESC}/
71
+ # [163s]
72
+ PN_CHARS_BASE = /[A-Z]|[a-z]|#{U_CHARS1}/
73
+ # [164s]
74
+ PN_CHARS_U = /_|#{PN_CHARS_BASE}/
75
+ # [166s]
76
+ PN_CHARS = /-|[0-9]|#{PN_CHARS_U}|#{U_CHARS2}/
77
+ PN_LOCAL_BODY = /(?:(?:\.|:|#{PN_CHARS}|#{PLX})*(?:#{PN_CHARS}|:|#{PLX}))?/
70
78
  PN_CHARS_BODY = /(?:(?:\.|#{PN_CHARS})*#{PN_CHARS})?/
71
- PN_LOCAL_BODY = /(?:(?:\.|#{PN_CHARS}|#{PLX})*(?:#{PN_CHARS}|#{PLX}))?/
72
- PN_LOCAL = /(?:[0-9]|#{PN_CHARS_U}|#{PLX})#{PN_LOCAL_BODY}/ # [100s]
79
+ # [167s]
80
+ PN_PREFIX = /#{PN_CHARS_BASE}#{PN_CHARS_BODY}/
81
+ # [100s]
82
+ PN_LOCAL = /(?:[0-9]|:|#{PN_CHARS_U}|#{PLX})#{PN_LOCAL_BODY}/
83
+ # [154s]
84
+ EXPONENT = /[eE][+-]?[0-9]+/
85
+ # [159s]
86
+ ECHAR = /\\[tbnrf\\"']/
87
+ # [19]
88
+ IRIREF = /<(?:#{IRI_RANGE}|#{UCHAR})*>/
89
+ # [139s]
90
+ PNAME_NS = /#{PN_PREFIX}?:/
91
+ # [140s]
92
+ PNAME_LN = /#{PNAME_NS}#{PN_LOCAL}/
93
+ # [141s]
94
+ BLANK_NODE_LABEL = /_:(?:[0-9]|#{PN_CHARS_U})(#{PN_CHARS}|\.)*/
95
+ # [144s]
96
+ LANGTAG = /@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*/
97
+ # [20]
98
+ INTEGER = /[+-]?[0-9]+/
99
+ # [21]
100
+ DECIMAL = /[+-]?(?:[0-9]*\.[0-9]+)/
101
+ # [22]
102
+ DOUBLE = /[+-]?(?:[0-9]+\.[0-9]*#{EXPONENT}|\.?[0-9]+#{EXPONENT})/
103
+ # [23]
104
+ STRING_LITERAL_QUOTE = /'(?:[^\'\\\n\r]|#{ECHAR}|#{UCHAR})*'/
105
+ # [24]
106
+ STRING_LITERAL_SINGLE_QUOTE = /"(?:[^\"\\\n\r]|#{ECHAR}|#{UCHAR})*"/
107
+ # [25]
108
+ STRING_LITERAL_LONG_SINGLE_QUOTE = /'''(?:(?:'|'')?(?:[^'\\]|#{ECHAR}|#{UCHAR}))*'''/m
109
+ # [26]
110
+ STRING_LITERAL_LONG_QUOTE = /"""(?:(?:"|"")?(?:[^"\\]|#{ECHAR}|#{UCHAR}))*"""/m
73
111
 
74
- EXPONENT = /[eE][+-]?[0-9]+/ # [86s]
75
-
76
- ANON = /\[#{WS}*\]/ # [94s]
77
- BLANK_NODE_LABEL = /_:#{PN_LOCAL}/ # [73s]
78
- DECIMAL = /(?:[0-9]+\.[0-9]+|\.[0-9]+)/ # [78s]
79
- DECIMAL_NEGATIVE = /\-(?:[0-9]+\.[0-9]+|\.[0-9]+)/ # [83s]
80
- DECIMAL_POSITIVE = /\+(?:[0-9]+\.[0-9]+|\.[0-9]+)/ # [81s]
81
- DOUBLE = /(?:[0-9]+\.[0-9]+|\.[0-9]+|[0-9]+)#{EXPONENT}/ # [79s]
82
- DOUBLE_NEGATIVE = /\-(?:[0-9]+\.[0-9]+|\.[0-9]+|[0-9]+)#{EXPONENT}/ # [79s]
83
- DOUBLE_POSITIVE = /\+(?:[0-9]+\.[0-9]+|\.[0-9]+|[0-9]+)#{EXPONENT}/ # [79s]
84
- ECHAR = /\\[tbnrf\\"']/ # [91s]
85
- INTEGER = /[0-9]+/ # [77s]
86
- INTEGER_NEGATIVE = /\-[0-9]+/ # [83s]
87
- INTEGER_POSITIVE = /\+[0-9]+/ # [80s]
88
- IRI_REF = /<(?:#{IRI_RANGE}|#{UCHAR})*>/ # [70s]
89
- LANGTAG = /@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*/ # [76s]
90
- PN_PREFIX = /#{PN_CHARS_BASE}#{PN_CHARS_BODY}/ # [99s]
91
- PNAME_NS = /#{PN_PREFIX}?:/ # [71s]
92
- PNAME_LN = /#{PNAME_NS}#{PN_LOCAL}/ # [72s]
93
- STRING_LITERAL1 = /'(?:[^\'\\\n\r]|#{ECHAR}|#{UCHAR})*'/ # [87s]
94
- STRING_LITERAL2 = /"(?:[^\"\\\n\r]|#{ECHAR}|#{UCHAR})*"/ # [88s]
95
- STRING_LITERAL_LONG1 = /'''(?:(?:'|'')?(?:[^'\\]|#{ECHAR}|#{UCHAR}))*'''/m # [89s]
96
- STRING_LITERAL_LONG2 = /"""(?:(?:"|"")?(?:[^"\\]|#{ECHAR}|#{UCHAR}))*"""/m # [90s]
112
+ # [161s]
113
+ WS = / |\t|\r|\n /
114
+ # [160s]
115
+ NIL = /\(#{WS}*\)/
116
+ # [162s]
117
+ ANON = /\[#{WS}*\]/
118
+ # [28t]
119
+ SPARQL_PREFIX = /prefix/i
120
+ # [29t]
121
+ SPARQL_BASE = /base/i
122
+
97
123
  end
98
124
  end
@@ -243,7 +243,7 @@ module RDF::Turtle
243
243
  ##
244
244
  # Returns the Turtle representation of a URI reference.
245
245
  #
246
- # @param [RDF::URI] literal
246
+ # @param [RDF::URI] uri
247
247
  # @param [Hash{Symbol => Object}] options
248
248
  # @return [String]
249
249
  def format_uri(uri, options = {})
@@ -393,8 +393,8 @@ module RDF::Turtle
393
393
 
394
394
  ##
395
395
  # Add debug event to debug array, if specified
396
- # @param [String] message ("")
397
- # @yieldreturn [String] added to message
396
+ # param [String] message ("")
397
+ # yieldreturn [String] added to message
398
398
  def debug(*args)
399
399
  return unless @options[:debug] || RDF::Turtle.debug?
400
400
  options = args.last.is_a?(Hash) ? args.pop : {}
metadata CHANGED
@@ -1,115 +1,227 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rdf-turtle
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.2
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Gregg Kellogg
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-05-14 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-11-06 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: rdf
16
- requirement: &70328228117260 !ruby/object:Gem::Requirement
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
17
23
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 27
28
+ segments:
29
+ - 0
30
+ - 3
31
+ - 4
21
32
  version: 0.3.4
22
33
  type: :runtime
34
+ requirement: *id001
23
35
  prerelease: false
24
- version_requirements: *70328228117260
25
- - !ruby/object:Gem::Dependency
36
+ - !ruby/object:Gem::Dependency
26
37
  name: open-uri-cached
27
- requirement: &70328228116800 !ruby/object:Gem::Requirement
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
28
39
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 23
44
+ segments:
45
+ - 0
46
+ - 0
47
+ - 4
32
48
  version: 0.0.4
33
49
  type: :development
50
+ requirement: *id002
34
51
  prerelease: false
35
- version_requirements: *70328228116800
36
- - !ruby/object:Gem::Dependency
52
+ - !ruby/object:Gem::Dependency
37
53
  name: spira
38
- requirement: &70328228100440 !ruby/object:Gem::Requirement
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
39
55
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 7
60
+ segments:
61
+ - 0
62
+ - 0
63
+ - 12
43
64
  version: 0.0.12
44
65
  type: :development
66
+ requirement: *id003
45
67
  prerelease: false
46
- version_requirements: *70328228100440
47
- - !ruby/object:Gem::Dependency
68
+ - !ruby/object:Gem::Dependency
48
69
  name: rspec
49
- requirement: &70328228099980 !ruby/object:Gem::Requirement
70
+ version_requirements: &id004 !ruby/object:Gem::Requirement
50
71
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ hash: 47
76
+ segments:
77
+ - 2
78
+ - 8
79
+ - 0
54
80
  version: 2.8.0
55
81
  type: :development
82
+ requirement: *id004
56
83
  prerelease: false
57
- version_requirements: *70328228099980
58
- - !ruby/object:Gem::Dependency
84
+ - !ruby/object:Gem::Dependency
59
85
  name: rdf-isomorphic
60
- requirement: &70328228099500 !ruby/object:Gem::Requirement
86
+ version_requirements: &id005 !ruby/object:Gem::Requirement
61
87
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 27
92
+ segments:
93
+ - 0
94
+ - 3
95
+ - 4
65
96
  version: 0.3.4
66
97
  type: :development
98
+ requirement: *id005
67
99
  prerelease: false
68
- version_requirements: *70328228099500
69
- - !ruby/object:Gem::Dependency
70
- name: rdf-n3
71
- requirement: &70328228099020 !ruby/object:Gem::Requirement
100
+ - !ruby/object:Gem::Dependency
101
+ name: json-ld
102
+ version_requirements: &id006 !ruby/object:Gem::Requirement
72
103
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: 0.3.5
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ hash: 19
108
+ segments:
109
+ - 0
110
+ - 3
111
+ - 0
112
+ version: 0.3.0
77
113
  type: :development
114
+ requirement: *id006
78
115
  prerelease: false
79
- version_requirements: *70328228099020
80
- - !ruby/object:Gem::Dependency
116
+ - !ruby/object:Gem::Dependency
81
117
  name: rdf-spec
82
- requirement: &70328228098540 !ruby/object:Gem::Requirement
118
+ version_requirements: &id007 !ruby/object:Gem::Requirement
83
119
  none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ hash: 27
124
+ segments:
125
+ - 0
126
+ - 3
127
+ - 4
87
128
  version: 0.3.4
88
129
  type: :development
130
+ requirement: *id007
89
131
  prerelease: false
90
- version_requirements: *70328228098540
91
- - !ruby/object:Gem::Dependency
132
+ - !ruby/object:Gem::Dependency
92
133
  name: yard
93
- requirement: &70328228098080 !ruby/object:Gem::Requirement
134
+ version_requirements: &id008 !ruby/object:Gem::Requirement
94
135
  none: false
95
- requirements:
96
- - - ! '>='
97
- - !ruby/object:Gem::Version
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ hash: 7
140
+ segments:
141
+ - 0
142
+ - 6
143
+ - 0
98
144
  version: 0.6.0
99
145
  type: :development
146
+ requirement: *id008
147
+ prerelease: false
148
+ - !ruby/object:Gem::Dependency
149
+ name: sxp
150
+ version_requirements: &id009 !ruby/object:Gem::Requirement
151
+ none: false
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ hash: 3
156
+ segments:
157
+ - 0
158
+ - 0
159
+ - 14
160
+ version: 0.0.14
161
+ type: :development
162
+ requirement: *id009
163
+ prerelease: false
164
+ - !ruby/object:Gem::Dependency
165
+ name: rdf-spec
166
+ version_requirements: &id010 !ruby/object:Gem::Requirement
167
+ none: false
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ hash: 3
172
+ segments:
173
+ - 0
174
+ - 3
175
+ - 8
176
+ version: 0.3.8
177
+ type: :development
178
+ requirement: *id010
179
+ prerelease: false
180
+ - !ruby/object:Gem::Dependency
181
+ name: rspec
182
+ version_requirements: &id011 !ruby/object:Gem::Requirement
183
+ none: false
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ hash: 35
188
+ segments:
189
+ - 2
190
+ - 11
191
+ - 0
192
+ version: 2.11.0
193
+ type: :development
194
+ requirement: *id011
195
+ prerelease: false
196
+ - !ruby/object:Gem::Dependency
197
+ name: rake
198
+ version_requirements: &id012 !ruby/object:Gem::Requirement
199
+ none: false
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ hash: 3
204
+ segments:
205
+ - 0
206
+ version: "0"
207
+ type: :development
208
+ requirement: *id012
100
209
  prerelease: false
101
- version_requirements: *70328228098080
102
210
  description: RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite.
103
211
  email: public-rdf-ruby@w3.org
104
212
  executables: []
213
+
105
214
  extensions: []
215
+
106
216
  extra_rdoc_files: []
107
- files:
217
+
218
+ files:
108
219
  - AUTHORS
109
220
  - README.markdown
110
221
  - History
111
222
  - UNLICENSE
112
223
  - VERSION
224
+ - lib/ebnf.rb
113
225
  - lib/rdf/ll1/lexer.rb
114
226
  - lib/rdf/ll1/parser.rb
115
227
  - lib/rdf/ll1/scanner.rb
@@ -121,29 +233,40 @@ files:
121
233
  - lib/rdf/turtle/writer.rb
122
234
  - lib/rdf/turtle.rb
123
235
  homepage: http://github.com/ruby-rdf/rdf-turtle
124
- licenses:
236
+ licenses:
125
237
  - Public Domain
126
238
  post_install_message:
127
239
  rdoc_options: []
128
- require_paths:
240
+
241
+ require_paths:
129
242
  - lib
130
- required_ruby_version: !ruby/object:Gem::Requirement
243
+ required_ruby_version: !ruby/object:Gem::Requirement
131
244
  none: false
132
- requirements:
133
- - - ! '>='
134
- - !ruby/object:Gem::Version
245
+ requirements:
246
+ - - ">="
247
+ - !ruby/object:Gem::Version
248
+ hash: 53
249
+ segments:
250
+ - 1
251
+ - 8
252
+ - 1
135
253
  version: 1.8.1
136
- required_rubygems_version: !ruby/object:Gem::Requirement
254
+ required_rubygems_version: !ruby/object:Gem::Requirement
137
255
  none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
256
+ requirements:
257
+ - - ">="
258
+ - !ruby/object:Gem::Version
259
+ hash: 3
260
+ segments:
261
+ - 0
262
+ version: "0"
142
263
  requirements: []
264
+
143
265
  rubyforge_project: rdf-turtle
144
- rubygems_version: 1.8.17
266
+ rubygems_version: 1.8.24
145
267
  signing_key:
146
268
  specification_version: 3
147
269
  summary: Turtle reader/writer for Ruby.
148
270
  test_files: []
271
+
149
272
  has_rdoc: false