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.
@@ -45,7 +45,7 @@ module RDF::LL1
45
45
  }
46
46
  ESCAPE_CHAR4 = /\\u(?:[0-9A-Fa-f]{4,4})/ # \uXXXX
47
47
  ESCAPE_CHAR8 = /\\U(?:[0-9A-Fa-f]{8,8})/ # \UXXXXXXXX
48
- ECHAR = /\\[tbnrf\\"']/ # [91s]
48
+ ECHAR = /\\./ # More liberal unescaping
49
49
  UCHAR = /#{ESCAPE_CHAR4}|#{ESCAPE_CHAR8}/
50
50
  COMMENT = /#.*/
51
51
  WS = / |\t|\r|\n/m
@@ -65,7 +65,7 @@ module RDF::LL1
65
65
  # `\UXXXXXXXX` Unicode codepoint escape sequences replaced with their
66
66
  # unescaped UTF-8 character counterparts.
67
67
  #
68
- # @param [String] input
68
+ # @param [String] string
69
69
  # @return [String]
70
70
  # @see http://www.w3.org/TR/rdf-sparql-query/#codepointEscape
71
71
  def self.unescape_codepoints(string)
@@ -88,7 +88,7 @@ module RDF::LL1
88
88
  # @return [String]
89
89
  # @see http://www.w3.org/TR/rdf-sparql-query/#grammarEscapes
90
90
  def self.unescape_string(input)
91
- input.gsub(ECHAR) { |escaped| ESCAPE_CHARS[escaped] }
91
+ input.gsub(ECHAR) { |escaped| ESCAPE_CHARS[escaped] || escaped[1..-1]}
92
92
  end
93
93
 
94
94
  ##
@@ -273,7 +273,7 @@ module RDF::LL1
273
273
  # @return [Token]
274
274
  def match_token
275
275
  @terminals.each do |(term, regexp)|
276
- #STDERR.puts "match[#{term}] #{scanner.rest[0..100].inspect} against #{regexp.inspect}" if term == :STRING_LITERAL2
276
+ #STDERR.puts "match[#{term}] #{scanner.rest[0..100].inspect} against #{regexp.inspect}" #if term == :STRING_LITERAL_SINGLE_QUOTE
277
277
  if matched = scanner.scan(regexp)
278
278
  matched = unescape(matched) if @unescape_terms.include?(term)
279
279
  #STDERR.puts " unescape? #{@unescape_terms.include?(term).inspect}"
@@ -5,6 +5,11 @@ module RDF::LL1
5
5
  ##
6
6
  # A Generic LL1 parser using a lexer and branch tables defined using the SWAP tool chain (modified).
7
7
  module Parser
8
+ ##
9
+ # @private
10
+ # level above which debug messages are supressed
11
+ DEBUG_LEVEL = 10
12
+
8
13
  ##
9
14
  # @attr [Integer] lineno
10
15
  attr_reader :lineno
@@ -202,7 +207,7 @@ module RDF::LL1
202
207
  if prod_branch = @branch[cur_prod]
203
208
  @recovering = false
204
209
  sequence = prod_branch[token.representation]
205
- debug("parse(production)") do
210
+ debug("parse(production)", :level => 2) do
206
211
  "token #{token.representation.inspect} " +
207
212
  "prod #{cur_prod.inspect}, " +
208
213
  "prod_branch #{prod_branch.keys.inspect}, " +
@@ -211,7 +216,7 @@ module RDF::LL1
211
216
 
212
217
  if sequence.nil?
213
218
  if prod_branch.has_key?(:"ebnf:empty")
214
- debug("parse(production)") {"empty sequence for ebnf:empty"}
219
+ debug("parse(production)", :level => 2) {"empty sequence for ebnf:empty"}
215
220
  else
216
221
  # If there is no sequence for this production, we're
217
222
  # in error recovery, and _token_ has been advanced to
@@ -226,7 +231,7 @@ module RDF::LL1
226
231
  end
227
232
  end
228
233
 
229
- debug("parse(terms)") {"todo #{todo_stack.last.inspect}, depth #{depth}"}
234
+ debug("parse(terms)", :level => 2) {"todo #{todo_stack.last.inspect}, depth #{depth}"}
230
235
  while !todo_stack.last[:terms].to_a.empty?
231
236
  begin
232
237
  # Get the next term in this sequence
@@ -243,7 +248,7 @@ module RDF::LL1
243
248
  else
244
249
  # If it's not a string (a symbol), it is a non-terminal and we push the new state
245
250
  todo_stack << {:prod => term, :terms => nil}
246
- debug("parse(push)") {"term #{term.inspect}, depth #{depth}"}
251
+ debug("parse(push)", :level => 2) {"term #{term.inspect}, depth #{depth}"}
247
252
  pushed = true
248
253
  break
249
254
  end
@@ -257,7 +262,7 @@ module RDF::LL1
257
262
  !todo_stack.empty? &&
258
263
  ( todo_stack.last[:terms].to_a.empty? ||
259
264
  (@recovering && @follow[todo_stack.last[:term]].nil?))
260
- debug("parse(pop)") {"todo #{todo_stack.last.inspect}, depth #{depth}, recovering? #{@recovering.inspect}"}
265
+ debug("parse(pop)", :level => 2) {"todo #{todo_stack.last.inspect}, depth #{depth}, recovering? #{@recovering.inspect}"}
261
266
  prod = todo_stack.last[:prod]
262
267
  @recovering = false if @follow[prod] # Stop recovering when we might have a match
263
268
  todo_stack.pop
@@ -269,7 +274,12 @@ module RDF::LL1
269
274
 
270
275
  # Continue popping contexts off of the stack
271
276
  while !todo_stack.empty?
272
- debug("parse(eof)") {"stack #{todo_stack.last.inspect}, depth #{depth}"}
277
+ debug("parse(eof)", :level => 2) {"stack #{todo_stack.last.inspect}, depth #{depth}"}
278
+ if todo_stack.last[:terms].length > 0
279
+ error("parse(eof)",
280
+ "End of input before end of production: stack #{todo_stack.last.inspect}, depth #{depth}"
281
+ )
282
+ end
273
283
  todo_stack.pop
274
284
  onFinish
275
285
  end
@@ -295,7 +305,7 @@ module RDF::LL1
295
305
  handler.call(self, :start, @prod_data.last, data, @parse_callback)
296
306
  @prod_data << data
297
307
  else
298
- progress("#{prod}(:start)", '')
308
+ progress("#{prod}(:start)") { get_token.inspect}
299
309
  end
300
310
  #puts @prod_data.inspect
301
311
  end
@@ -320,7 +330,8 @@ module RDF::LL1
320
330
  unless @productions.empty?
321
331
  parentProd = @productions.last
322
332
  handler = self.class.terminal_handlers[prod]
323
- handler ||= self.class.terminal_handlers[nil] if prod.is_a?(String) # Allows catch-all for simple string terminals
333
+ # Allows catch-all for simple string terminals
334
+ handler ||= self.class.terminal_handlers[nil] if prod.is_a?(String)
324
335
  if handler
325
336
  handler.call(self, parentProd, token, @prod_data.last)
326
337
  progress("#{prod}(:token)", "", :depth => (depth + 1)) {"#{token}: #{@prod_data.last}"}
@@ -383,7 +394,9 @@ module RDF::LL1
383
394
  token
384
395
  end
385
396
 
386
- # @param [String] str Error string
397
+ ##
398
+ # @param [String] node Relevant location associated with message
399
+ # @param [String] message Error string
387
400
  # @param [Hash] options
388
401
  # @option options [URI, #to_s] :production
389
402
  # @option options [Token] :token
@@ -393,7 +406,7 @@ module RDF::LL1
393
406
  message += ", production = #{options[:production].inspect}" if options[:production] && @options[:debug]
394
407
  @error_log << message unless @recovering
395
408
  @recovering = true
396
- debug(node, message, options)
409
+ debug(node, message, options.merge(:level => 0))
397
410
  end
398
411
 
399
412
  ##
@@ -411,21 +424,22 @@ module RDF::LL1
411
424
 
412
425
  # Retrieve next valid token
413
426
  t = @lexer.recover
414
- debug("get_token") {"skipped to #{t.inspect}"}
427
+ debug("get_token", :level => 2) {"skipped to #{t.inspect}"}
415
428
  t
416
429
  end
430
+ #progress("token") {token.inspect}
417
431
  @lineno = token.lineno if token
418
432
  token
419
433
  end
420
434
 
421
435
  ##
422
436
  # Progress output when parsing
423
- # @param [String] node Relevant location associated with message
424
- # @param [String] message ("")
425
- # @param [Hash] options
426
- # @option options [Integer] :depth
427
- # Recursion depth for indenting output
428
- # @yieldreturn [String] added to message
437
+ # param [String] node Relevant location associated with message
438
+ # param [String] message ("")
439
+ # param [Hash] options
440
+ # option options [Integer] :depth
441
+ # Recursion depth for indenting output
442
+ # yieldreturn [String] added to message
429
443
  def progress(node, *args)
430
444
  return unless @options[:progress] || @options[:debug]
431
445
  options = args.last.is_a?(Hash) ? args.pop : {}
@@ -433,7 +447,7 @@ module RDF::LL1
433
447
  depth = options[:depth] || self.depth
434
448
  message += yield.to_s if block_given?
435
449
  if @options[:debug]
436
- return debug(node, message, options)
450
+ return debug(node, message, {:level => 0}.merge(options))
437
451
  else
438
452
  str = "[#{@lineno}]#{' ' * depth}#{node}: #{message}"
439
453
  $stderr.puts("[#{@lineno}]#{' ' * depth}#{node}: #{message}")
@@ -450,9 +464,11 @@ module RDF::LL1
450
464
  # @yieldreturn [String] added to message
451
465
  def debug(node, message = "", options = {})
452
466
  return unless @options[:debug]
467
+ debug_level = options.fetch(:level, 1)
468
+ return unless debug_level <= DEBUG_LEVEL
453
469
  depth = options[:depth] || self.depth
454
470
  message += yield if block_given?
455
- str = "[#{@lineno}]#{' ' * depth}#{node}: #{message}"
471
+ str = "[#{@lineno}](#{debug_level})#{' ' * depth}#{node}: #{message}"
456
472
  case @options[:debug]
457
473
  when Array
458
474
  @options[:debug] << str
@@ -19,7 +19,7 @@ module RDF::LL1
19
19
  ##
20
20
  # Create a scanner, from an IO or String
21
21
  #
22
- # @param [String, IO, #read] file
22
+ # @param [String, IO, #read] input
23
23
  # @param [Hash{Symbol => Object}] options
24
24
  # @option options[Integer] :high_water (HIGH_WATER)
25
25
  # @option options[Integer] :low_water (LOW_WATER)
@@ -40,7 +40,7 @@ module RDF::Turtle
40
40
  def self.detect(sample)
41
41
  !!sample.match(%r(
42
42
  (?:@(base|prefix)) | # Turtle keywords
43
- ["']{3} | # STRING_LITERAL_LONG1/2
43
+ ["']{3} | # STRING_LITERAL_LONG_SINGLE_QUOTE/2
44
44
  "[^"]*"^^ | "[^"]*"@ | # Typed/Language literals
45
45
  (?:
46
46
  (?:\s*(?:(?:<[^>]*>) | (?:\w*:\w+) | (?:"[^"]*"))\s*[,;]) ||
@@ -5,169 +5,174 @@ module RDF::Turtle::Meta
5
5
 
6
6
  BRANCH = {
7
7
  :"_:_g0" => {
8
- ";" => [:"_:g2156954680"],
8
+ "a" => [:predicateObjectList],
9
9
  :"ebnf:empty" => [],
10
+ :IRIREF => [:predicateObjectList],
11
+ :PNAME_LN => [:predicateObjectList],
12
+ :PNAME_NS => [:predicateObjectList],
10
13
  },
11
14
  :"_:_g1" => {
12
- ";" => [";", :"_:_g2"],
15
+ ";" => [:"_:g70259508899400"],
16
+ :"ebnf:empty" => [],
13
17
  },
14
18
  :"_:_g2" => {
19
+ ";" => [";", :"_:_g3"],
20
+ },
21
+ :"_:_g3" => {
15
22
  ";" => [],
16
- "a" => [:"_:_g3"],
23
+ "a" => [:"_:_g4"],
17
24
  :"ebnf:empty" => [],
18
- :IRI_REF => [:"_:_g3"],
19
- :PNAME_LN => [:"_:_g3"],
20
- :PNAME_NS => [:"_:_g3"],
25
+ :IRIREF => [:"_:_g4"],
26
+ :PNAME_LN => [:"_:_g4"],
27
+ :PNAME_NS => [:"_:_g4"],
21
28
  },
22
- :"_:_g3" => {
29
+ :"_:_g4" => {
23
30
  ";" => [],
24
31
  "a" => [:verb, :objectList],
25
- :IRI_REF => [:verb, :objectList],
32
+ :IRIREF => [:verb, :objectList],
26
33
  :PNAME_LN => [:verb, :objectList],
27
34
  :PNAME_NS => [:verb, :objectList],
28
35
  },
29
- :"_:_g4" => {
30
- "," => [:"_:g2153337920"],
36
+ :"_:_g5" => {
37
+ "," => [:"_:g70259512229140"],
31
38
  ";" => [],
32
39
  :"ebnf:empty" => [],
33
40
  },
34
- :"_:_g5" => {
41
+ :"_:_g6" => {
35
42
  "," => [",", :object],
36
43
  },
37
- :"_:_g6" => {
38
- "(" => [:"_:g2152877000"],
39
- "[" => [:"_:g2152877000"],
40
- "false" => [:"_:g2152877000"],
44
+ :"_:_g7" => {
45
+ "(" => [:"_:g70259509658260"],
46
+ "[" => [:"_:g70259509658260"],
47
+ "false" => [:"_:g70259509658260"],
41
48
  :"ebnf:empty" => [],
42
- :ANON => [:"_:g2152877000"],
43
- :BLANK_NODE_LABEL => [:"_:g2152877000"],
44
- :DECIMAL => [:"_:g2152877000"],
45
- :DECIMAL_NEGATIVE => [:"_:g2152877000"],
46
- :DECIMAL_POSITIVE => [:"_:g2152877000"],
47
- :DOUBLE => [:"_:g2152877000"],
48
- :DOUBLE_NEGATIVE => [:"_:g2152877000"],
49
- :DOUBLE_POSITIVE => [:"_:g2152877000"],
50
- :INTEGER => [:"_:g2152877000"],
51
- :INTEGER_NEGATIVE => [:"_:g2152877000"],
52
- :INTEGER_POSITIVE => [:"_:g2152877000"],
53
- :IRI_REF => [:"_:g2152877000"],
54
- :PNAME_LN => [:"_:g2152877000"],
55
- :PNAME_NS => [:"_:g2152877000"],
56
- :STRING_LITERAL1 => [:"_:g2152877000"],
57
- :STRING_LITERAL2 => [:"_:g2152877000"],
58
- :STRING_LITERAL_LONG1 => [:"_:g2152877000"],
59
- :STRING_LITERAL_LONG2 => [:"_:g2152877000"],
60
- "true" => [:"_:g2152877000"],
49
+ :ANON => [:"_:g70259509658260"],
50
+ :BLANK_NODE_LABEL => [:"_:g70259509658260"],
51
+ :DECIMAL => [:"_:g70259509658260"],
52
+ :DOUBLE => [:"_:g70259509658260"],
53
+ :INTEGER => [:"_:g70259509658260"],
54
+ :IRIREF => [:"_:g70259509658260"],
55
+ :PNAME_LN => [:"_:g70259509658260"],
56
+ :PNAME_NS => [:"_:g70259509658260"],
57
+ :STRING_LITERAL_LONG_QUOTE => [:"_:g70259509658260"],
58
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [:"_:g70259509658260"],
59
+ :STRING_LITERAL_QUOTE => [:"_:g70259509658260"],
60
+ :STRING_LITERAL_SINGLE_QUOTE => [:"_:g70259509658260"],
61
+ "true" => [:"_:g70259509658260"],
61
62
  },
62
- :"_:_g7" => {
63
+ :"_:_g8" => {
63
64
  "(" => [],
64
65
  "," => [],
65
66
  "[" => [],
66
- "^^" => [:"_:_g8"],
67
+ "^^" => [:"_:_g9"],
67
68
  "false" => [],
68
69
  :"ebnf:empty" => [],
69
70
  :ANON => [],
70
71
  :BLANK_NODE_LABEL => [],
71
72
  :DECIMAL => [],
72
- :DECIMAL_NEGATIVE => [],
73
- :DECIMAL_POSITIVE => [],
74
73
  :DOUBLE => [],
75
- :DOUBLE_NEGATIVE => [],
76
- :DOUBLE_POSITIVE => [],
77
74
  :INTEGER => [],
78
- :INTEGER_NEGATIVE => [],
79
- :INTEGER_POSITIVE => [],
80
- :IRI_REF => [],
81
- :LANGTAG => [:"_:_g8"],
75
+ :IRIREF => [],
76
+ :LANGTAG => [:"_:_g9"],
82
77
  :PNAME_LN => [],
83
78
  :PNAME_NS => [],
84
- :STRING_LITERAL1 => [],
85
- :STRING_LITERAL2 => [],
86
- :STRING_LITERAL_LONG1 => [],
87
- :STRING_LITERAL_LONG2 => [],
79
+ :STRING_LITERAL_LONG_QUOTE => [],
80
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
81
+ :STRING_LITERAL_QUOTE => [],
82
+ :STRING_LITERAL_SINGLE_QUOTE => [],
88
83
  "true" => [],
89
84
  },
90
- :"_:_g8" => {
85
+ :"_:_g9" => {
91
86
  "(" => [],
92
87
  "," => [],
93
88
  "[" => [],
94
- "^^" => [:"_:g2165812760"],
89
+ "^^" => [:"_:g70259512303120"],
95
90
  "false" => [],
96
91
  :ANON => [],
97
92
  :BLANK_NODE_LABEL => [],
98
93
  :DECIMAL => [],
99
- :DECIMAL_NEGATIVE => [],
100
- :DECIMAL_POSITIVE => [],
101
94
  :DOUBLE => [],
102
- :DOUBLE_NEGATIVE => [],
103
- :DOUBLE_POSITIVE => [],
104
95
  :INTEGER => [],
105
- :INTEGER_NEGATIVE => [],
106
- :INTEGER_POSITIVE => [],
107
- :IRI_REF => [],
96
+ :IRIREF => [],
108
97
  :LANGTAG => [:LANGTAG],
109
98
  :PNAME_LN => [],
110
99
  :PNAME_NS => [],
111
- :STRING_LITERAL1 => [],
112
- :STRING_LITERAL2 => [],
113
- :STRING_LITERAL_LONG1 => [],
114
- :STRING_LITERAL_LONG2 => [],
100
+ :STRING_LITERAL_LONG_QUOTE => [],
101
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
102
+ :STRING_LITERAL_QUOTE => [],
103
+ :STRING_LITERAL_SINGLE_QUOTE => [],
115
104
  "true" => [],
116
105
  },
117
- :"_:g2152809700" => {
106
+ :"_:g70259508445120" => {
107
+ "[" => [:blankNodePropertyList, :"_:_g0"],
108
+ },
109
+ :"_:g70259508693960" => {
110
+ "(" => [:subject, :predicateObjectList],
111
+ :ANON => [:subject, :predicateObjectList],
112
+ :BLANK_NODE_LABEL => [:subject, :predicateObjectList],
113
+ :IRIREF => [:subject, :predicateObjectList],
114
+ :PNAME_LN => [:subject, :predicateObjectList],
115
+ :PNAME_NS => [:subject, :predicateObjectList],
116
+ },
117
+ :"_:g70259508899400" => {
118
+ ";" => [:"_:_g2", :"_:_g1"],
119
+ },
120
+ :"_:g70259509658260" => {
121
+ "(" => [:object, :"_:_g7"],
122
+ "[" => [:object, :"_:_g7"],
123
+ "false" => [:object, :"_:_g7"],
124
+ :ANON => [:object, :"_:_g7"],
125
+ :BLANK_NODE_LABEL => [:object, :"_:_g7"],
126
+ :DECIMAL => [:object, :"_:_g7"],
127
+ :DOUBLE => [:object, :"_:_g7"],
128
+ :INTEGER => [:object, :"_:_g7"],
129
+ :IRIREF => [:object, :"_:_g7"],
130
+ :PNAME_LN => [:object, :"_:_g7"],
131
+ :PNAME_NS => [:object, :"_:_g7"],
132
+ :STRING_LITERAL_LONG_QUOTE => [:object, :"_:_g7"],
133
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [:object, :"_:_g7"],
134
+ :STRING_LITERAL_QUOTE => [:object, :"_:_g7"],
135
+ :STRING_LITERAL_SINGLE_QUOTE => [:object, :"_:_g7"],
136
+ "true" => [:object, :"_:_g7"],
137
+ },
138
+ :"_:g70259512113780" => {
118
139
  "(" => [:triples, "."],
119
140
  "@base" => [],
120
141
  "@prefix" => [],
121
142
  "[" => [:triples, "."],
122
143
  :ANON => [:triples, "."],
123
144
  :BLANK_NODE_LABEL => [:triples, "."],
124
- :IRI_REF => [:triples, "."],
145
+ :IRIREF => [:triples, "."],
125
146
  :PNAME_LN => [:triples, "."],
126
147
  :PNAME_NS => [:triples, "."],
148
+ :SPARQL_BASE => [],
149
+ :SPARQL_PREFIX => [],
127
150
  },
128
- :"_:g2152877000" => {
129
- "(" => [:object, :"_:_g6"],
130
- "[" => [:object, :"_:_g6"],
131
- "false" => [:object, :"_:_g6"],
132
- :ANON => [:object, :"_:_g6"],
133
- :BLANK_NODE_LABEL => [:object, :"_:_g6"],
134
- :DECIMAL => [:object, :"_:_g6"],
135
- :DECIMAL_NEGATIVE => [:object, :"_:_g6"],
136
- :DECIMAL_POSITIVE => [:object, :"_:_g6"],
137
- :DOUBLE => [:object, :"_:_g6"],
138
- :DOUBLE_NEGATIVE => [:object, :"_:_g6"],
139
- :DOUBLE_POSITIVE => [:object, :"_:_g6"],
140
- :INTEGER => [:object, :"_:_g6"],
141
- :INTEGER_NEGATIVE => [:object, :"_:_g6"],
142
- :INTEGER_POSITIVE => [:object, :"_:_g6"],
143
- :IRI_REF => [:object, :"_:_g6"],
144
- :PNAME_LN => [:object, :"_:_g6"],
145
- :PNAME_NS => [:object, :"_:_g6"],
146
- :STRING_LITERAL1 => [:object, :"_:_g6"],
147
- :STRING_LITERAL2 => [:object, :"_:_g6"],
148
- :STRING_LITERAL_LONG1 => [:object, :"_:_g6"],
149
- :STRING_LITERAL_LONG2 => [:object, :"_:_g6"],
150
- "true" => [:object, :"_:_g6"],
151
+ :"_:g70259512229140" => {
152
+ "," => [:"_:_g6", :"_:_g5"],
153
+ ";" => [],
151
154
  },
152
- :"_:g2153010700" => {
155
+ :"_:g70259512303120" => {
153
156
  "(" => [],
154
- "@base" => [:directive, "."],
155
- "@prefix" => [:directive, "."],
157
+ "," => [],
156
158
  "[" => [],
159
+ "^^" => ["^^", :iri],
160
+ "false" => [],
157
161
  :ANON => [],
158
162
  :BLANK_NODE_LABEL => [],
159
- :IRI_REF => [],
163
+ :DECIMAL => [],
164
+ :DOUBLE => [],
165
+ :INTEGER => [],
166
+ :IRIREF => [],
160
167
  :PNAME_LN => [],
161
168
  :PNAME_NS => [],
169
+ :STRING_LITERAL_LONG_QUOTE => [],
170
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
171
+ :STRING_LITERAL_QUOTE => [],
172
+ :STRING_LITERAL_SINGLE_QUOTE => [],
173
+ "true" => [],
162
174
  },
163
- :"_:g2153337920" => {
164
- "," => [:"_:_g5", :"_:_g4"],
165
- ";" => [],
166
- },
167
- :"_:g2156954680" => {
168
- ";" => [:"_:_g1", :"_:_g0"],
169
- },
170
- :"_:g2165682600" => {
175
+ :"_:g70259512513580" => {
171
176
  "(" => [:statement, :turtleDoc],
172
177
  "@base" => [:statement, :turtleDoc],
173
178
  "@prefix" => [:statement, :turtleDoc],
@@ -175,38 +180,11 @@ module RDF::Turtle::Meta
175
180
  :"ebnf:eof" => [],
176
181
  :ANON => [:statement, :turtleDoc],
177
182
  :BLANK_NODE_LABEL => [:statement, :turtleDoc],
178
- :IRI_REF => [:statement, :turtleDoc],
183
+ :IRIREF => [:statement, :turtleDoc],
179
184
  :PNAME_LN => [:statement, :turtleDoc],
180
185
  :PNAME_NS => [:statement, :turtleDoc],
181
- },
182
- :"_:g2165812760" => {
183
- "(" => [],
184
- "," => [],
185
- "[" => [],
186
- "^^" => ["^^", :IRIref],
187
- "false" => [],
188
- :ANON => [],
189
- :BLANK_NODE_LABEL => [],
190
- :DECIMAL => [],
191
- :DECIMAL_NEGATIVE => [],
192
- :DECIMAL_POSITIVE => [],
193
- :DOUBLE => [],
194
- :DOUBLE_NEGATIVE => [],
195
- :DOUBLE_POSITIVE => [],
196
- :INTEGER => [],
197
- :INTEGER_NEGATIVE => [],
198
- :INTEGER_POSITIVE => [],
199
- :IRI_REF => [],
200
- :PNAME_LN => [],
201
- :PNAME_NS => [],
202
- :STRING_LITERAL1 => [],
203
- :STRING_LITERAL2 => [],
204
- :STRING_LITERAL_LONG1 => [],
205
- :STRING_LITERAL_LONG2 => [],
206
- "true" => [],
207
- },
208
- :BASE => {
209
- "@base" => ["@base"],
186
+ :SPARQL_BASE => [:statement, :turtleDoc],
187
+ :SPARQL_PREFIX => [:statement, :turtleDoc],
210
188
  },
211
189
  :BlankNode => {
212
190
  "(" => [],
@@ -217,21 +195,15 @@ module RDF::Turtle::Meta
217
195
  :ANON => [:ANON],
218
196
  :BLANK_NODE_LABEL => [:BLANK_NODE_LABEL],
219
197
  :DECIMAL => [],
220
- :DECIMAL_NEGATIVE => [],
221
- :DECIMAL_POSITIVE => [],
222
198
  :DOUBLE => [],
223
- :DOUBLE_NEGATIVE => [],
224
- :DOUBLE_POSITIVE => [],
225
199
  :INTEGER => [],
226
- :INTEGER_NEGATIVE => [],
227
- :INTEGER_POSITIVE => [],
228
- :IRI_REF => [],
200
+ :IRIREF => [],
229
201
  :PNAME_LN => [],
230
202
  :PNAME_NS => [],
231
- :STRING_LITERAL1 => [],
232
- :STRING_LITERAL2 => [],
233
- :STRING_LITERAL_LONG1 => [],
234
- :STRING_LITERAL_LONG2 => [],
203
+ :STRING_LITERAL_LONG_QUOTE => [],
204
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
205
+ :STRING_LITERAL_QUOTE => [],
206
+ :STRING_LITERAL_SINGLE_QUOTE => [],
235
207
  "true" => [],
236
208
  },
237
209
  :BooleanLiteral => {
@@ -242,125 +214,18 @@ module RDF::Turtle::Meta
242
214
  :ANON => [],
243
215
  :BLANK_NODE_LABEL => [],
244
216
  :DECIMAL => [],
245
- :DECIMAL_NEGATIVE => [],
246
- :DECIMAL_POSITIVE => [],
247
217
  :DOUBLE => [],
248
- :DOUBLE_NEGATIVE => [],
249
- :DOUBLE_POSITIVE => [],
250
218
  :INTEGER => [],
251
- :INTEGER_NEGATIVE => [],
252
- :INTEGER_POSITIVE => [],
253
- :IRI_REF => [],
219
+ :IRIREF => [],
254
220
  :PNAME_LN => [],
255
221
  :PNAME_NS => [],
256
- :STRING_LITERAL1 => [],
257
- :STRING_LITERAL2 => [],
258
- :STRING_LITERAL_LONG1 => [],
259
- :STRING_LITERAL_LONG2 => [],
222
+ :STRING_LITERAL_LONG_QUOTE => [],
223
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
224
+ :STRING_LITERAL_QUOTE => [],
225
+ :STRING_LITERAL_SINGLE_QUOTE => [],
260
226
  "true" => ["true"],
261
227
  },
262
- :IRIref => {
263
- "(" => [],
264
- "," => [],
265
- "[" => [],
266
- "a" => [],
267
- "false" => [],
268
- :ANON => [],
269
- :BLANK_NODE_LABEL => [],
270
- :DECIMAL => [],
271
- :DECIMAL_NEGATIVE => [],
272
- :DECIMAL_POSITIVE => [],
273
- :DOUBLE => [],
274
- :DOUBLE_NEGATIVE => [],
275
- :DOUBLE_POSITIVE => [],
276
- :INTEGER => [],
277
- :INTEGER_NEGATIVE => [],
278
- :INTEGER_POSITIVE => [],
279
- :IRI_REF => [:IRI_REF],
280
- :PNAME_LN => [:PrefixedName],
281
- :PNAME_NS => [:PrefixedName],
282
- :STRING_LITERAL1 => [],
283
- :STRING_LITERAL2 => [],
284
- :STRING_LITERAL_LONG1 => [],
285
- :STRING_LITERAL_LONG2 => [],
286
- "true" => [],
287
- },
288
228
  :NumericLiteral => {
289
- "(" => [],
290
- "," => [],
291
- "[" => [],
292
- "false" => [],
293
- :ANON => [],
294
- :BLANK_NODE_LABEL => [],
295
- :DECIMAL => [:NumericLiteralUnsigned],
296
- :DECIMAL_NEGATIVE => [:NumericLiteralNegative],
297
- :DECIMAL_POSITIVE => [:NumericLiteralPositive],
298
- :DOUBLE => [:NumericLiteralUnsigned],
299
- :DOUBLE_NEGATIVE => [:NumericLiteralNegative],
300
- :DOUBLE_POSITIVE => [:NumericLiteralPositive],
301
- :INTEGER => [:NumericLiteralUnsigned],
302
- :INTEGER_NEGATIVE => [:NumericLiteralNegative],
303
- :INTEGER_POSITIVE => [:NumericLiteralPositive],
304
- :IRI_REF => [],
305
- :PNAME_LN => [],
306
- :PNAME_NS => [],
307
- :STRING_LITERAL1 => [],
308
- :STRING_LITERAL2 => [],
309
- :STRING_LITERAL_LONG1 => [],
310
- :STRING_LITERAL_LONG2 => [],
311
- "true" => [],
312
- },
313
- :NumericLiteralNegative => {
314
- "(" => [],
315
- "," => [],
316
- "[" => [],
317
- "false" => [],
318
- :ANON => [],
319
- :BLANK_NODE_LABEL => [],
320
- :DECIMAL => [],
321
- :DECIMAL_NEGATIVE => [:DECIMAL_NEGATIVE],
322
- :DECIMAL_POSITIVE => [],
323
- :DOUBLE => [],
324
- :DOUBLE_NEGATIVE => [:DOUBLE_NEGATIVE],
325
- :DOUBLE_POSITIVE => [],
326
- :INTEGER => [],
327
- :INTEGER_NEGATIVE => [:INTEGER_NEGATIVE],
328
- :INTEGER_POSITIVE => [],
329
- :IRI_REF => [],
330
- :PNAME_LN => [],
331
- :PNAME_NS => [],
332
- :STRING_LITERAL1 => [],
333
- :STRING_LITERAL2 => [],
334
- :STRING_LITERAL_LONG1 => [],
335
- :STRING_LITERAL_LONG2 => [],
336
- "true" => [],
337
- },
338
- :NumericLiteralPositive => {
339
- "(" => [],
340
- "," => [],
341
- "[" => [],
342
- "false" => [],
343
- :ANON => [],
344
- :BLANK_NODE_LABEL => [],
345
- :DECIMAL => [],
346
- :DECIMAL_NEGATIVE => [],
347
- :DECIMAL_POSITIVE => [:DECIMAL_POSITIVE],
348
- :DOUBLE => [],
349
- :DOUBLE_NEGATIVE => [],
350
- :DOUBLE_POSITIVE => [:DOUBLE_POSITIVE],
351
- :INTEGER => [],
352
- :INTEGER_NEGATIVE => [],
353
- :INTEGER_POSITIVE => [:INTEGER_POSITIVE],
354
- :IRI_REF => [],
355
- :PNAME_LN => [],
356
- :PNAME_NS => [],
357
- :STRING_LITERAL1 => [],
358
- :STRING_LITERAL2 => [],
359
- :STRING_LITERAL_LONG1 => [],
360
- :STRING_LITERAL_LONG2 => [],
361
- "true" => [],
362
- },
363
- :NumericLiteralUnsigned => {
364
229
  "(" => [],
365
230
  "," => [],
366
231
  "[" => [],
@@ -368,26 +233,17 @@ module RDF::Turtle::Meta
368
233
  :ANON => [],
369
234
  :BLANK_NODE_LABEL => [],
370
235
  :DECIMAL => [:DECIMAL],
371
- :DECIMAL_NEGATIVE => [],
372
- :DECIMAL_POSITIVE => [],
373
236
  :DOUBLE => [:DOUBLE],
374
- :DOUBLE_NEGATIVE => [],
375
- :DOUBLE_POSITIVE => [],
376
237
  :INTEGER => [:INTEGER],
377
- :INTEGER_NEGATIVE => [],
378
- :INTEGER_POSITIVE => [],
379
- :IRI_REF => [],
238
+ :IRIREF => [],
380
239
  :PNAME_LN => [],
381
240
  :PNAME_NS => [],
382
- :STRING_LITERAL1 => [],
383
- :STRING_LITERAL2 => [],
384
- :STRING_LITERAL_LONG1 => [],
385
- :STRING_LITERAL_LONG2 => [],
241
+ :STRING_LITERAL_LONG_QUOTE => [],
242
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
243
+ :STRING_LITERAL_QUOTE => [],
244
+ :STRING_LITERAL_SINGLE_QUOTE => [],
386
245
  "true" => [],
387
246
  },
388
- :PREFIX => {
389
- "@prefix" => ["@prefix"],
390
- },
391
247
  :PrefixedName => {
392
248
  "(" => [],
393
249
  "," => [],
@@ -397,21 +253,15 @@ module RDF::Turtle::Meta
397
253
  :ANON => [],
398
254
  :BLANK_NODE_LABEL => [],
399
255
  :DECIMAL => [],
400
- :DECIMAL_NEGATIVE => [],
401
- :DECIMAL_POSITIVE => [],
402
256
  :DOUBLE => [],
403
- :DOUBLE_NEGATIVE => [],
404
- :DOUBLE_POSITIVE => [],
405
257
  :INTEGER => [],
406
- :INTEGER_NEGATIVE => [],
407
- :INTEGER_POSITIVE => [],
408
- :IRI_REF => [],
258
+ :IRIREF => [],
409
259
  :PNAME_LN => [:PNAME_LN],
410
260
  :PNAME_NS => [:PNAME_NS],
411
- :STRING_LITERAL1 => [],
412
- :STRING_LITERAL2 => [],
413
- :STRING_LITERAL_LONG1 => [],
414
- :STRING_LITERAL_LONG2 => [],
261
+ :STRING_LITERAL_LONG_QUOTE => [],
262
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
263
+ :STRING_LITERAL_QUOTE => [],
264
+ :STRING_LITERAL_SINGLE_QUOTE => [],
415
265
  "true" => [],
416
266
  },
417
267
  :RDFLiteral => {
@@ -422,58 +272,56 @@ module RDF::Turtle::Meta
422
272
  :ANON => [],
423
273
  :BLANK_NODE_LABEL => [],
424
274
  :DECIMAL => [],
425
- :DECIMAL_NEGATIVE => [],
426
- :DECIMAL_POSITIVE => [],
427
275
  :DOUBLE => [],
428
- :DOUBLE_NEGATIVE => [],
429
- :DOUBLE_POSITIVE => [],
430
276
  :INTEGER => [],
431
- :INTEGER_NEGATIVE => [],
432
- :INTEGER_POSITIVE => [],
433
- :IRI_REF => [],
277
+ :IRIREF => [],
434
278
  :PNAME_LN => [],
435
279
  :PNAME_NS => [],
436
- :STRING_LITERAL1 => [:String, :"_:_g7"],
437
- :STRING_LITERAL2 => [:String, :"_:_g7"],
438
- :STRING_LITERAL_LONG1 => [:String, :"_:_g7"],
439
- :STRING_LITERAL_LONG2 => [:String, :"_:_g7"],
280
+ :STRING_LITERAL_LONG_QUOTE => [:String, :"_:_g8"],
281
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [:String, :"_:_g8"],
282
+ :STRING_LITERAL_QUOTE => [:String, :"_:_g8"],
283
+ :STRING_LITERAL_SINGLE_QUOTE => [:String, :"_:_g8"],
440
284
  "true" => [],
441
285
  },
442
286
  :String => {
443
287
  "^^" => [],
444
288
  :LANGTAG => [],
445
- :STRING_LITERAL1 => [:STRING_LITERAL1],
446
- :STRING_LITERAL2 => [:STRING_LITERAL2],
447
- :STRING_LITERAL_LONG1 => [:STRING_LITERAL_LONG1],
448
- :STRING_LITERAL_LONG2 => [:STRING_LITERAL_LONG2],
289
+ :STRING_LITERAL_LONG_QUOTE => [:STRING_LITERAL_LONG_QUOTE],
290
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [:STRING_LITERAL_LONG_SINGLE_QUOTE],
291
+ :STRING_LITERAL_QUOTE => [:STRING_LITERAL_QUOTE],
292
+ :STRING_LITERAL_SINGLE_QUOTE => [:STRING_LITERAL_SINGLE_QUOTE],
449
293
  },
450
294
  :base => {
451
- "@base" => [:BASE, :IRI_REF],
295
+ "(" => [],
296
+ "@base" => ["@base", :IRIREF, "."],
297
+ "@prefix" => [],
298
+ "[" => [],
299
+ :ANON => [],
300
+ :BLANK_NODE_LABEL => [],
301
+ :IRIREF => [],
302
+ :PNAME_LN => [],
303
+ :PNAME_NS => [],
304
+ :SPARQL_BASE => [],
305
+ :SPARQL_PREFIX => [],
452
306
  },
453
307
  :blank => {
454
308
  "(" => [:collection],
455
309
  "," => [],
456
- "[" => [:blankNodePropertyList],
310
+ "[" => [],
457
311
  "a" => [],
458
312
  "false" => [],
459
313
  :ANON => [:BlankNode],
460
314
  :BLANK_NODE_LABEL => [:BlankNode],
461
315
  :DECIMAL => [],
462
- :DECIMAL_NEGATIVE => [],
463
- :DECIMAL_POSITIVE => [],
464
316
  :DOUBLE => [],
465
- :DOUBLE_NEGATIVE => [],
466
- :DOUBLE_POSITIVE => [],
467
317
  :INTEGER => [],
468
- :INTEGER_NEGATIVE => [],
469
- :INTEGER_POSITIVE => [],
470
- :IRI_REF => [],
318
+ :IRIREF => [],
471
319
  :PNAME_LN => [],
472
320
  :PNAME_NS => [],
473
- :STRING_LITERAL1 => [],
474
- :STRING_LITERAL2 => [],
475
- :STRING_LITERAL_LONG1 => [],
476
- :STRING_LITERAL_LONG2 => [],
321
+ :STRING_LITERAL_LONG_QUOTE => [],
322
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
323
+ :STRING_LITERAL_QUOTE => [],
324
+ :STRING_LITERAL_SINGLE_QUOTE => [],
477
325
  "true" => [],
478
326
  },
479
327
  :blankNodePropertyList => {
@@ -485,25 +333,19 @@ module RDF::Turtle::Meta
485
333
  :ANON => [],
486
334
  :BLANK_NODE_LABEL => [],
487
335
  :DECIMAL => [],
488
- :DECIMAL_NEGATIVE => [],
489
- :DECIMAL_POSITIVE => [],
490
336
  :DOUBLE => [],
491
- :DOUBLE_NEGATIVE => [],
492
- :DOUBLE_POSITIVE => [],
493
337
  :INTEGER => [],
494
- :INTEGER_NEGATIVE => [],
495
- :INTEGER_POSITIVE => [],
496
- :IRI_REF => [],
338
+ :IRIREF => [],
497
339
  :PNAME_LN => [],
498
340
  :PNAME_NS => [],
499
- :STRING_LITERAL1 => [],
500
- :STRING_LITERAL2 => [],
501
- :STRING_LITERAL_LONG1 => [],
502
- :STRING_LITERAL_LONG2 => [],
341
+ :STRING_LITERAL_LONG_QUOTE => [],
342
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
343
+ :STRING_LITERAL_QUOTE => [],
344
+ :STRING_LITERAL_SINGLE_QUOTE => [],
503
345
  "true" => [],
504
346
  },
505
347
  :collection => {
506
- "(" => ["(", :"_:_g6", ")"],
348
+ "(" => ["(", :"_:_g7", ")"],
507
349
  "," => [],
508
350
  "[" => [],
509
351
  "a" => [],
@@ -511,26 +353,49 @@ module RDF::Turtle::Meta
511
353
  :ANON => [],
512
354
  :BLANK_NODE_LABEL => [],
513
355
  :DECIMAL => [],
514
- :DECIMAL_NEGATIVE => [],
515
- :DECIMAL_POSITIVE => [],
516
356
  :DOUBLE => [],
517
- :DOUBLE_NEGATIVE => [],
518
- :DOUBLE_POSITIVE => [],
519
357
  :INTEGER => [],
520
- :INTEGER_NEGATIVE => [],
521
- :INTEGER_POSITIVE => [],
522
- :IRI_REF => [],
358
+ :IRIREF => [],
523
359
  :PNAME_LN => [],
524
360
  :PNAME_NS => [],
525
- :STRING_LITERAL1 => [],
526
- :STRING_LITERAL2 => [],
527
- :STRING_LITERAL_LONG1 => [],
528
- :STRING_LITERAL_LONG2 => [],
361
+ :STRING_LITERAL_LONG_QUOTE => [],
362
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
363
+ :STRING_LITERAL_QUOTE => [],
364
+ :STRING_LITERAL_SINGLE_QUOTE => [],
529
365
  "true" => [],
530
366
  },
531
367
  :directive => {
368
+ "(" => [],
532
369
  "@base" => [:base],
533
370
  "@prefix" => [:prefixID],
371
+ "[" => [],
372
+ :ANON => [],
373
+ :BLANK_NODE_LABEL => [],
374
+ :IRIREF => [],
375
+ :PNAME_LN => [],
376
+ :PNAME_NS => [],
377
+ :SPARQL_BASE => [:sparqlBase],
378
+ :SPARQL_PREFIX => [:sparqlPrefix],
379
+ },
380
+ :iri => {
381
+ "(" => [],
382
+ "," => [],
383
+ "[" => [],
384
+ "a" => [],
385
+ "false" => [],
386
+ :ANON => [],
387
+ :BLANK_NODE_LABEL => [],
388
+ :DECIMAL => [],
389
+ :DOUBLE => [],
390
+ :INTEGER => [],
391
+ :IRIREF => [:IRIREF],
392
+ :PNAME_LN => [:PrefixedName],
393
+ :PNAME_NS => [:PrefixedName],
394
+ :STRING_LITERAL_LONG_QUOTE => [],
395
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
396
+ :STRING_LITERAL_QUOTE => [],
397
+ :STRING_LITERAL_SINGLE_QUOTE => [],
398
+ "true" => [],
534
399
  },
535
400
  :literal => {
536
401
  "(" => [],
@@ -540,72 +405,54 @@ module RDF::Turtle::Meta
540
405
  :ANON => [],
541
406
  :BLANK_NODE_LABEL => [],
542
407
  :DECIMAL => [:NumericLiteral],
543
- :DECIMAL_NEGATIVE => [:NumericLiteral],
544
- :DECIMAL_POSITIVE => [:NumericLiteral],
545
408
  :DOUBLE => [:NumericLiteral],
546
- :DOUBLE_NEGATIVE => [:NumericLiteral],
547
- :DOUBLE_POSITIVE => [:NumericLiteral],
548
409
  :INTEGER => [:NumericLiteral],
549
- :INTEGER_NEGATIVE => [:NumericLiteral],
550
- :INTEGER_POSITIVE => [:NumericLiteral],
551
- :IRI_REF => [],
410
+ :IRIREF => [],
552
411
  :PNAME_LN => [],
553
412
  :PNAME_NS => [],
554
- :STRING_LITERAL1 => [:RDFLiteral],
555
- :STRING_LITERAL2 => [:RDFLiteral],
556
- :STRING_LITERAL_LONG1 => [:RDFLiteral],
557
- :STRING_LITERAL_LONG2 => [:RDFLiteral],
413
+ :STRING_LITERAL_LONG_QUOTE => [:RDFLiteral],
414
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [:RDFLiteral],
415
+ :STRING_LITERAL_QUOTE => [:RDFLiteral],
416
+ :STRING_LITERAL_SINGLE_QUOTE => [:RDFLiteral],
558
417
  "true" => [:BooleanLiteral],
559
418
  },
560
419
  :object => {
561
420
  "(" => [:blank],
562
421
  "," => [],
563
- "[" => [:blank],
422
+ "[" => [:blankNodePropertyList],
564
423
  "false" => [:literal],
565
424
  :ANON => [:blank],
566
425
  :BLANK_NODE_LABEL => [:blank],
567
426
  :DECIMAL => [:literal],
568
- :DECIMAL_NEGATIVE => [:literal],
569
- :DECIMAL_POSITIVE => [:literal],
570
427
  :DOUBLE => [:literal],
571
- :DOUBLE_NEGATIVE => [:literal],
572
- :DOUBLE_POSITIVE => [:literal],
573
428
  :INTEGER => [:literal],
574
- :INTEGER_NEGATIVE => [:literal],
575
- :INTEGER_POSITIVE => [:literal],
576
- :IRI_REF => [:IRIref],
577
- :PNAME_LN => [:IRIref],
578
- :PNAME_NS => [:IRIref],
579
- :STRING_LITERAL1 => [:literal],
580
- :STRING_LITERAL2 => [:literal],
581
- :STRING_LITERAL_LONG1 => [:literal],
582
- :STRING_LITERAL_LONG2 => [:literal],
429
+ :IRIREF => [:iri],
430
+ :PNAME_LN => [:iri],
431
+ :PNAME_NS => [:iri],
432
+ :STRING_LITERAL_LONG_QUOTE => [:literal],
433
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [:literal],
434
+ :STRING_LITERAL_QUOTE => [:literal],
435
+ :STRING_LITERAL_SINGLE_QUOTE => [:literal],
583
436
  "true" => [:literal],
584
437
  },
585
438
  :objectList => {
586
- "(" => [:object, :"_:_g4"],
439
+ "(" => [:object, :"_:_g5"],
587
440
  ";" => [],
588
- "[" => [:object, :"_:_g4"],
589
- "false" => [:object, :"_:_g4"],
590
- :ANON => [:object, :"_:_g4"],
591
- :BLANK_NODE_LABEL => [:object, :"_:_g4"],
592
- :DECIMAL => [:object, :"_:_g4"],
593
- :DECIMAL_NEGATIVE => [:object, :"_:_g4"],
594
- :DECIMAL_POSITIVE => [:object, :"_:_g4"],
595
- :DOUBLE => [:object, :"_:_g4"],
596
- :DOUBLE_NEGATIVE => [:object, :"_:_g4"],
597
- :DOUBLE_POSITIVE => [:object, :"_:_g4"],
598
- :INTEGER => [:object, :"_:_g4"],
599
- :INTEGER_NEGATIVE => [:object, :"_:_g4"],
600
- :INTEGER_POSITIVE => [:object, :"_:_g4"],
601
- :IRI_REF => [:object, :"_:_g4"],
602
- :PNAME_LN => [:object, :"_:_g4"],
603
- :PNAME_NS => [:object, :"_:_g4"],
604
- :STRING_LITERAL1 => [:object, :"_:_g4"],
605
- :STRING_LITERAL2 => [:object, :"_:_g4"],
606
- :STRING_LITERAL_LONG1 => [:object, :"_:_g4"],
607
- :STRING_LITERAL_LONG2 => [:object, :"_:_g4"],
608
- "true" => [:object, :"_:_g4"],
441
+ "[" => [:object, :"_:_g5"],
442
+ "false" => [:object, :"_:_g5"],
443
+ :ANON => [:object, :"_:_g5"],
444
+ :BLANK_NODE_LABEL => [:object, :"_:_g5"],
445
+ :DECIMAL => [:object, :"_:_g5"],
446
+ :DOUBLE => [:object, :"_:_g5"],
447
+ :INTEGER => [:object, :"_:_g5"],
448
+ :IRIREF => [:object, :"_:_g5"],
449
+ :PNAME_LN => [:object, :"_:_g5"],
450
+ :PNAME_NS => [:object, :"_:_g5"],
451
+ :STRING_LITERAL_LONG_QUOTE => [:object, :"_:_g5"],
452
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [:object, :"_:_g5"],
453
+ :STRING_LITERAL_QUOTE => [:object, :"_:_g5"],
454
+ :STRING_LITERAL_SINGLE_QUOTE => [:object, :"_:_g5"],
455
+ "true" => [:object, :"_:_g5"],
609
456
  },
610
457
  :predicate => {
611
458
  "(" => [],
@@ -614,74 +461,107 @@ module RDF::Turtle::Meta
614
461
  :ANON => [],
615
462
  :BLANK_NODE_LABEL => [],
616
463
  :DECIMAL => [],
617
- :DECIMAL_NEGATIVE => [],
618
- :DECIMAL_POSITIVE => [],
619
464
  :DOUBLE => [],
620
- :DOUBLE_NEGATIVE => [],
621
- :DOUBLE_POSITIVE => [],
622
465
  :INTEGER => [],
623
- :INTEGER_NEGATIVE => [],
624
- :INTEGER_POSITIVE => [],
625
- :IRI_REF => [:IRIref],
626
- :PNAME_LN => [:IRIref],
627
- :PNAME_NS => [:IRIref],
628
- :STRING_LITERAL1 => [],
629
- :STRING_LITERAL2 => [],
630
- :STRING_LITERAL_LONG1 => [],
631
- :STRING_LITERAL_LONG2 => [],
466
+ :IRIREF => [:iri],
467
+ :PNAME_LN => [:iri],
468
+ :PNAME_NS => [:iri],
469
+ :STRING_LITERAL_LONG_QUOTE => [],
470
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
471
+ :STRING_LITERAL_QUOTE => [],
472
+ :STRING_LITERAL_SINGLE_QUOTE => [],
632
473
  "true" => [],
633
474
  },
634
475
  :predicateObjectList => {
635
- "a" => [:verb, :objectList, :"_:_g0"],
636
- :IRI_REF => [:verb, :objectList, :"_:_g0"],
637
- :PNAME_LN => [:verb, :objectList, :"_:_g0"],
638
- :PNAME_NS => [:verb, :objectList, :"_:_g0"],
476
+ "a" => [:verb, :objectList, :"_:_g1"],
477
+ :IRIREF => [:verb, :objectList, :"_:_g1"],
478
+ :PNAME_LN => [:verb, :objectList, :"_:_g1"],
479
+ :PNAME_NS => [:verb, :objectList, :"_:_g1"],
639
480
  },
640
481
  :prefixID => {
641
- "@prefix" => [:PREFIX, :PNAME_NS, :IRI_REF],
482
+ "(" => [],
483
+ "@base" => [],
484
+ "@prefix" => ["@prefix", :PNAME_NS, :IRIREF, "."],
485
+ "[" => [],
486
+ :ANON => [],
487
+ :BLANK_NODE_LABEL => [],
488
+ :IRIREF => [],
489
+ :PNAME_LN => [],
490
+ :PNAME_NS => [],
491
+ :SPARQL_BASE => [],
492
+ :SPARQL_PREFIX => [],
493
+ },
494
+ :sparqlBase => {
495
+ "(" => [],
496
+ "@base" => [],
497
+ "@prefix" => [],
498
+ "[" => [],
499
+ :ANON => [],
500
+ :BLANK_NODE_LABEL => [],
501
+ :IRIREF => [],
502
+ :PNAME_LN => [],
503
+ :PNAME_NS => [],
504
+ :SPARQL_BASE => [:SPARQL_BASE, :IRIREF],
505
+ :SPARQL_PREFIX => [],
506
+ },
507
+ :sparqlPrefix => {
508
+ "(" => [],
509
+ "@base" => [],
510
+ "@prefix" => [],
511
+ "[" => [],
512
+ :ANON => [],
513
+ :BLANK_NODE_LABEL => [],
514
+ :IRIREF => [],
515
+ :PNAME_LN => [],
516
+ :PNAME_NS => [],
517
+ :SPARQL_BASE => [],
518
+ :SPARQL_PREFIX => [:SPARQL_PREFIX, :PNAME_NS, :IRIREF],
642
519
  },
643
520
  :statement => {
644
- "(" => [:"_:g2152809700"],
645
- "@base" => [:"_:g2153010700"],
646
- "@prefix" => [:"_:g2153010700"],
647
- "[" => [:"_:g2152809700"],
648
- :ANON => [:"_:g2152809700"],
649
- :BLANK_NODE_LABEL => [:"_:g2152809700"],
650
- :IRI_REF => [:"_:g2152809700"],
651
- :PNAME_LN => [:"_:g2152809700"],
652
- :PNAME_NS => [:"_:g2152809700"],
521
+ "(" => [:"_:g70259512113780"],
522
+ "@base" => [:directive],
523
+ "@prefix" => [:directive],
524
+ "[" => [:"_:g70259512113780"],
525
+ :ANON => [:"_:g70259512113780"],
526
+ :BLANK_NODE_LABEL => [:"_:g70259512113780"],
527
+ :IRIREF => [:"_:g70259512113780"],
528
+ :PNAME_LN => [:"_:g70259512113780"],
529
+ :PNAME_NS => [:"_:g70259512113780"],
530
+ :SPARQL_BASE => [:directive],
531
+ :SPARQL_PREFIX => [:directive],
653
532
  },
654
533
  :subject => {
655
534
  "(" => [:blank],
656
- "[" => [:blank],
657
535
  "a" => [],
658
536
  :ANON => [:blank],
659
537
  :BLANK_NODE_LABEL => [:blank],
660
- :IRI_REF => [:IRIref],
661
- :PNAME_LN => [:IRIref],
662
- :PNAME_NS => [:IRIref],
538
+ :IRIREF => [:iri],
539
+ :PNAME_LN => [:iri],
540
+ :PNAME_NS => [:iri],
663
541
  },
664
542
  :triples => {
665
- "(" => [:subject, :predicateObjectList],
666
- "[" => [:subject, :predicateObjectList],
667
- :ANON => [:subject, :predicateObjectList],
668
- :BLANK_NODE_LABEL => [:subject, :predicateObjectList],
669
- :IRI_REF => [:subject, :predicateObjectList],
670
- :PNAME_LN => [:subject, :predicateObjectList],
671
- :PNAME_NS => [:subject, :predicateObjectList],
543
+ "(" => [:"_:g70259508693960"],
544
+ "[" => [:"_:g70259508445120"],
545
+ :ANON => [:"_:g70259508693960"],
546
+ :BLANK_NODE_LABEL => [:"_:g70259508693960"],
547
+ :IRIREF => [:"_:g70259508693960"],
548
+ :PNAME_LN => [:"_:g70259508693960"],
549
+ :PNAME_NS => [:"_:g70259508693960"],
672
550
  },
673
551
  :turtleDoc => {
674
- "(" => [:"_:g2165682600"],
675
- "@base" => [:"_:g2165682600"],
676
- "@prefix" => [:"_:g2165682600"],
677
- "[" => [:"_:g2165682600"],
552
+ "(" => [:"_:g70259512513580"],
553
+ "@base" => [:"_:g70259512513580"],
554
+ "@prefix" => [:"_:g70259512513580"],
555
+ "[" => [:"_:g70259512513580"],
678
556
  :"ebnf:empty" => [],
679
557
  :"ebnf:eof" => [],
680
- :ANON => [:"_:g2165682600"],
681
- :BLANK_NODE_LABEL => [:"_:g2165682600"],
682
- :IRI_REF => [:"_:g2165682600"],
683
- :PNAME_LN => [:"_:g2165682600"],
684
- :PNAME_NS => [:"_:g2165682600"],
558
+ :ANON => [:"_:g70259512513580"],
559
+ :BLANK_NODE_LABEL => [:"_:g70259512513580"],
560
+ :IRIREF => [:"_:g70259512513580"],
561
+ :PNAME_LN => [:"_:g70259512513580"],
562
+ :PNAME_NS => [:"_:g70259512513580"],
563
+ :SPARQL_BASE => [:"_:g70259512513580"],
564
+ :SPARQL_PREFIX => [:"_:g70259512513580"],
685
565
  },
686
566
  :verb => {
687
567
  "(" => [],
@@ -691,21 +571,15 @@ module RDF::Turtle::Meta
691
571
  :ANON => [],
692
572
  :BLANK_NODE_LABEL => [],
693
573
  :DECIMAL => [],
694
- :DECIMAL_NEGATIVE => [],
695
- :DECIMAL_POSITIVE => [],
696
574
  :DOUBLE => [],
697
- :DOUBLE_NEGATIVE => [],
698
- :DOUBLE_POSITIVE => [],
699
575
  :INTEGER => [],
700
- :INTEGER_NEGATIVE => [],
701
- :INTEGER_POSITIVE => [],
702
- :IRI_REF => [:predicate],
576
+ :IRIREF => [:predicate],
703
577
  :PNAME_LN => [:predicate],
704
578
  :PNAME_NS => [:predicate],
705
- :STRING_LITERAL1 => [],
706
- :STRING_LITERAL2 => [],
707
- :STRING_LITERAL_LONG1 => [],
708
- :STRING_LITERAL_LONG2 => [],
579
+ :STRING_LITERAL_LONG_QUOTE => [],
580
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [],
581
+ :STRING_LITERAL_QUOTE => [],
582
+ :STRING_LITERAL_SINGLE_QUOTE => [],
709
583
  "true" => [],
710
584
  },
711
585
  }.freeze
@@ -725,44 +599,45 @@ module RDF::Turtle::Meta
725
599
  :ANON,
726
600
  :BLANK_NODE_LABEL,
727
601
  :DECIMAL,
728
- :DECIMAL_NEGATIVE,
729
- :DECIMAL_POSITIVE,
730
602
  :DOUBLE,
731
- :DOUBLE_NEGATIVE,
732
- :DOUBLE_POSITIVE,
733
603
  :INTEGER,
734
- :INTEGER_NEGATIVE,
735
- :INTEGER_POSITIVE,
736
- :IRI_REF,
604
+ :IRIREF,
737
605
  :LANGTAG,
738
606
  :PNAME_LN,
739
607
  :PNAME_NS,
740
- :STRING_LITERAL1,
741
- :STRING_LITERAL2,
742
- :STRING_LITERAL_LONG1,
743
- :STRING_LITERAL_LONG2,
608
+ :SPARQL_BASE,
609
+ :SPARQL_PREFIX,
610
+ :STRING_LITERAL_LONG_QUOTE,
611
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
612
+ :STRING_LITERAL_QUOTE,
613
+ :STRING_LITERAL_SINGLE_QUOTE,
744
614
  "true"
745
615
  ].freeze
746
616
  FIRST = {
747
617
  :"_:_g0" => [
748
- ";"],
618
+ "a",
619
+ :IRIREF,
620
+ :PNAME_LN,
621
+ :PNAME_NS],
749
622
  :"_:_g1" => [
750
623
  ";"],
751
624
  :"_:_g2" => [
625
+ ";"],
626
+ :"_:_g3" => [
752
627
  "a",
753
- :IRI_REF,
628
+ :IRIREF,
754
629
  :PNAME_LN,
755
630
  :PNAME_NS],
756
- :"_:_g3" => [
631
+ :"_:_g4" => [
757
632
  "a",
758
- :IRI_REF,
633
+ :IRIREF,
759
634
  :PNAME_LN,
760
635
  :PNAME_NS],
761
- :"_:_g4" => [
762
- ","],
763
636
  :"_:_g5" => [
764
637
  ","],
765
638
  :"_:_g6" => [
639
+ ","],
640
+ :"_:_g7" => [
766
641
  "(",
767
642
  "[",
768
643
  "false",
@@ -770,69 +645,49 @@ module RDF::Turtle::Meta
770
645
  :ANON,
771
646
  :BLANK_NODE_LABEL,
772
647
  :DECIMAL,
773
- :DECIMAL_NEGATIVE,
774
- :DECIMAL_POSITIVE,
775
648
  :DOUBLE,
776
- :DOUBLE_NEGATIVE,
777
- :DOUBLE_POSITIVE,
778
649
  :INTEGER,
779
- :INTEGER_NEGATIVE,
780
- :INTEGER_POSITIVE,
781
- :IRI_REF,
650
+ :IRIREF,
782
651
  :PNAME_LN,
783
652
  :PNAME_NS,
784
- :STRING_LITERAL1,
785
- :STRING_LITERAL2,
786
- :STRING_LITERAL_LONG1,
787
- :STRING_LITERAL_LONG2],
788
- :"_:_g7" => [
653
+ :STRING_LITERAL_LONG_QUOTE,
654
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
655
+ :STRING_LITERAL_QUOTE,
656
+ :STRING_LITERAL_SINGLE_QUOTE],
657
+ :"_:_g8" => [
789
658
  "^^",
790
659
  :LANGTAG],
791
- :"_:_g8" => [
660
+ :"_:_g9" => [
792
661
  "^^",
793
662
  :LANGTAG],
794
- :"_:g2152346260" => [
795
- "a",
796
- :IRI_REF,
797
- :PNAME_LN,
798
- :PNAME_NS],
799
- :"_:g2152446700" => [
663
+ :"_:g70259508445120" => [
664
+ "["],
665
+ :"_:g70259508546080" => [
666
+ ";"],
667
+ :"_:g70259508693960" => [
800
668
  "(",
801
- "[",
802
- "false",
803
- "true",
804
669
  :ANON,
805
670
  :BLANK_NODE_LABEL,
806
- :DECIMAL,
807
- :DECIMAL_NEGATIVE,
808
- :DECIMAL_POSITIVE,
809
- :DOUBLE,
810
- :DOUBLE_NEGATIVE,
811
- :DOUBLE_POSITIVE,
812
- :INTEGER,
813
- :INTEGER_NEGATIVE,
814
- :INTEGER_POSITIVE,
815
- :IRI_REF,
816
- :PNAME_LN,
817
- :PNAME_NS,
818
- :STRING_LITERAL1,
819
- :STRING_LITERAL2,
820
- :STRING_LITERAL_LONG1,
821
- :STRING_LITERAL_LONG2],
822
- :"_:g2152796420" => [
823
- "a",
824
- :IRI_REF,
671
+ :IRIREF,
825
672
  :PNAME_LN,
826
673
  :PNAME_NS],
827
- :"_:g2152809700" => [
674
+ :"_:g70259508899400" => [
675
+ ";"],
676
+ :"_:g70259509060380" => [
828
677
  "(",
678
+ "@base",
679
+ "@prefix",
829
680
  "[",
830
681
  :ANON,
831
682
  :BLANK_NODE_LABEL,
832
- :IRI_REF,
683
+ :IRIREF,
833
684
  :PNAME_LN,
834
- :PNAME_NS],
835
- :"_:g2152877000" => [
685
+ :PNAME_NS,
686
+ :SPARQL_BASE,
687
+ :SPARQL_PREFIX],
688
+ :"_:g70259509587660" => [
689
+ ","],
690
+ :"_:g70259509658260" => [
836
691
  "(",
837
692
  "[",
838
693
  "false",
@@ -840,22 +695,21 @@ module RDF::Turtle::Meta
840
695
  :ANON,
841
696
  :BLANK_NODE_LABEL,
842
697
  :DECIMAL,
843
- :DECIMAL_NEGATIVE,
844
- :DECIMAL_POSITIVE,
845
698
  :DOUBLE,
846
- :DOUBLE_NEGATIVE,
847
- :DOUBLE_POSITIVE,
848
699
  :INTEGER,
849
- :INTEGER_NEGATIVE,
850
- :INTEGER_POSITIVE,
851
- :IRI_REF,
700
+ :IRIREF,
852
701
  :PNAME_LN,
853
702
  :PNAME_NS,
854
- :STRING_LITERAL1,
855
- :STRING_LITERAL2,
856
- :STRING_LITERAL_LONG1,
857
- :STRING_LITERAL_LONG2],
858
- :"_:g2152903680" => [
703
+ :STRING_LITERAL_LONG_QUOTE,
704
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
705
+ :STRING_LITERAL_QUOTE,
706
+ :STRING_LITERAL_SINGLE_QUOTE],
707
+ :"_:g70259509936360" => [
708
+ "a",
709
+ :IRIREF,
710
+ :PNAME_LN,
711
+ :PNAME_NS],
712
+ :"_:g70259510108740" => [
859
713
  "(",
860
714
  "[",
861
715
  "false",
@@ -863,25 +717,24 @@ module RDF::Turtle::Meta
863
717
  :ANON,
864
718
  :BLANK_NODE_LABEL,
865
719
  :DECIMAL,
866
- :DECIMAL_NEGATIVE,
867
- :DECIMAL_POSITIVE,
868
720
  :DOUBLE,
869
- :DOUBLE_NEGATIVE,
870
- :DOUBLE_POSITIVE,
871
721
  :INTEGER,
872
- :INTEGER_NEGATIVE,
873
- :INTEGER_POSITIVE,
874
- :IRI_REF,
722
+ :IRIREF,
875
723
  :PNAME_LN,
876
724
  :PNAME_NS,
877
- :STRING_LITERAL1,
878
- :STRING_LITERAL2,
879
- :STRING_LITERAL_LONG1,
880
- :STRING_LITERAL_LONG2],
881
- :"_:g2153010700" => [
882
- "@base",
883
- "@prefix"],
884
- :"_:g2153124700" => [
725
+ :STRING_LITERAL_LONG_QUOTE,
726
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
727
+ :STRING_LITERAL_QUOTE,
728
+ :STRING_LITERAL_SINGLE_QUOTE],
729
+ :"_:g70259510114160" => [
730
+ "a",
731
+ :IRIREF,
732
+ :PNAME_LN,
733
+ :PNAME_NS],
734
+ :"_:g70259510300060" => [
735
+ "^^",
736
+ :LANGTAG],
737
+ :"_:g70259511991280" => [
885
738
  "(",
886
739
  "[",
887
740
  "false",
@@ -889,59 +742,37 @@ module RDF::Turtle::Meta
889
742
  :ANON,
890
743
  :BLANK_NODE_LABEL,
891
744
  :DECIMAL,
892
- :DECIMAL_NEGATIVE,
893
- :DECIMAL_POSITIVE,
894
745
  :DOUBLE,
895
- :DOUBLE_NEGATIVE,
896
- :DOUBLE_POSITIVE,
897
746
  :INTEGER,
898
- :INTEGER_NEGATIVE,
899
- :INTEGER_POSITIVE,
900
- :IRI_REF,
747
+ :IRIREF,
901
748
  :PNAME_LN,
902
749
  :PNAME_NS,
903
- :STRING_LITERAL1,
904
- :STRING_LITERAL2,
905
- :STRING_LITERAL_LONG1,
906
- :STRING_LITERAL_LONG2],
907
- :"_:g2153337920" => [
908
- ","],
909
- :"_:g2153346700" => [
910
- "a",
911
- :IRI_REF,
750
+ :STRING_LITERAL_LONG_QUOTE,
751
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
752
+ :STRING_LITERAL_QUOTE,
753
+ :STRING_LITERAL_SINGLE_QUOTE],
754
+ :"_:g70259512088480" => [
755
+ :IRIREF,
912
756
  :PNAME_LN,
913
757
  :PNAME_NS],
914
- :"_:g2153658980" => [
758
+ :"_:g70259512113780" => [
915
759
  "(",
916
760
  "[",
917
- "false",
918
- "true",
919
761
  :ANON,
920
762
  :BLANK_NODE_LABEL,
921
- :DECIMAL,
922
- :DECIMAL_NEGATIVE,
923
- :DECIMAL_POSITIVE,
924
- :DOUBLE,
925
- :DOUBLE_NEGATIVE,
926
- :DOUBLE_POSITIVE,
927
- :INTEGER,
928
- :INTEGER_NEGATIVE,
929
- :INTEGER_POSITIVE,
930
- :IRI_REF,
763
+ :IRIREF,
931
764
  :PNAME_LN,
932
- :PNAME_NS,
933
- :STRING_LITERAL1,
934
- :STRING_LITERAL2,
935
- :STRING_LITERAL_LONG1,
936
- :STRING_LITERAL_LONG2],
937
- :"_:g2156398800" => [
938
- :IRI_REF,
765
+ :PNAME_NS],
766
+ :"_:g70259512224200" => [
767
+ "a",
768
+ :IRIREF,
939
769
  :PNAME_LN,
940
770
  :PNAME_NS],
941
- :"_:g2156472020" => [
942
- "^^",
943
- :LANGTAG],
944
- :"_:g2156771960" => [
771
+ :"_:g70259512229140" => [
772
+ ","],
773
+ :"_:g70259512303120" => [
774
+ "^^"],
775
+ :"_:g70259512433500" => [
945
776
  "(",
946
777
  "[",
947
778
  "false",
@@ -949,103 +780,93 @@ module RDF::Turtle::Meta
949
780
  :ANON,
950
781
  :BLANK_NODE_LABEL,
951
782
  :DECIMAL,
952
- :DECIMAL_NEGATIVE,
953
- :DECIMAL_POSITIVE,
954
783
  :DOUBLE,
955
- :DOUBLE_NEGATIVE,
956
- :DOUBLE_POSITIVE,
957
784
  :INTEGER,
958
- :INTEGER_NEGATIVE,
959
- :INTEGER_POSITIVE,
960
- :IRI_REF,
785
+ :IRIREF,
961
786
  :PNAME_LN,
962
787
  :PNAME_NS,
963
- :STRING_LITERAL1,
964
- :STRING_LITERAL2,
965
- :STRING_LITERAL_LONG1,
966
- :STRING_LITERAL_LONG2],
967
- :"_:g2156954680" => [
968
- ";"],
969
- :"_:g2164414260" => [
970
- ","],
971
- :"_:g2164800240" => [
972
- ";"],
973
- :"_:g2165021300" => [
788
+ :STRING_LITERAL_LONG_QUOTE,
789
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
790
+ :STRING_LITERAL_QUOTE,
791
+ :STRING_LITERAL_SINGLE_QUOTE],
792
+ :"_:g70259512513580" => [
974
793
  "(",
975
794
  "@base",
976
795
  "@prefix",
977
796
  "[",
978
797
  :ANON,
979
798
  :BLANK_NODE_LABEL,
980
- :IRI_REF,
799
+ :IRIREF,
981
800
  :PNAME_LN,
982
- :PNAME_NS],
983
- :"_:g2165682600" => [
801
+ :PNAME_NS,
802
+ :SPARQL_BASE,
803
+ :SPARQL_PREFIX],
804
+ :"_:g70259512530480" => [
984
805
  "(",
985
- "@base",
986
- "@prefix",
987
806
  "[",
807
+ "false",
808
+ "true",
988
809
  :ANON,
989
810
  :BLANK_NODE_LABEL,
990
- :IRI_REF,
811
+ :DECIMAL,
812
+ :DOUBLE,
813
+ :INTEGER,
814
+ :IRIREF,
815
+ :PNAME_LN,
816
+ :PNAME_NS,
817
+ :STRING_LITERAL_LONG_QUOTE,
818
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
819
+ :STRING_LITERAL_QUOTE,
820
+ :STRING_LITERAL_SINGLE_QUOTE],
821
+ :"_:g70259512737100" => [
822
+ "a",
823
+ :IRIREF,
991
824
  :PNAME_LN,
992
825
  :PNAME_NS],
993
- :"_:g2165812760" => [
994
- "^^"],
995
- :BASE => [
996
- "@base"],
826
+ :"_:g70259512859620" => [
827
+ "(",
828
+ "[",
829
+ "false",
830
+ "true",
831
+ :ANON,
832
+ :BLANK_NODE_LABEL,
833
+ :DECIMAL,
834
+ :DOUBLE,
835
+ :INTEGER,
836
+ :IRIREF,
837
+ :PNAME_LN,
838
+ :PNAME_NS,
839
+ :STRING_LITERAL_LONG_QUOTE,
840
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
841
+ :STRING_LITERAL_QUOTE,
842
+ :STRING_LITERAL_SINGLE_QUOTE],
997
843
  :BlankNode => [
998
844
  :ANON,
999
845
  :BLANK_NODE_LABEL],
1000
846
  :BooleanLiteral => [
1001
847
  "false",
1002
848
  "true"],
1003
- :IRIref => [
1004
- :IRI_REF,
1005
- :PNAME_LN,
1006
- :PNAME_NS],
1007
849
  :NumericLiteral => [
1008
- :DECIMAL,
1009
- :DECIMAL_NEGATIVE,
1010
- :DECIMAL_POSITIVE,
1011
- :DOUBLE,
1012
- :DOUBLE_NEGATIVE,
1013
- :DOUBLE_POSITIVE,
1014
- :INTEGER,
1015
- :INTEGER_NEGATIVE,
1016
- :INTEGER_POSITIVE],
1017
- :NumericLiteralNegative => [
1018
- :DECIMAL_NEGATIVE,
1019
- :DOUBLE_NEGATIVE,
1020
- :INTEGER_NEGATIVE],
1021
- :NumericLiteralPositive => [
1022
- :DECIMAL_POSITIVE,
1023
- :DOUBLE_POSITIVE,
1024
- :INTEGER_POSITIVE],
1025
- :NumericLiteralUnsigned => [
1026
850
  :DECIMAL,
1027
851
  :DOUBLE,
1028
852
  :INTEGER],
1029
- :PREFIX => [
1030
- "@prefix"],
1031
853
  :PrefixedName => [
1032
854
  :PNAME_LN,
1033
855
  :PNAME_NS],
1034
856
  :RDFLiteral => [
1035
- :STRING_LITERAL1,
1036
- :STRING_LITERAL2,
1037
- :STRING_LITERAL_LONG1,
1038
- :STRING_LITERAL_LONG2],
857
+ :STRING_LITERAL_LONG_QUOTE,
858
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
859
+ :STRING_LITERAL_QUOTE,
860
+ :STRING_LITERAL_SINGLE_QUOTE],
1039
861
  :String => [
1040
- :STRING_LITERAL1,
1041
- :STRING_LITERAL2,
1042
- :STRING_LITERAL_LONG1,
1043
- :STRING_LITERAL_LONG2],
862
+ :STRING_LITERAL_LONG_QUOTE,
863
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
864
+ :STRING_LITERAL_QUOTE,
865
+ :STRING_LITERAL_SINGLE_QUOTE],
1044
866
  :base => [
1045
867
  "@base"],
1046
868
  :blank => [
1047
869
  "(",
1048
- "[",
1049
870
  :ANON,
1050
871
  :BLANK_NODE_LABEL],
1051
872
  :blankNodePropertyList => [
@@ -1054,23 +875,23 @@ module RDF::Turtle::Meta
1054
875
  "("],
1055
876
  :directive => [
1056
877
  "@base",
1057
- "@prefix"],
878
+ "@prefix",
879
+ :SPARQL_BASE,
880
+ :SPARQL_PREFIX],
881
+ :iri => [
882
+ :IRIREF,
883
+ :PNAME_LN,
884
+ :PNAME_NS],
1058
885
  :literal => [
1059
886
  "false",
1060
887
  "true",
1061
888
  :DECIMAL,
1062
- :DECIMAL_NEGATIVE,
1063
- :DECIMAL_POSITIVE,
1064
889
  :DOUBLE,
1065
- :DOUBLE_NEGATIVE,
1066
- :DOUBLE_POSITIVE,
1067
890
  :INTEGER,
1068
- :INTEGER_NEGATIVE,
1069
- :INTEGER_POSITIVE,
1070
- :STRING_LITERAL1,
1071
- :STRING_LITERAL2,
1072
- :STRING_LITERAL_LONG1,
1073
- :STRING_LITERAL_LONG2],
891
+ :STRING_LITERAL_LONG_QUOTE,
892
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
893
+ :STRING_LITERAL_QUOTE,
894
+ :STRING_LITERAL_SINGLE_QUOTE],
1074
895
  :object => [
1075
896
  "(",
1076
897
  "[",
@@ -1079,21 +900,15 @@ module RDF::Turtle::Meta
1079
900
  :ANON,
1080
901
  :BLANK_NODE_LABEL,
1081
902
  :DECIMAL,
1082
- :DECIMAL_NEGATIVE,
1083
- :DECIMAL_POSITIVE,
1084
903
  :DOUBLE,
1085
- :DOUBLE_NEGATIVE,
1086
- :DOUBLE_POSITIVE,
1087
904
  :INTEGER,
1088
- :INTEGER_NEGATIVE,
1089
- :INTEGER_POSITIVE,
1090
- :IRI_REF,
905
+ :IRIREF,
1091
906
  :PNAME_LN,
1092
907
  :PNAME_NS,
1093
- :STRING_LITERAL1,
1094
- :STRING_LITERAL2,
1095
- :STRING_LITERAL_LONG1,
1096
- :STRING_LITERAL_LONG2],
908
+ :STRING_LITERAL_LONG_QUOTE,
909
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
910
+ :STRING_LITERAL_QUOTE,
911
+ :STRING_LITERAL_SINGLE_QUOTE],
1097
912
  :objectList => [
1098
913
  "(",
1099
914
  "[",
@@ -1102,32 +917,30 @@ module RDF::Turtle::Meta
1102
917
  :ANON,
1103
918
  :BLANK_NODE_LABEL,
1104
919
  :DECIMAL,
1105
- :DECIMAL_NEGATIVE,
1106
- :DECIMAL_POSITIVE,
1107
920
  :DOUBLE,
1108
- :DOUBLE_NEGATIVE,
1109
- :DOUBLE_POSITIVE,
1110
921
  :INTEGER,
1111
- :INTEGER_NEGATIVE,
1112
- :INTEGER_POSITIVE,
1113
- :IRI_REF,
922
+ :IRIREF,
1114
923
  :PNAME_LN,
1115
924
  :PNAME_NS,
1116
- :STRING_LITERAL1,
1117
- :STRING_LITERAL2,
1118
- :STRING_LITERAL_LONG1,
1119
- :STRING_LITERAL_LONG2],
925
+ :STRING_LITERAL_LONG_QUOTE,
926
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
927
+ :STRING_LITERAL_QUOTE,
928
+ :STRING_LITERAL_SINGLE_QUOTE],
1120
929
  :predicate => [
1121
- :IRI_REF,
930
+ :IRIREF,
1122
931
  :PNAME_LN,
1123
932
  :PNAME_NS],
1124
933
  :predicateObjectList => [
1125
934
  "a",
1126
- :IRI_REF,
935
+ :IRIREF,
1127
936
  :PNAME_LN,
1128
937
  :PNAME_NS],
1129
938
  :prefixID => [
1130
939
  "@prefix"],
940
+ :sparqlBase => [
941
+ :SPARQL_BASE],
942
+ :sparqlPrefix => [
943
+ :SPARQL_PREFIX],
1131
944
  :statement => [
1132
945
  "(",
1133
946
  "@base",
@@ -1135,15 +948,16 @@ module RDF::Turtle::Meta
1135
948
  "[",
1136
949
  :ANON,
1137
950
  :BLANK_NODE_LABEL,
1138
- :IRI_REF,
951
+ :IRIREF,
1139
952
  :PNAME_LN,
1140
- :PNAME_NS],
953
+ :PNAME_NS,
954
+ :SPARQL_BASE,
955
+ :SPARQL_PREFIX],
1141
956
  :subject => [
1142
957
  "(",
1143
- "[",
1144
958
  :ANON,
1145
959
  :BLANK_NODE_LABEL,
1146
- :IRI_REF,
960
+ :IRIREF,
1147
961
  :PNAME_LN,
1148
962
  :PNAME_NS],
1149
963
  :triples => [
@@ -1151,7 +965,7 @@ module RDF::Turtle::Meta
1151
965
  "[",
1152
966
  :ANON,
1153
967
  :BLANK_NODE_LABEL,
1154
- :IRI_REF,
968
+ :IRIREF,
1155
969
  :PNAME_LN,
1156
970
  :PNAME_NS],
1157
971
  :turtleDoc => [
@@ -1161,12 +975,14 @@ module RDF::Turtle::Meta
1161
975
  "[",
1162
976
  :ANON,
1163
977
  :BLANK_NODE_LABEL,
1164
- :IRI_REF,
978
+ :IRIREF,
1165
979
  :PNAME_LN,
1166
- :PNAME_NS],
980
+ :PNAME_NS,
981
+ :SPARQL_BASE,
982
+ :SPARQL_PREFIX],
1167
983
  :verb => [
1168
984
  "a",
1169
- :IRI_REF,
985
+ :IRIREF,
1170
986
  :PNAME_LN,
1171
987
  :PNAME_NS],
1172
988
  }.freeze
@@ -1178,11 +994,11 @@ module RDF::Turtle::Meta
1178
994
  "[",
1179
995
  :ANON,
1180
996
  :BLANK_NODE_LABEL,
1181
- :IRI_REF,
997
+ :IRIREF,
1182
998
  :PNAME_LN,
1183
- :PNAME_NS],
1184
- :"_:_g1" => [
1185
- ";"],
999
+ :PNAME_NS,
1000
+ :SPARQL_BASE,
1001
+ :SPARQL_PREFIX],
1186
1002
  :"_:_g2" => [
1187
1003
  ";"],
1188
1004
  :"_:_g3" => [
@@ -1190,8 +1006,10 @@ module RDF::Turtle::Meta
1190
1006
  :"_:_g4" => [
1191
1007
  ";"],
1192
1008
  :"_:_g5" => [
1009
+ ";"],
1010
+ :"_:_g6" => [
1193
1011
  ","],
1194
- :"_:_g7" => [
1012
+ :"_:_g8" => [
1195
1013
  "(",
1196
1014
  ",",
1197
1015
  "[",
@@ -1200,22 +1018,16 @@ module RDF::Turtle::Meta
1200
1018
  :ANON,
1201
1019
  :BLANK_NODE_LABEL,
1202
1020
  :DECIMAL,
1203
- :DECIMAL_NEGATIVE,
1204
- :DECIMAL_POSITIVE,
1205
1021
  :DOUBLE,
1206
- :DOUBLE_NEGATIVE,
1207
- :DOUBLE_POSITIVE,
1208
1022
  :INTEGER,
1209
- :INTEGER_NEGATIVE,
1210
- :INTEGER_POSITIVE,
1211
- :IRI_REF,
1023
+ :IRIREF,
1212
1024
  :PNAME_LN,
1213
1025
  :PNAME_NS,
1214
- :STRING_LITERAL1,
1215
- :STRING_LITERAL2,
1216
- :STRING_LITERAL_LONG1,
1217
- :STRING_LITERAL_LONG2],
1218
- :"_:_g8" => [
1026
+ :STRING_LITERAL_LONG_QUOTE,
1027
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1028
+ :STRING_LITERAL_QUOTE,
1029
+ :STRING_LITERAL_SINGLE_QUOTE],
1030
+ :"_:_g9" => [
1219
1031
  "(",
1220
1032
  ",",
1221
1033
  "[",
@@ -1224,46 +1036,30 @@ module RDF::Turtle::Meta
1224
1036
  :ANON,
1225
1037
  :BLANK_NODE_LABEL,
1226
1038
  :DECIMAL,
1227
- :DECIMAL_NEGATIVE,
1228
- :DECIMAL_POSITIVE,
1229
1039
  :DOUBLE,
1230
- :DOUBLE_NEGATIVE,
1231
- :DOUBLE_POSITIVE,
1232
1040
  :INTEGER,
1233
- :INTEGER_NEGATIVE,
1234
- :INTEGER_POSITIVE,
1235
- :IRI_REF,
1041
+ :IRIREF,
1236
1042
  :PNAME_LN,
1237
1043
  :PNAME_NS,
1238
- :STRING_LITERAL1,
1239
- :STRING_LITERAL2,
1240
- :STRING_LITERAL_LONG1,
1241
- :STRING_LITERAL_LONG2],
1242
- :"_:g2152809700" => [
1044
+ :STRING_LITERAL_LONG_QUOTE,
1045
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1046
+ :STRING_LITERAL_QUOTE,
1047
+ :STRING_LITERAL_SINGLE_QUOTE],
1048
+ :"_:g70259512113780" => [
1243
1049
  "(",
1244
1050
  "@base",
1245
1051
  "@prefix",
1246
1052
  "[",
1247
1053
  :ANON,
1248
1054
  :BLANK_NODE_LABEL,
1249
- :IRI_REF,
1055
+ :IRIREF,
1250
1056
  :PNAME_LN,
1251
- :PNAME_NS],
1252
- :"_:g2153010700" => [
1253
- "(",
1254
- "@base",
1255
- "@prefix",
1256
- "[",
1257
- :ANON,
1258
- :BLANK_NODE_LABEL,
1259
- :IRI_REF,
1260
- :PNAME_LN,
1261
- :PNAME_NS],
1262
- :"_:g2153337920" => [
1057
+ :PNAME_NS,
1058
+ :SPARQL_BASE,
1059
+ :SPARQL_PREFIX],
1060
+ :"_:g70259512229140" => [
1263
1061
  ";"],
1264
- :"_:g2165682600" => [
1265
- :"ebnf:eof"],
1266
- :"_:g2165812760" => [
1062
+ :"_:g70259512303120" => [
1267
1063
  "(",
1268
1064
  ",",
1269
1065
  "[",
@@ -1272,21 +1068,17 @@ module RDF::Turtle::Meta
1272
1068
  :ANON,
1273
1069
  :BLANK_NODE_LABEL,
1274
1070
  :DECIMAL,
1275
- :DECIMAL_NEGATIVE,
1276
- :DECIMAL_POSITIVE,
1277
1071
  :DOUBLE,
1278
- :DOUBLE_NEGATIVE,
1279
- :DOUBLE_POSITIVE,
1280
1072
  :INTEGER,
1281
- :INTEGER_NEGATIVE,
1282
- :INTEGER_POSITIVE,
1283
- :IRI_REF,
1073
+ :IRIREF,
1284
1074
  :PNAME_LN,
1285
1075
  :PNAME_NS,
1286
- :STRING_LITERAL1,
1287
- :STRING_LITERAL2,
1288
- :STRING_LITERAL_LONG1,
1289
- :STRING_LITERAL_LONG2],
1076
+ :STRING_LITERAL_LONG_QUOTE,
1077
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1078
+ :STRING_LITERAL_QUOTE,
1079
+ :STRING_LITERAL_SINGLE_QUOTE],
1080
+ :"_:g70259512513580" => [
1081
+ :"ebnf:eof"],
1290
1082
  "a" => [
1291
1083
  "(",
1292
1084
  "[",
@@ -1295,21 +1087,15 @@ module RDF::Turtle::Meta
1295
1087
  :ANON,
1296
1088
  :BLANK_NODE_LABEL,
1297
1089
  :DECIMAL,
1298
- :DECIMAL_NEGATIVE,
1299
- :DECIMAL_POSITIVE,
1300
1090
  :DOUBLE,
1301
- :DOUBLE_NEGATIVE,
1302
- :DOUBLE_POSITIVE,
1303
1091
  :INTEGER,
1304
- :INTEGER_NEGATIVE,
1305
- :INTEGER_POSITIVE,
1306
- :IRI_REF,
1092
+ :IRIREF,
1307
1093
  :PNAME_LN,
1308
1094
  :PNAME_NS,
1309
- :STRING_LITERAL1,
1310
- :STRING_LITERAL2,
1311
- :STRING_LITERAL_LONG1,
1312
- :STRING_LITERAL_LONG2],
1095
+ :STRING_LITERAL_LONG_QUOTE,
1096
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1097
+ :STRING_LITERAL_QUOTE,
1098
+ :STRING_LITERAL_SINGLE_QUOTE],
1313
1099
  "false" => [
1314
1100
  "(",
1315
1101
  ",",
@@ -1319,21 +1105,15 @@ module RDF::Turtle::Meta
1319
1105
  :ANON,
1320
1106
  :BLANK_NODE_LABEL,
1321
1107
  :DECIMAL,
1322
- :DECIMAL_NEGATIVE,
1323
- :DECIMAL_POSITIVE,
1324
1108
  :DOUBLE,
1325
- :DOUBLE_NEGATIVE,
1326
- :DOUBLE_POSITIVE,
1327
1109
  :INTEGER,
1328
- :INTEGER_NEGATIVE,
1329
- :INTEGER_POSITIVE,
1330
- :IRI_REF,
1110
+ :IRIREF,
1331
1111
  :PNAME_LN,
1332
1112
  :PNAME_NS,
1333
- :STRING_LITERAL1,
1334
- :STRING_LITERAL2,
1335
- :STRING_LITERAL_LONG1,
1336
- :STRING_LITERAL_LONG2],
1113
+ :STRING_LITERAL_LONG_QUOTE,
1114
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1115
+ :STRING_LITERAL_QUOTE,
1116
+ :STRING_LITERAL_SINGLE_QUOTE],
1337
1117
  :"ebnf:empty" => [
1338
1118
  "(",
1339
1119
  ",",
@@ -1345,21 +1125,15 @@ module RDF::Turtle::Meta
1345
1125
  :ANON,
1346
1126
  :BLANK_NODE_LABEL,
1347
1127
  :DECIMAL,
1348
- :DECIMAL_NEGATIVE,
1349
- :DECIMAL_POSITIVE,
1350
1128
  :DOUBLE,
1351
- :DOUBLE_NEGATIVE,
1352
- :DOUBLE_POSITIVE,
1353
1129
  :INTEGER,
1354
- :INTEGER_NEGATIVE,
1355
- :INTEGER_POSITIVE,
1356
- :IRI_REF,
1130
+ :IRIREF,
1357
1131
  :PNAME_LN,
1358
1132
  :PNAME_NS,
1359
- :STRING_LITERAL1,
1360
- :STRING_LITERAL2,
1361
- :STRING_LITERAL_LONG1,
1362
- :STRING_LITERAL_LONG2],
1133
+ :STRING_LITERAL_LONG_QUOTE,
1134
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1135
+ :STRING_LITERAL_QUOTE,
1136
+ :STRING_LITERAL_SINGLE_QUOTE],
1363
1137
  :ANON => [
1364
1138
  "(",
1365
1139
  ",",
@@ -1370,21 +1144,15 @@ module RDF::Turtle::Meta
1370
1144
  :ANON,
1371
1145
  :BLANK_NODE_LABEL,
1372
1146
  :DECIMAL,
1373
- :DECIMAL_NEGATIVE,
1374
- :DECIMAL_POSITIVE,
1375
1147
  :DOUBLE,
1376
- :DOUBLE_NEGATIVE,
1377
- :DOUBLE_POSITIVE,
1378
1148
  :INTEGER,
1379
- :INTEGER_NEGATIVE,
1380
- :INTEGER_POSITIVE,
1381
- :IRI_REF,
1149
+ :IRIREF,
1382
1150
  :PNAME_LN,
1383
1151
  :PNAME_NS,
1384
- :STRING_LITERAL1,
1385
- :STRING_LITERAL2,
1386
- :STRING_LITERAL_LONG1,
1387
- :STRING_LITERAL_LONG2],
1152
+ :STRING_LITERAL_LONG_QUOTE,
1153
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1154
+ :STRING_LITERAL_QUOTE,
1155
+ :STRING_LITERAL_SINGLE_QUOTE],
1388
1156
  :BLANK_NODE_LABEL => [
1389
1157
  "(",
1390
1158
  ",",
@@ -1395,21 +1163,15 @@ module RDF::Turtle::Meta
1395
1163
  :ANON,
1396
1164
  :BLANK_NODE_LABEL,
1397
1165
  :DECIMAL,
1398
- :DECIMAL_NEGATIVE,
1399
- :DECIMAL_POSITIVE,
1400
1166
  :DOUBLE,
1401
- :DOUBLE_NEGATIVE,
1402
- :DOUBLE_POSITIVE,
1403
1167
  :INTEGER,
1404
- :INTEGER_NEGATIVE,
1405
- :INTEGER_POSITIVE,
1406
- :IRI_REF,
1168
+ :IRIREF,
1407
1169
  :PNAME_LN,
1408
1170
  :PNAME_NS,
1409
- :STRING_LITERAL1,
1410
- :STRING_LITERAL2,
1411
- :STRING_LITERAL_LONG1,
1412
- :STRING_LITERAL_LONG2],
1171
+ :STRING_LITERAL_LONG_QUOTE,
1172
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1173
+ :STRING_LITERAL_QUOTE,
1174
+ :STRING_LITERAL_SINGLE_QUOTE],
1413
1175
  :BlankNode => [
1414
1176
  "(",
1415
1177
  ",",
@@ -1420,21 +1182,15 @@ module RDF::Turtle::Meta
1420
1182
  :ANON,
1421
1183
  :BLANK_NODE_LABEL,
1422
1184
  :DECIMAL,
1423
- :DECIMAL_NEGATIVE,
1424
- :DECIMAL_POSITIVE,
1425
1185
  :DOUBLE,
1426
- :DOUBLE_NEGATIVE,
1427
- :DOUBLE_POSITIVE,
1428
1186
  :INTEGER,
1429
- :INTEGER_NEGATIVE,
1430
- :INTEGER_POSITIVE,
1431
- :IRI_REF,
1187
+ :IRIREF,
1432
1188
  :PNAME_LN,
1433
1189
  :PNAME_NS,
1434
- :STRING_LITERAL1,
1435
- :STRING_LITERAL2,
1436
- :STRING_LITERAL_LONG1,
1437
- :STRING_LITERAL_LONG2],
1190
+ :STRING_LITERAL_LONG_QUOTE,
1191
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1192
+ :STRING_LITERAL_QUOTE,
1193
+ :STRING_LITERAL_SINGLE_QUOTE],
1438
1194
  :BooleanLiteral => [
1439
1195
  "(",
1440
1196
  ",",
@@ -1444,21 +1200,15 @@ module RDF::Turtle::Meta
1444
1200
  :ANON,
1445
1201
  :BLANK_NODE_LABEL,
1446
1202
  :DECIMAL,
1447
- :DECIMAL_NEGATIVE,
1448
- :DECIMAL_POSITIVE,
1449
1203
  :DOUBLE,
1450
- :DOUBLE_NEGATIVE,
1451
- :DOUBLE_POSITIVE,
1452
1204
  :INTEGER,
1453
- :INTEGER_NEGATIVE,
1454
- :INTEGER_POSITIVE,
1455
- :IRI_REF,
1205
+ :IRIREF,
1456
1206
  :PNAME_LN,
1457
1207
  :PNAME_NS,
1458
- :STRING_LITERAL1,
1459
- :STRING_LITERAL2,
1460
- :STRING_LITERAL_LONG1,
1461
- :STRING_LITERAL_LONG2],
1208
+ :STRING_LITERAL_LONG_QUOTE,
1209
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1210
+ :STRING_LITERAL_QUOTE,
1211
+ :STRING_LITERAL_SINGLE_QUOTE],
1462
1212
  :DECIMAL => [
1463
1213
  "(",
1464
1214
  ",",
@@ -1468,69 +1218,15 @@ module RDF::Turtle::Meta
1468
1218
  :ANON,
1469
1219
  :BLANK_NODE_LABEL,
1470
1220
  :DECIMAL,
1471
- :DECIMAL_NEGATIVE,
1472
- :DECIMAL_POSITIVE,
1473
- :DOUBLE,
1474
- :DOUBLE_NEGATIVE,
1475
- :DOUBLE_POSITIVE,
1476
- :INTEGER,
1477
- :INTEGER_NEGATIVE,
1478
- :INTEGER_POSITIVE,
1479
- :IRI_REF,
1480
- :PNAME_LN,
1481
- :PNAME_NS,
1482
- :STRING_LITERAL1,
1483
- :STRING_LITERAL2,
1484
- :STRING_LITERAL_LONG1,
1485
- :STRING_LITERAL_LONG2],
1486
- :DECIMAL_NEGATIVE => [
1487
- "(",
1488
- ",",
1489
- "[",
1490
- "false",
1491
- "true",
1492
- :ANON,
1493
- :BLANK_NODE_LABEL,
1494
- :DECIMAL,
1495
- :DECIMAL_NEGATIVE,
1496
- :DECIMAL_POSITIVE,
1497
- :DOUBLE,
1498
- :DOUBLE_NEGATIVE,
1499
- :DOUBLE_POSITIVE,
1500
- :INTEGER,
1501
- :INTEGER_NEGATIVE,
1502
- :INTEGER_POSITIVE,
1503
- :IRI_REF,
1504
- :PNAME_LN,
1505
- :PNAME_NS,
1506
- :STRING_LITERAL1,
1507
- :STRING_LITERAL2,
1508
- :STRING_LITERAL_LONG1,
1509
- :STRING_LITERAL_LONG2],
1510
- :DECIMAL_POSITIVE => [
1511
- "(",
1512
- ",",
1513
- "[",
1514
- "false",
1515
- "true",
1516
- :ANON,
1517
- :BLANK_NODE_LABEL,
1518
- :DECIMAL,
1519
- :DECIMAL_NEGATIVE,
1520
- :DECIMAL_POSITIVE,
1521
1221
  :DOUBLE,
1522
- :DOUBLE_NEGATIVE,
1523
- :DOUBLE_POSITIVE,
1524
1222
  :INTEGER,
1525
- :INTEGER_NEGATIVE,
1526
- :INTEGER_POSITIVE,
1527
- :IRI_REF,
1223
+ :IRIREF,
1528
1224
  :PNAME_LN,
1529
1225
  :PNAME_NS,
1530
- :STRING_LITERAL1,
1531
- :STRING_LITERAL2,
1532
- :STRING_LITERAL_LONG1,
1533
- :STRING_LITERAL_LONG2],
1226
+ :STRING_LITERAL_LONG_QUOTE,
1227
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1228
+ :STRING_LITERAL_QUOTE,
1229
+ :STRING_LITERAL_SINGLE_QUOTE],
1534
1230
  :DOUBLE => [
1535
1231
  "(",
1536
1232
  ",",
@@ -1540,69 +1236,15 @@ module RDF::Turtle::Meta
1540
1236
  :ANON,
1541
1237
  :BLANK_NODE_LABEL,
1542
1238
  :DECIMAL,
1543
- :DECIMAL_NEGATIVE,
1544
- :DECIMAL_POSITIVE,
1545
- :DOUBLE,
1546
- :DOUBLE_NEGATIVE,
1547
- :DOUBLE_POSITIVE,
1548
- :INTEGER,
1549
- :INTEGER_NEGATIVE,
1550
- :INTEGER_POSITIVE,
1551
- :IRI_REF,
1552
- :PNAME_LN,
1553
- :PNAME_NS,
1554
- :STRING_LITERAL1,
1555
- :STRING_LITERAL2,
1556
- :STRING_LITERAL_LONG1,
1557
- :STRING_LITERAL_LONG2],
1558
- :DOUBLE_NEGATIVE => [
1559
- "(",
1560
- ",",
1561
- "[",
1562
- "false",
1563
- "true",
1564
- :ANON,
1565
- :BLANK_NODE_LABEL,
1566
- :DECIMAL,
1567
- :DECIMAL_NEGATIVE,
1568
- :DECIMAL_POSITIVE,
1569
- :DOUBLE,
1570
- :DOUBLE_NEGATIVE,
1571
- :DOUBLE_POSITIVE,
1572
- :INTEGER,
1573
- :INTEGER_NEGATIVE,
1574
- :INTEGER_POSITIVE,
1575
- :IRI_REF,
1576
- :PNAME_LN,
1577
- :PNAME_NS,
1578
- :STRING_LITERAL1,
1579
- :STRING_LITERAL2,
1580
- :STRING_LITERAL_LONG1,
1581
- :STRING_LITERAL_LONG2],
1582
- :DOUBLE_POSITIVE => [
1583
- "(",
1584
- ",",
1585
- "[",
1586
- "false",
1587
- "true",
1588
- :ANON,
1589
- :BLANK_NODE_LABEL,
1590
- :DECIMAL,
1591
- :DECIMAL_NEGATIVE,
1592
- :DECIMAL_POSITIVE,
1593
1239
  :DOUBLE,
1594
- :DOUBLE_NEGATIVE,
1595
- :DOUBLE_POSITIVE,
1596
1240
  :INTEGER,
1597
- :INTEGER_NEGATIVE,
1598
- :INTEGER_POSITIVE,
1599
- :IRI_REF,
1241
+ :IRIREF,
1600
1242
  :PNAME_LN,
1601
1243
  :PNAME_NS,
1602
- :STRING_LITERAL1,
1603
- :STRING_LITERAL2,
1604
- :STRING_LITERAL_LONG1,
1605
- :STRING_LITERAL_LONG2],
1244
+ :STRING_LITERAL_LONG_QUOTE,
1245
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1246
+ :STRING_LITERAL_QUOTE,
1247
+ :STRING_LITERAL_SINGLE_QUOTE],
1606
1248
  :INTEGER => [
1607
1249
  "(",
1608
1250
  ",",
@@ -1612,46 +1254,39 @@ module RDF::Turtle::Meta
1612
1254
  :ANON,
1613
1255
  :BLANK_NODE_LABEL,
1614
1256
  :DECIMAL,
1615
- :DECIMAL_NEGATIVE,
1616
- :DECIMAL_POSITIVE,
1617
1257
  :DOUBLE,
1618
- :DOUBLE_NEGATIVE,
1619
- :DOUBLE_POSITIVE,
1620
1258
  :INTEGER,
1621
- :INTEGER_NEGATIVE,
1622
- :INTEGER_POSITIVE,
1623
- :IRI_REF,
1259
+ :IRIREF,
1624
1260
  :PNAME_LN,
1625
1261
  :PNAME_NS,
1626
- :STRING_LITERAL1,
1627
- :STRING_LITERAL2,
1628
- :STRING_LITERAL_LONG1,
1629
- :STRING_LITERAL_LONG2],
1630
- :INTEGER_NEGATIVE => [
1262
+ :STRING_LITERAL_LONG_QUOTE,
1263
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1264
+ :STRING_LITERAL_QUOTE,
1265
+ :STRING_LITERAL_SINGLE_QUOTE],
1266
+ :IRIREF => [
1631
1267
  "(",
1632
1268
  ",",
1269
+ "@base",
1270
+ "@prefix",
1633
1271
  "[",
1272
+ "a",
1634
1273
  "false",
1635
1274
  "true",
1636
1275
  :ANON,
1637
1276
  :BLANK_NODE_LABEL,
1638
1277
  :DECIMAL,
1639
- :DECIMAL_NEGATIVE,
1640
- :DECIMAL_POSITIVE,
1641
1278
  :DOUBLE,
1642
- :DOUBLE_NEGATIVE,
1643
- :DOUBLE_POSITIVE,
1644
1279
  :INTEGER,
1645
- :INTEGER_NEGATIVE,
1646
- :INTEGER_POSITIVE,
1647
- :IRI_REF,
1280
+ :IRIREF,
1648
1281
  :PNAME_LN,
1649
1282
  :PNAME_NS,
1650
- :STRING_LITERAL1,
1651
- :STRING_LITERAL2,
1652
- :STRING_LITERAL_LONG1,
1653
- :STRING_LITERAL_LONG2],
1654
- :INTEGER_POSITIVE => [
1283
+ :SPARQL_BASE,
1284
+ :SPARQL_PREFIX,
1285
+ :STRING_LITERAL_LONG_QUOTE,
1286
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1287
+ :STRING_LITERAL_QUOTE,
1288
+ :STRING_LITERAL_SINGLE_QUOTE],
1289
+ :LANGTAG => [
1655
1290
  "(",
1656
1291
  ",",
1657
1292
  "[",
@@ -1660,47 +1295,34 @@ module RDF::Turtle::Meta
1660
1295
  :ANON,
1661
1296
  :BLANK_NODE_LABEL,
1662
1297
  :DECIMAL,
1663
- :DECIMAL_NEGATIVE,
1664
- :DECIMAL_POSITIVE,
1665
1298
  :DOUBLE,
1666
- :DOUBLE_NEGATIVE,
1667
- :DOUBLE_POSITIVE,
1668
1299
  :INTEGER,
1669
- :INTEGER_NEGATIVE,
1670
- :INTEGER_POSITIVE,
1671
- :IRI_REF,
1300
+ :IRIREF,
1672
1301
  :PNAME_LN,
1673
1302
  :PNAME_NS,
1674
- :STRING_LITERAL1,
1675
- :STRING_LITERAL2,
1676
- :STRING_LITERAL_LONG1,
1677
- :STRING_LITERAL_LONG2],
1678
- :IRI_REF => [
1303
+ :STRING_LITERAL_LONG_QUOTE,
1304
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1305
+ :STRING_LITERAL_QUOTE,
1306
+ :STRING_LITERAL_SINGLE_QUOTE],
1307
+ :NumericLiteral => [
1679
1308
  "(",
1680
1309
  ",",
1681
1310
  "[",
1682
- "a",
1683
1311
  "false",
1684
1312
  "true",
1685
1313
  :ANON,
1686
1314
  :BLANK_NODE_LABEL,
1687
1315
  :DECIMAL,
1688
- :DECIMAL_NEGATIVE,
1689
- :DECIMAL_POSITIVE,
1690
1316
  :DOUBLE,
1691
- :DOUBLE_NEGATIVE,
1692
- :DOUBLE_POSITIVE,
1693
1317
  :INTEGER,
1694
- :INTEGER_NEGATIVE,
1695
- :INTEGER_POSITIVE,
1696
- :IRI_REF,
1318
+ :IRIREF,
1697
1319
  :PNAME_LN,
1698
1320
  :PNAME_NS,
1699
- :STRING_LITERAL1,
1700
- :STRING_LITERAL2,
1701
- :STRING_LITERAL_LONG1,
1702
- :STRING_LITERAL_LONG2],
1703
- :IRIref => [
1321
+ :STRING_LITERAL_LONG_QUOTE,
1322
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1323
+ :STRING_LITERAL_QUOTE,
1324
+ :STRING_LITERAL_SINGLE_QUOTE],
1325
+ :PNAME_LN => [
1704
1326
  "(",
1705
1327
  ",",
1706
1328
  "[",
@@ -1710,70 +1332,54 @@ module RDF::Turtle::Meta
1710
1332
  :ANON,
1711
1333
  :BLANK_NODE_LABEL,
1712
1334
  :DECIMAL,
1713
- :DECIMAL_NEGATIVE,
1714
- :DECIMAL_POSITIVE,
1715
1335
  :DOUBLE,
1716
- :DOUBLE_NEGATIVE,
1717
- :DOUBLE_POSITIVE,
1718
1336
  :INTEGER,
1719
- :INTEGER_NEGATIVE,
1720
- :INTEGER_POSITIVE,
1721
- :IRI_REF,
1337
+ :IRIREF,
1722
1338
  :PNAME_LN,
1723
1339
  :PNAME_NS,
1724
- :STRING_LITERAL1,
1725
- :STRING_LITERAL2,
1726
- :STRING_LITERAL_LONG1,
1727
- :STRING_LITERAL_LONG2],
1728
- :LANGTAG => [
1340
+ :STRING_LITERAL_LONG_QUOTE,
1341
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1342
+ :STRING_LITERAL_QUOTE,
1343
+ :STRING_LITERAL_SINGLE_QUOTE],
1344
+ :PNAME_NS => [
1729
1345
  "(",
1730
1346
  ",",
1731
1347
  "[",
1348
+ "a",
1732
1349
  "false",
1733
1350
  "true",
1734
1351
  :ANON,
1735
1352
  :BLANK_NODE_LABEL,
1736
1353
  :DECIMAL,
1737
- :DECIMAL_NEGATIVE,
1738
- :DECIMAL_POSITIVE,
1739
1354
  :DOUBLE,
1740
- :DOUBLE_NEGATIVE,
1741
- :DOUBLE_POSITIVE,
1742
1355
  :INTEGER,
1743
- :INTEGER_NEGATIVE,
1744
- :INTEGER_POSITIVE,
1745
- :IRI_REF,
1356
+ :IRIREF,
1746
1357
  :PNAME_LN,
1747
1358
  :PNAME_NS,
1748
- :STRING_LITERAL1,
1749
- :STRING_LITERAL2,
1750
- :STRING_LITERAL_LONG1,
1751
- :STRING_LITERAL_LONG2],
1752
- :NumericLiteral => [
1359
+ :STRING_LITERAL_LONG_QUOTE,
1360
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1361
+ :STRING_LITERAL_QUOTE,
1362
+ :STRING_LITERAL_SINGLE_QUOTE],
1363
+ :PrefixedName => [
1753
1364
  "(",
1754
1365
  ",",
1755
1366
  "[",
1367
+ "a",
1756
1368
  "false",
1757
1369
  "true",
1758
1370
  :ANON,
1759
1371
  :BLANK_NODE_LABEL,
1760
1372
  :DECIMAL,
1761
- :DECIMAL_NEGATIVE,
1762
- :DECIMAL_POSITIVE,
1763
1373
  :DOUBLE,
1764
- :DOUBLE_NEGATIVE,
1765
- :DOUBLE_POSITIVE,
1766
1374
  :INTEGER,
1767
- :INTEGER_NEGATIVE,
1768
- :INTEGER_POSITIVE,
1769
- :IRI_REF,
1375
+ :IRIREF,
1770
1376
  :PNAME_LN,
1771
1377
  :PNAME_NS,
1772
- :STRING_LITERAL1,
1773
- :STRING_LITERAL2,
1774
- :STRING_LITERAL_LONG1,
1775
- :STRING_LITERAL_LONG2],
1776
- :NumericLiteralNegative => [
1378
+ :STRING_LITERAL_LONG_QUOTE,
1379
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1380
+ :STRING_LITERAL_QUOTE,
1381
+ :STRING_LITERAL_SINGLE_QUOTE],
1382
+ :RDFLiteral => [
1777
1383
  "(",
1778
1384
  ",",
1779
1385
  "[",
@@ -1782,70 +1388,62 @@ module RDF::Turtle::Meta
1782
1388
  :ANON,
1783
1389
  :BLANK_NODE_LABEL,
1784
1390
  :DECIMAL,
1785
- :DECIMAL_NEGATIVE,
1786
- :DECIMAL_POSITIVE,
1787
1391
  :DOUBLE,
1788
- :DOUBLE_NEGATIVE,
1789
- :DOUBLE_POSITIVE,
1790
1392
  :INTEGER,
1791
- :INTEGER_NEGATIVE,
1792
- :INTEGER_POSITIVE,
1793
- :IRI_REF,
1393
+ :IRIREF,
1794
1394
  :PNAME_LN,
1795
1395
  :PNAME_NS,
1796
- :STRING_LITERAL1,
1797
- :STRING_LITERAL2,
1798
- :STRING_LITERAL_LONG1,
1799
- :STRING_LITERAL_LONG2],
1800
- :NumericLiteralPositive => [
1396
+ :STRING_LITERAL_LONG_QUOTE,
1397
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1398
+ :STRING_LITERAL_QUOTE,
1399
+ :STRING_LITERAL_SINGLE_QUOTE],
1400
+ :STRING_LITERAL_LONG_QUOTE => [
1401
+ "^^",
1402
+ :LANGTAG],
1403
+ :STRING_LITERAL_LONG_SINGLE_QUOTE => [
1404
+ "^^",
1405
+ :LANGTAG],
1406
+ :STRING_LITERAL_QUOTE => [
1407
+ "^^",
1408
+ :LANGTAG],
1409
+ :STRING_LITERAL_SINGLE_QUOTE => [
1410
+ "^^",
1411
+ :LANGTAG],
1412
+ :String => [
1413
+ "^^",
1414
+ :LANGTAG],
1415
+ :base => [
1801
1416
  "(",
1802
- ",",
1417
+ "@base",
1418
+ "@prefix",
1803
1419
  "[",
1804
- "false",
1805
- "true",
1806
1420
  :ANON,
1807
1421
  :BLANK_NODE_LABEL,
1808
- :DECIMAL,
1809
- :DECIMAL_NEGATIVE,
1810
- :DECIMAL_POSITIVE,
1811
- :DOUBLE,
1812
- :DOUBLE_NEGATIVE,
1813
- :DOUBLE_POSITIVE,
1814
- :INTEGER,
1815
- :INTEGER_NEGATIVE,
1816
- :INTEGER_POSITIVE,
1817
- :IRI_REF,
1422
+ :IRIREF,
1818
1423
  :PNAME_LN,
1819
1424
  :PNAME_NS,
1820
- :STRING_LITERAL1,
1821
- :STRING_LITERAL2,
1822
- :STRING_LITERAL_LONG1,
1823
- :STRING_LITERAL_LONG2],
1824
- :NumericLiteralUnsigned => [
1425
+ :SPARQL_BASE,
1426
+ :SPARQL_PREFIX],
1427
+ :blank => [
1825
1428
  "(",
1826
1429
  ",",
1827
1430
  "[",
1431
+ "a",
1828
1432
  "false",
1829
1433
  "true",
1830
1434
  :ANON,
1831
1435
  :BLANK_NODE_LABEL,
1832
1436
  :DECIMAL,
1833
- :DECIMAL_NEGATIVE,
1834
- :DECIMAL_POSITIVE,
1835
1437
  :DOUBLE,
1836
- :DOUBLE_NEGATIVE,
1837
- :DOUBLE_POSITIVE,
1838
1438
  :INTEGER,
1839
- :INTEGER_NEGATIVE,
1840
- :INTEGER_POSITIVE,
1841
- :IRI_REF,
1439
+ :IRIREF,
1842
1440
  :PNAME_LN,
1843
1441
  :PNAME_NS,
1844
- :STRING_LITERAL1,
1845
- :STRING_LITERAL2,
1846
- :STRING_LITERAL_LONG1,
1847
- :STRING_LITERAL_LONG2],
1848
- :PNAME_LN => [
1442
+ :STRING_LITERAL_LONG_QUOTE,
1443
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1444
+ :STRING_LITERAL_QUOTE,
1445
+ :STRING_LITERAL_SINGLE_QUOTE],
1446
+ :blankNodePropertyList => [
1849
1447
  "(",
1850
1448
  ",",
1851
1449
  "[",
@@ -1855,22 +1453,16 @@ module RDF::Turtle::Meta
1855
1453
  :ANON,
1856
1454
  :BLANK_NODE_LABEL,
1857
1455
  :DECIMAL,
1858
- :DECIMAL_NEGATIVE,
1859
- :DECIMAL_POSITIVE,
1860
1456
  :DOUBLE,
1861
- :DOUBLE_NEGATIVE,
1862
- :DOUBLE_POSITIVE,
1863
1457
  :INTEGER,
1864
- :INTEGER_NEGATIVE,
1865
- :INTEGER_POSITIVE,
1866
- :IRI_REF,
1458
+ :IRIREF,
1867
1459
  :PNAME_LN,
1868
1460
  :PNAME_NS,
1869
- :STRING_LITERAL1,
1870
- :STRING_LITERAL2,
1871
- :STRING_LITERAL_LONG1,
1872
- :STRING_LITERAL_LONG2],
1873
- :PNAME_NS => [
1461
+ :STRING_LITERAL_LONG_QUOTE,
1462
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1463
+ :STRING_LITERAL_QUOTE,
1464
+ :STRING_LITERAL_SINGLE_QUOTE],
1465
+ :collection => [
1874
1466
  "(",
1875
1467
  ",",
1876
1468
  "[",
@@ -1880,233 +1472,137 @@ module RDF::Turtle::Meta
1880
1472
  :ANON,
1881
1473
  :BLANK_NODE_LABEL,
1882
1474
  :DECIMAL,
1883
- :DECIMAL_NEGATIVE,
1884
- :DECIMAL_POSITIVE,
1885
1475
  :DOUBLE,
1886
- :DOUBLE_NEGATIVE,
1887
- :DOUBLE_POSITIVE,
1888
1476
  :INTEGER,
1889
- :INTEGER_NEGATIVE,
1890
- :INTEGER_POSITIVE,
1891
- :IRI_REF,
1477
+ :IRIREF,
1892
1478
  :PNAME_LN,
1893
1479
  :PNAME_NS,
1894
- :STRING_LITERAL1,
1895
- :STRING_LITERAL2,
1896
- :STRING_LITERAL_LONG1,
1897
- :STRING_LITERAL_LONG2],
1898
- :PrefixedName => [
1480
+ :STRING_LITERAL_LONG_QUOTE,
1481
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1482
+ :STRING_LITERAL_QUOTE,
1483
+ :STRING_LITERAL_SINGLE_QUOTE],
1484
+ :directive => [
1899
1485
  "(",
1900
- ",",
1486
+ "@base",
1487
+ "@prefix",
1901
1488
  "[",
1902
- "a",
1903
- "false",
1904
- "true",
1905
1489
  :ANON,
1906
1490
  :BLANK_NODE_LABEL,
1907
- :DECIMAL,
1908
- :DECIMAL_NEGATIVE,
1909
- :DECIMAL_POSITIVE,
1910
- :DOUBLE,
1911
- :DOUBLE_NEGATIVE,
1912
- :DOUBLE_POSITIVE,
1913
- :INTEGER,
1914
- :INTEGER_NEGATIVE,
1915
- :INTEGER_POSITIVE,
1916
- :IRI_REF,
1491
+ :IRIREF,
1917
1492
  :PNAME_LN,
1918
1493
  :PNAME_NS,
1919
- :STRING_LITERAL1,
1920
- :STRING_LITERAL2,
1921
- :STRING_LITERAL_LONG1,
1922
- :STRING_LITERAL_LONG2],
1923
- :RDFLiteral => [
1494
+ :SPARQL_BASE,
1495
+ :SPARQL_PREFIX],
1496
+ :iri => [
1924
1497
  "(",
1925
1498
  ",",
1926
1499
  "[",
1500
+ "a",
1927
1501
  "false",
1928
1502
  "true",
1929
1503
  :ANON,
1930
1504
  :BLANK_NODE_LABEL,
1931
1505
  :DECIMAL,
1932
- :DECIMAL_NEGATIVE,
1933
- :DECIMAL_POSITIVE,
1934
1506
  :DOUBLE,
1935
- :DOUBLE_NEGATIVE,
1936
- :DOUBLE_POSITIVE,
1937
1507
  :INTEGER,
1938
- :INTEGER_NEGATIVE,
1939
- :INTEGER_POSITIVE,
1940
- :IRI_REF,
1508
+ :IRIREF,
1941
1509
  :PNAME_LN,
1942
1510
  :PNAME_NS,
1943
- :STRING_LITERAL1,
1944
- :STRING_LITERAL2,
1945
- :STRING_LITERAL_LONG1,
1946
- :STRING_LITERAL_LONG2],
1947
- :STRING_LITERAL1 => [
1948
- "^^",
1949
- :LANGTAG],
1950
- :STRING_LITERAL2 => [
1951
- "^^",
1952
- :LANGTAG],
1953
- :STRING_LITERAL_LONG1 => [
1954
- "^^",
1955
- :LANGTAG],
1956
- :STRING_LITERAL_LONG2 => [
1957
- "^^",
1958
- :LANGTAG],
1959
- :String => [
1960
- "^^",
1961
- :LANGTAG],
1962
- :blank => [
1511
+ :STRING_LITERAL_LONG_QUOTE,
1512
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1513
+ :STRING_LITERAL_QUOTE,
1514
+ :STRING_LITERAL_SINGLE_QUOTE],
1515
+ :literal => [
1963
1516
  "(",
1964
1517
  ",",
1965
1518
  "[",
1966
- "a",
1967
1519
  "false",
1968
1520
  "true",
1969
1521
  :ANON,
1970
1522
  :BLANK_NODE_LABEL,
1971
1523
  :DECIMAL,
1972
- :DECIMAL_NEGATIVE,
1973
- :DECIMAL_POSITIVE,
1974
1524
  :DOUBLE,
1975
- :DOUBLE_NEGATIVE,
1976
- :DOUBLE_POSITIVE,
1977
1525
  :INTEGER,
1978
- :INTEGER_NEGATIVE,
1979
- :INTEGER_POSITIVE,
1980
- :IRI_REF,
1526
+ :IRIREF,
1981
1527
  :PNAME_LN,
1982
1528
  :PNAME_NS,
1983
- :STRING_LITERAL1,
1984
- :STRING_LITERAL2,
1985
- :STRING_LITERAL_LONG1,
1986
- :STRING_LITERAL_LONG2],
1987
- :blankNodePropertyList => [
1529
+ :STRING_LITERAL_LONG_QUOTE,
1530
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1531
+ :STRING_LITERAL_QUOTE,
1532
+ :STRING_LITERAL_SINGLE_QUOTE],
1533
+ :object => [
1988
1534
  "(",
1989
1535
  ",",
1990
1536
  "[",
1991
- "a",
1992
1537
  "false",
1993
1538
  "true",
1994
1539
  :ANON,
1995
1540
  :BLANK_NODE_LABEL,
1996
1541
  :DECIMAL,
1997
- :DECIMAL_NEGATIVE,
1998
- :DECIMAL_POSITIVE,
1999
1542
  :DOUBLE,
2000
- :DOUBLE_NEGATIVE,
2001
- :DOUBLE_POSITIVE,
2002
1543
  :INTEGER,
2003
- :INTEGER_NEGATIVE,
2004
- :INTEGER_POSITIVE,
2005
- :IRI_REF,
1544
+ :IRIREF,
2006
1545
  :PNAME_LN,
2007
1546
  :PNAME_NS,
2008
- :STRING_LITERAL1,
2009
- :STRING_LITERAL2,
2010
- :STRING_LITERAL_LONG1,
2011
- :STRING_LITERAL_LONG2],
2012
- :collection => [
1547
+ :STRING_LITERAL_LONG_QUOTE,
1548
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1549
+ :STRING_LITERAL_QUOTE,
1550
+ :STRING_LITERAL_SINGLE_QUOTE],
1551
+ :objectList => [
1552
+ ";"],
1553
+ :predicate => [
2013
1554
  "(",
2014
- ",",
2015
1555
  "[",
2016
- "a",
2017
1556
  "false",
2018
1557
  "true",
2019
1558
  :ANON,
2020
1559
  :BLANK_NODE_LABEL,
2021
1560
  :DECIMAL,
2022
- :DECIMAL_NEGATIVE,
2023
- :DECIMAL_POSITIVE,
2024
1561
  :DOUBLE,
2025
- :DOUBLE_NEGATIVE,
2026
- :DOUBLE_POSITIVE,
2027
1562
  :INTEGER,
2028
- :INTEGER_NEGATIVE,
2029
- :INTEGER_POSITIVE,
2030
- :IRI_REF,
1563
+ :IRIREF,
2031
1564
  :PNAME_LN,
2032
1565
  :PNAME_NS,
2033
- :STRING_LITERAL1,
2034
- :STRING_LITERAL2,
2035
- :STRING_LITERAL_LONG1,
2036
- :STRING_LITERAL_LONG2],
2037
- :literal => [
1566
+ :STRING_LITERAL_LONG_QUOTE,
1567
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1568
+ :STRING_LITERAL_QUOTE,
1569
+ :STRING_LITERAL_SINGLE_QUOTE],
1570
+ :prefixID => [
2038
1571
  "(",
2039
- ",",
1572
+ "@base",
1573
+ "@prefix",
2040
1574
  "[",
2041
- "false",
2042
- "true",
2043
1575
  :ANON,
2044
1576
  :BLANK_NODE_LABEL,
2045
- :DECIMAL,
2046
- :DECIMAL_NEGATIVE,
2047
- :DECIMAL_POSITIVE,
2048
- :DOUBLE,
2049
- :DOUBLE_NEGATIVE,
2050
- :DOUBLE_POSITIVE,
2051
- :INTEGER,
2052
- :INTEGER_NEGATIVE,
2053
- :INTEGER_POSITIVE,
2054
- :IRI_REF,
1577
+ :IRIREF,
2055
1578
  :PNAME_LN,
2056
1579
  :PNAME_NS,
2057
- :STRING_LITERAL1,
2058
- :STRING_LITERAL2,
2059
- :STRING_LITERAL_LONG1,
2060
- :STRING_LITERAL_LONG2],
2061
- :object => [
1580
+ :SPARQL_BASE,
1581
+ :SPARQL_PREFIX],
1582
+ :sparqlBase => [
2062
1583
  "(",
2063
- ",",
1584
+ "@base",
1585
+ "@prefix",
2064
1586
  "[",
2065
- "false",
2066
- "true",
2067
1587
  :ANON,
2068
1588
  :BLANK_NODE_LABEL,
2069
- :DECIMAL,
2070
- :DECIMAL_NEGATIVE,
2071
- :DECIMAL_POSITIVE,
2072
- :DOUBLE,
2073
- :DOUBLE_NEGATIVE,
2074
- :DOUBLE_POSITIVE,
2075
- :INTEGER,
2076
- :INTEGER_NEGATIVE,
2077
- :INTEGER_POSITIVE,
2078
- :IRI_REF,
1589
+ :IRIREF,
2079
1590
  :PNAME_LN,
2080
1591
  :PNAME_NS,
2081
- :STRING_LITERAL1,
2082
- :STRING_LITERAL2,
2083
- :STRING_LITERAL_LONG1,
2084
- :STRING_LITERAL_LONG2],
2085
- :objectList => [
2086
- ";"],
2087
- :predicate => [
1592
+ :SPARQL_BASE,
1593
+ :SPARQL_PREFIX],
1594
+ :sparqlPrefix => [
2088
1595
  "(",
1596
+ "@base",
1597
+ "@prefix",
2089
1598
  "[",
2090
- "false",
2091
- "true",
2092
1599
  :ANON,
2093
1600
  :BLANK_NODE_LABEL,
2094
- :DECIMAL,
2095
- :DECIMAL_NEGATIVE,
2096
- :DECIMAL_POSITIVE,
2097
- :DOUBLE,
2098
- :DOUBLE_NEGATIVE,
2099
- :DOUBLE_POSITIVE,
2100
- :INTEGER,
2101
- :INTEGER_NEGATIVE,
2102
- :INTEGER_POSITIVE,
2103
- :IRI_REF,
1601
+ :IRIREF,
2104
1602
  :PNAME_LN,
2105
1603
  :PNAME_NS,
2106
- :STRING_LITERAL1,
2107
- :STRING_LITERAL2,
2108
- :STRING_LITERAL_LONG1,
2109
- :STRING_LITERAL_LONG2],
1604
+ :SPARQL_BASE,
1605
+ :SPARQL_PREFIX],
2110
1606
  :statement => [
2111
1607
  "(",
2112
1608
  "@base",
@@ -2114,12 +1610,14 @@ module RDF::Turtle::Meta
2114
1610
  "[",
2115
1611
  :ANON,
2116
1612
  :BLANK_NODE_LABEL,
2117
- :IRI_REF,
1613
+ :IRIREF,
2118
1614
  :PNAME_LN,
2119
- :PNAME_NS],
1615
+ :PNAME_NS,
1616
+ :SPARQL_BASE,
1617
+ :SPARQL_PREFIX],
2120
1618
  :subject => [
2121
1619
  "a",
2122
- :IRI_REF,
1620
+ :IRIREF,
2123
1621
  :PNAME_LN,
2124
1622
  :PNAME_NS],
2125
1623
  :turtleDoc => [
@@ -2132,21 +1630,15 @@ module RDF::Turtle::Meta
2132
1630
  :ANON,
2133
1631
  :BLANK_NODE_LABEL,
2134
1632
  :DECIMAL,
2135
- :DECIMAL_NEGATIVE,
2136
- :DECIMAL_POSITIVE,
2137
1633
  :DOUBLE,
2138
- :DOUBLE_NEGATIVE,
2139
- :DOUBLE_POSITIVE,
2140
1634
  :INTEGER,
2141
- :INTEGER_NEGATIVE,
2142
- :INTEGER_POSITIVE,
2143
- :IRI_REF,
1635
+ :IRIREF,
2144
1636
  :PNAME_LN,
2145
1637
  :PNAME_NS,
2146
- :STRING_LITERAL1,
2147
- :STRING_LITERAL2,
2148
- :STRING_LITERAL_LONG1,
2149
- :STRING_LITERAL_LONG2],
1638
+ :STRING_LITERAL_LONG_QUOTE,
1639
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1640
+ :STRING_LITERAL_QUOTE,
1641
+ :STRING_LITERAL_SINGLE_QUOTE],
2150
1642
  "true" => [
2151
1643
  "(",
2152
1644
  ",",
@@ -2156,20 +1648,14 @@ module RDF::Turtle::Meta
2156
1648
  :ANON,
2157
1649
  :BLANK_NODE_LABEL,
2158
1650
  :DECIMAL,
2159
- :DECIMAL_NEGATIVE,
2160
- :DECIMAL_POSITIVE,
2161
1651
  :DOUBLE,
2162
- :DOUBLE_NEGATIVE,
2163
- :DOUBLE_POSITIVE,
2164
1652
  :INTEGER,
2165
- :INTEGER_NEGATIVE,
2166
- :INTEGER_POSITIVE,
2167
- :IRI_REF,
1653
+ :IRIREF,
2168
1654
  :PNAME_LN,
2169
1655
  :PNAME_NS,
2170
- :STRING_LITERAL1,
2171
- :STRING_LITERAL2,
2172
- :STRING_LITERAL_LONG1,
2173
- :STRING_LITERAL_LONG2],
1656
+ :STRING_LITERAL_LONG_QUOTE,
1657
+ :STRING_LITERAL_LONG_SINGLE_QUOTE,
1658
+ :STRING_LITERAL_QUOTE,
1659
+ :STRING_LITERAL_SINGLE_QUOTE],
2174
1660
  }.freeze
2175
1661
  end