rdf-turtle 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/History CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.1.1
2
+ * Improvements to allow reader & writer to be sub-classed for rdf-trig.
3
+ * Improved error recovery when parsing.
4
+
1
5
  ### 0.1.0
2
6
  * Updates for RDF.rb 0.3.4.
3
7
  * Format detection.
@@ -74,7 +74,7 @@ Using SWAP utilities, this is done as follows:
74
74
  python http://www.w3.org/2000/10/swap/grammar/ebnf2turtle.py \
75
75
  etc/turtle.bnf \
76
76
  ttl language \
77
- 'http://www.w3.org/2000/10/swap/grammar/turtle#' > |
77
+ 'http://www.w3.org/ns/formats/Turtle#' > |
78
78
  sed -e 's/^ ".*"$/ g:seq (&)/' > etc/turtle.n3
79
79
 
80
80
  python http://www.w3.org/2000/10/swap/cwm.py etc/turtle.n3 \
@@ -84,7 +84,7 @@ Using SWAP utilities, this is done as follows:
84
84
 
85
85
  script/gramLL1 \
86
86
  --grammar etc/turtle-ll1.n3 \
87
- --lang 'http://www.w3.org/2000/10/swap/grammar/turtle#language' \
87
+ --lang 'http://www.w3.org/ns/formats/Turtle#language' \
88
88
  --output lib/rdf/turtle/meta.rb
89
89
 
90
90
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -200,12 +200,20 @@ module RDF::LL1
200
200
 
201
201
  if token.nil?
202
202
  lexme = (scanner.rest.split(/#{@whitespace}|#{@comment}/).first rescue nil) || scanner.rest
203
- raise Error.new("Invalid token #{lexme.inspect} on line #{lineno + 1}",
203
+ raise Error.new("Invalid token #{lexme[0..100].inspect}",
204
204
  :input => scanner.rest[0..100], :token => lexme, :lineno => lineno)
205
205
  end
206
206
 
207
207
  token
208
208
  end
209
+ rescue ArgumentError, Encoding::CompatibilityError => e
210
+ raise Error.new("#{e.message} on line #{lineno + 1}",
211
+ :input => (scanner.rest[0..100] rescue '??'), :token => lexme, :lineno => lineno)
212
+ rescue Error
213
+ raise
214
+ rescue
215
+ STDERR.puts "Expected ArgumentError, got #{$!.class}"
216
+ raise
209
217
  end
210
218
 
211
219
  ##
@@ -223,13 +231,13 @@ module RDF::LL1
223
231
  #
224
232
  # @return [Token]
225
233
  def recover
226
- scanner.skip(/./)
227
234
  until scanner.eos? do
228
235
  begin
236
+ shift
229
237
  return first
230
- rescue Error
238
+ rescue Error, ArgumentError
231
239
  # Ignore errors until something scans, or EOS.
232
- scanner.skip(/./)
240
+ scanner.pos = scanner.pos + 1
233
241
  end
234
242
  end
235
243
  end
@@ -454,5 +462,12 @@ module RDF::LL1
454
462
  super(message.to_s)
455
463
  end
456
464
  end # class Error
465
+
466
+ unless "".respond_to?(:force_encoding)
467
+ # Compatibility with 1.9 Encoding
468
+ module Encoding
469
+ class CompatibilityError < StandardError; end
470
+ end
471
+ end
457
472
  end # class Lexer
458
473
  end # module RDF::Turtle
@@ -13,11 +13,12 @@ module RDF::LL1
13
13
  base.extend(ClassMethods)
14
14
  end
15
15
 
16
+ # DSL for creating terminals and productions
16
17
  module ClassMethods
17
- def production_handlers; @production_handlers || {}; end
18
- def terminal_handlers; @terminal_handlers || {}; end
19
- def patterns; @patterns || []; end
20
- def unescape_terms; @unescape_terms || []; end
18
+ def production_handlers; @@production_handlers || {}; end
19
+ def terminal_handlers; @@terminal_handlers || {}; end
20
+ def patterns; @@patterns || []; end
21
+ def unescape_terms; @@unescape_terms || []; end
21
22
 
22
23
  ##
23
24
  # Defines a production called during different phases of parsing
@@ -42,8 +43,8 @@ module RDF::LL1
42
43
  # Should conform to the yield specs for #initialize
43
44
  # Yield to generate a triple
44
45
  def production(term, &block)
45
- @production_handlers ||= {}
46
- @production_handlers[term] = block
46
+ @@production_handlers ||= {}
47
+ @@production_handlers[term] = block
47
48
  end
48
49
 
49
50
  ##
@@ -72,12 +73,12 @@ module RDF::LL1
72
73
  # Block passed to initialization for yielding to calling reader.
73
74
  # Should conform to the yield specs for #initialize
74
75
  def terminal(term, regexp, options = {}, &block)
75
- @patterns ||= []
76
- @patterns << [term, regexp] # Passed in order to define evaulation sequence
77
- @terminal_handlers ||= {}
78
- @terminal_handlers[term] = block if block_given?
79
- @unescape_terms ||= []
80
- @unescape_terms << term if options[:unescape]
76
+ @@patterns ||= []
77
+ @@patterns << [term, regexp] # Passed in order to define evaulation sequence
78
+ @@terminal_handlers ||= {}
79
+ @@terminal_handlers[term] = block if block_given?
80
+ @@unescape_terms ||= []
81
+ @@unescape_terms << term if options[:unescape]
81
82
  end
82
83
  end
83
84
 
@@ -136,6 +137,8 @@ module RDF::LL1
136
137
  # @param [Hash{Symbol => Object}] options
137
138
  # @option options [Hash{Symbol,String => Hash{Symbol,String => Array<Symbol,String>}}] :branch
138
139
  # LL1 branch table.
140
+ # @option options [HHash{Symbol,String => Array<Symbol,String>}] :first ({})
141
+ # Lists valid terminals that can precede each production (for error recovery).
139
142
  # @option options [HHash{Symbol,String => Array<Symbol,String>}] :follow ({})
140
143
  # Lists valid terminals that can follow each production (for error recovery).
141
144
  # @option options [Boolean] :validate (false)
@@ -156,11 +159,13 @@ module RDF::LL1
156
159
  def parse(input = nil, prod = nil, options = {}, &block)
157
160
  @options = options.dup
158
161
  @branch = options[:branch]
162
+ @first = options[:first] ||= {}
159
163
  @follow = options[:follow] ||= {}
160
164
  @lexer = input.is_a?(Lexer) ? input : Lexer.new(input, self.class.patterns, @options.merge(:unescape_terms => self.class.unescape_terms))
161
165
  @productions = []
162
166
  @parse_callback = block
163
167
  @recovering = false
168
+ @error_log = []
164
169
  terminals = self.class.patterns.map(&:first) # Get defined terminals to help with branching
165
170
 
166
171
  # Unrecoverable errors
@@ -175,57 +180,49 @@ module RDF::LL1
175
180
  pushed = false
176
181
  if todo_stack.last[:terms].nil?
177
182
  todo_stack.last[:terms] = []
178
- begin
179
- token = @lexer.first
180
- rescue RDF::LL1::Lexer::Error => e
181
- # Recover from lexer error
182
- @lineno = e.lineno
183
- error("parse(production)", "With input '#{e.input}': #{e.message}",
184
- :production => @productions.last)
183
+ cur_prod = todo_stack.last[:prod]
185
184
 
186
- # Retrieve next valid token
187
- token = @lexer.recover
188
- end
189
- @lineno = token.lineno if token
185
+ # Get this first valid token appropriate for the stacked productions,
186
+ # skipping invalid tokens until either a valid token is found (from @first),
187
+ # or a token appearing in @follow appears.
188
+ token = skip_until_valid(todo_stack)
189
+
190
+ # At this point, token is either nil, in the first set of the production,
191
+ # or in the follow set of this production or any previous production
190
192
  debug("parse(production)") do
191
- "#{token ? token.representation.inspect : 'nil'}, " +
192
- "prod #{todo_stack.last[:prod].inspect}, " +
193
+ "token #{token ? token.representation.inspect : 'nil'}, " +
194
+ "prod #{cur_prod.inspect}, " +
193
195
  "depth #{depth}"
194
196
  end
195
197
 
196
- # Got an opened production
197
- cur_prod = todo_stack.last[:prod]
198
198
  # Got an opened production
199
199
  onStart(cur_prod)
200
200
  break if token.nil?
201
201
 
202
202
  if prod_branch = @branch[cur_prod]
203
+ @recovering = false
203
204
  sequence = prod_branch[token.representation]
204
205
  debug("parse(production)") do
205
- "#{token.representation.inspect} " +
206
+ "token #{token.representation.inspect} " +
206
207
  "prod #{cur_prod.inspect}, " +
207
208
  "prod_branch #{prod_branch.keys.inspect}, " +
208
209
  "sequence #{sequence.inspect}"
209
210
  end
211
+
210
212
  if sequence.nil?
211
213
  if prod_branch.has_key?(:"ebnf:empty")
212
214
  debug("parse(production)") {"empty sequence for ebnf:empty"}
213
215
  else
214
- expected = prod_branch.keys.map {|v| v.inspect}.join(", ")
215
- error("parse", "expected one of #{expected}",
216
- :production => cur_prod, :token => token)
217
-
218
- # Skip input until we find something that can follow the current production
219
- skip_until_follow(todo_stack)
220
- todo_stack.last[:terms] = []
216
+ # If there is no sequence for this production, we're
217
+ # in error recovery, and _token_ has been advanced to
218
+ # the point where it can reasonably follow this production
221
219
  end
222
220
  end
223
- @recovering = false
224
221
  todo_stack.last[:terms] += sequence if sequence
225
222
  else
226
- error("parse", "No branches found for #{cur_prod.inspect}",
223
+ # Is this a fatal error?
224
+ error("parse(fatal?)", "No branches found for #{cur_prod.inspect}",
227
225
  :production => cur_prod, :token => token)
228
- todo_stack.last[:terms] = []
229
226
  end
230
227
  end
231
228
 
@@ -234,16 +231,15 @@ module RDF::LL1
234
231
  begin
235
232
  # Get the next term in this sequence
236
233
  term = todo_stack.last[:terms].shift
234
+ debug("parse(token)") {"accept #{term.inspect}"}
237
235
  if token = accept(term)
238
- debug("parse(token)") {"#{token.inspect}, term #{term.inspect}"}
239
- @lineno = token.lineno if token
236
+ @recovering = false
237
+ debug("parse(token)") {"token #{token.inspect}, term #{term.inspect}"}
240
238
  onToken(term, token)
241
239
  elsif terminals.include?(term)
242
- error("parse", "#{term.inspect} expected",
243
- :production => todo_stack.last[:prod], :token => @lexer.first)
244
-
245
- # Recover until we find something that can follow this term
246
- skip_until_follow(todo_stack)
240
+ # If term is a terminal, then it is an error of token does not
241
+ # match it
242
+ skip_until_valid(todo_stack)
247
243
  else
248
244
  # If it's not a string (a symbol), it is a non-terminal and we push the new state
249
245
  todo_stack << {:prod => term, :terms => nil}
@@ -251,11 +247,6 @@ module RDF::LL1
251
247
  pushed = true
252
248
  break
253
249
  end
254
- rescue RDF::LL1::Lexer::Error => e
255
- # Skip forward for acceptable lexer input
256
- error("parse", "#{term.inspect} expected: #{e.message}",
257
- :production => todo_stack.last[:prod])
258
- @lexer.recover
259
250
  end
260
251
  end
261
252
 
@@ -282,11 +273,11 @@ module RDF::LL1
282
273
  todo_stack.pop
283
274
  onFinish
284
275
  end
285
-
286
- rescue RDF::LL1::Lexer::Error => e
287
- @lineno = e.lineno
288
- error("parse", "With input '#{e.input}': #{e.message}",
289
- :production => @productions.last)
276
+
277
+ # When all is said and done, raise the error log
278
+ unless @error_log.empty?
279
+ raise Error, @error_log.join("\n\t")
280
+ end
290
281
  end
291
282
 
292
283
  def depth; (@productions || []).length; end
@@ -341,21 +332,55 @@ module RDF::LL1
341
332
  end
342
333
  end
343
334
 
344
- # Skip throught the input stream until something is found that follows the last production with a list of follows
345
- def skip_until_follow(todo_stack)
335
+ # Skip through the input stream until something is found that
336
+ # is either valid based on the content of the production stack,
337
+ # or can follow a production in the stack.
338
+ #
339
+ # @return [Token]
340
+ def skip_until_valid(todo_stack)
341
+ cur_prod = todo_stack.last[:prod]
342
+ token = get_token
343
+ first = @first[cur_prod] || []
344
+
345
+ # If this token can be used by the top production, return it
346
+ # Otherwise, if the banch table allows empty, also return the token
347
+ return token if !@recovering && (
348
+ (@branch[cur_prod] && @branch[cur_prod].has_key?(:"ebnf:empty")) ||
349
+ first.any? {|t| token === t})
350
+
351
+ # Otherwise, it's an error condition, and skip either until
352
+ # we find a valid token for this production, or until we find
353
+ # something that can follow this production
354
+ expected = first.map {|v| v.inspect}.join(", ")
355
+ error("skip_until_valid", "expected one of #{expected}",
356
+ :production => cur_prod, :token => token)
357
+
346
358
  debug("recovery", "stack follows:")
347
- todo_stack.each do |todo|
359
+ todo_stack.reverse.each do |todo|
348
360
  debug("recovery") {" #{todo[:prod]}: #{@follow[todo[:prod]].inspect}"}
349
361
  end
362
+
363
+ # Find all follows to the top of the stack
350
364
  follows = todo_stack.inject([]) do |follow, todo|
351
365
  prod = todo[:prod]
352
366
  follow += @follow[prod] || []
353
367
  end.uniq
354
- progress("recovery") {"first #{@lexer.first.inspect}, follows: #{follows.inspect}"}
355
- while (token = @lexer.first) && follows.none? {|t| token === t}
368
+ debug("recovery") {"follows: #{follows.inspect}"}
369
+
370
+ # Skip tokens until one is found in first or follows
371
+ while (token = get_token) && (first + follows).none? {|t| token === t}
356
372
  skipped = @lexer.shift
357
373
  progress("recovery") {"skip #{skipped.inspect}"}
358
374
  end
375
+ debug("recovery") {"found #{token.inspect}"}
376
+
377
+ # If the token is a first, just return it. Otherwise, it is a follow
378
+ # and we need to skip to the end of the production
379
+ unless first.any? {|t| token == t} || todo_stack.last[:terms].empty?
380
+ debug("recovery") {"token in follows, skip past #{todo_stack.last[:terms].inspect}"}
381
+ todo_stack.last[:terms] = []
382
+ end
383
+ token
359
384
  end
360
385
 
361
386
  # @param [String] str Error string
@@ -363,16 +388,34 @@ module RDF::LL1
363
388
  # @option options [URI, #to_s] :production
364
389
  # @option options [Token] :token
365
390
  def error(node, message, options = {})
366
- return if @recovering
367
- @recovering = true
368
391
  message += ", found #{options[:token].representation.inspect}" if options[:token]
369
392
  message += " at line #{@lineno}" if @lineno
370
- message += ", production = #{options[:production].inspect}" if options[:production] && options[:debug]
371
- if !@options[:validate] && !options[:fatal]
372
- debug(node, message, options)
373
- else
374
- raise Error, message
393
+ message += ", production = #{options[:production].inspect}" if options[:production] && @options[:debug]
394
+ @error_log << message unless @recovering
395
+ @recovering = true
396
+ debug(node, message, options)
397
+ end
398
+
399
+ ##
400
+ # Return the next token, entering error recovery if the token is invalid
401
+ #
402
+ # @return [Token]
403
+ def get_token
404
+ token = begin
405
+ @lexer.first
406
+ rescue RDF::LL1::Lexer::Error => e
407
+ # Recover from lexer error
408
+ @lineno = e.lineno
409
+ error("get_token", "With input '#{e.input}': #{e.message}",
410
+ :production => @productions.last)
411
+
412
+ # Retrieve next valid token
413
+ t = @lexer.recover
414
+ debug("get_token") {"skipped to #{t.inspect}"}
415
+ t
375
416
  end
417
+ @lineno = token.lineno if token
418
+ token
376
419
  end
377
420
 
378
421
  ##
@@ -383,13 +426,18 @@ module RDF::LL1
383
426
  # @option options [Integer] :depth
384
427
  # Recursion depth for indenting output
385
428
  # @yieldreturn [String] added to message
386
- def progress(node, message = "", options = {})
387
- return debug(node, message, options) if @options[:debug]
388
- return unless @options[:progress]
429
+ def progress(node, *args)
430
+ return unless @options[:progress] || @options[:debug]
431
+ options = args.last.is_a?(Hash) ? args.pop : {}
432
+ message = args.join(",")
389
433
  depth = options[:depth] || self.depth
390
- message += yield if block_given?
391
- str = "[#{@lineno}]#{' ' * depth}#{node}: #{message}"
392
- $stderr.puts("[#{@lineno}]#{' ' * depth}#{node}: #{message}")
434
+ message += yield.to_s if block_given?
435
+ if @options[:debug]
436
+ return debug(node, message, options)
437
+ else
438
+ str = "[#{@lineno}]#{' ' * depth}#{node}: #{message}"
439
+ $stderr.puts("[#{@lineno}]#{' ' * depth}#{node}: #{message}")
440
+ end
393
441
  end
394
442
 
395
443
  ##
@@ -416,11 +464,14 @@ module RDF::LL1
416
464
  end
417
465
 
418
466
  ##
467
+ # Accept the first token in the input stream if it matches
468
+ # _type\_or\_value_. Return nil otherwise.
469
+ #
419
470
  # @param [Symbol, String] type_or_value
420
471
  # @return [Token]
421
472
  def accept(type_or_value)
422
- if (token = @lexer.first) && token === type_or_value
423
- debug("accept") {"#{token.inspect} === #{type_or_value}.inspect"}
473
+ if (token = get_token) && token === type_or_value
474
+ debug("accept") {"#{token.inspect} === #{type_or_value.inspect}"}
424
475
  @lexer.shift
425
476
  end
426
477
  end
@@ -20,8 +20,6 @@ module RDF
20
20
  # @author [Gregg Kellogg](http://kellogg-assoc.com/)
21
21
  module Turtle
22
22
  require 'rdf/turtle/format'
23
- require 'rdf/turtle/patches'
24
- autoload :Lexer, 'rdf/turtle/lexer'
25
23
  autoload :Reader, 'rdf/turtle/reader'
26
24
  autoload :Terminals, 'rdf/turtle/terminals'
27
25
  autoload :VERSION, 'rdf/turtle/version'
@@ -36,7 +36,7 @@ module RDF::Turtle
36
36
  # @return [Boolean]
37
37
  def self.detect(sample)
38
38
  !!sample.match(%r(
39
- (?:@(base|prefix|keywords)) | # N3 keywords
39
+ (?:@(base|prefix)) | # Turtle keywords
40
40
  ["']{3} | # STRING_LITERAL_LONG1/2
41
41
  "[^"]*"^^ | "[^"]*"@ | # Typed/Language literals
42
42
  (?:
@@ -44,7 +44,8 @@ module RDF::Turtle
44
44
  (?:\s*(?:(?:<[^>]*>) | (?:\w*:\w+) | (?:"[^"]*"))){3}
45
45
  )
46
46
  )mx) && !(
47
- sample.match(%r(@keywords|=>|\{)) || # N3
47
+ sample.match(%r([{}])) || # TriG
48
+ sample.match(%r(@keywords|=>|\{)) || # N3
48
49
  sample.match(%r(<(?:\/|html|rdf))i) || # HTML, RDF/XML
49
50
  sample.match(%r(^(?:\s*<[^>]*>){4}.*\.\s*$)) || # N-Quads
50
51
  sample.match(%r("@(context|subject|iri)")) # JSON-LD
@@ -5,7 +5,7 @@ module RDF::Turtle::Meta
5
5
 
6
6
  BRANCH = {
7
7
  :"_:_g0" => {
8
- ";" => [:"_:g2164861540"],
8
+ ";" => [:"_:g2156954680"],
9
9
  :"ebnf:empty" => [],
10
10
  },
11
11
  :"_:_g1" => {
@@ -27,7 +27,7 @@ module RDF::Turtle::Meta
27
27
  :PNAME_NS => [:verb, :objectList],
28
28
  },
29
29
  :"_:_g4" => {
30
- "," => [:"_:g2152509620"],
30
+ "," => [:"_:g2153337920"],
31
31
  ";" => [],
32
32
  :"ebnf:empty" => [],
33
33
  },
@@ -35,29 +35,29 @@ module RDF::Turtle::Meta
35
35
  "," => [",", :object],
36
36
  },
37
37
  :"_:_g6" => {
38
- "(" => [:"_:g2169738260"],
39
- "[" => [:"_:g2169738260"],
40
- "false" => [:"_:g2169738260"],
38
+ "(" => [:"_:g2152877000"],
39
+ "[" => [:"_:g2152877000"],
40
+ "false" => [:"_:g2152877000"],
41
41
  :"ebnf:empty" => [],
42
- :ANON => [:"_:g2169738260"],
43
- :BLANK_NODE_LABEL => [:"_:g2169738260"],
44
- :DECIMAL => [:"_:g2169738260"],
45
- :DECIMAL_NEGATIVE => [:"_:g2169738260"],
46
- :DECIMAL_POSITIVE => [:"_:g2169738260"],
47
- :DOUBLE => [:"_:g2169738260"],
48
- :DOUBLE_NEGATIVE => [:"_:g2169738260"],
49
- :DOUBLE_POSITIVE => [:"_:g2169738260"],
50
- :INTEGER => [:"_:g2169738260"],
51
- :INTEGER_NEGATIVE => [:"_:g2169738260"],
52
- :INTEGER_POSITIVE => [:"_:g2169738260"],
53
- :IRI_REF => [:"_:g2169738260"],
54
- :PNAME_LN => [:"_:g2169738260"],
55
- :PNAME_NS => [:"_:g2169738260"],
56
- :STRING_LITERAL1 => [:"_:g2169738260"],
57
- :STRING_LITERAL2 => [:"_:g2169738260"],
58
- :STRING_LITERAL_LONG1 => [:"_:g2169738260"],
59
- :STRING_LITERAL_LONG2 => [:"_:g2169738260"],
60
- "true" => [:"_:g2169738260"],
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"],
61
61
  },
62
62
  :"_:_g7" => {
63
63
  "(" => [],
@@ -91,7 +91,7 @@ module RDF::Turtle::Meta
91
91
  "(" => [],
92
92
  "," => [],
93
93
  "[" => [],
94
- "^^" => [:"_:g2153021180"],
94
+ "^^" => [:"_:g2165812760"],
95
95
  "false" => [],
96
96
  :ANON => [],
97
97
  :BLANK_NODE_LABEL => [],
@@ -114,37 +114,7 @@ module RDF::Turtle::Meta
114
114
  :STRING_LITERAL_LONG2 => [],
115
115
  "true" => [],
116
116
  },
117
- :"_:g2152509620" => {
118
- "," => [:"_:_g5", :"_:_g4"],
119
- ";" => [],
120
- },
121
- :"_:g2153021180" => {
122
- "(" => [],
123
- "," => [],
124
- "[" => [],
125
- "^^" => ["^^", :IRIref],
126
- "false" => [],
127
- :ANON => [],
128
- :BLANK_NODE_LABEL => [],
129
- :DECIMAL => [],
130
- :DECIMAL_NEGATIVE => [],
131
- :DECIMAL_POSITIVE => [],
132
- :DOUBLE => [],
133
- :DOUBLE_NEGATIVE => [],
134
- :DOUBLE_POSITIVE => [],
135
- :INTEGER => [],
136
- :INTEGER_NEGATIVE => [],
137
- :INTEGER_POSITIVE => [],
138
- :IRI_REF => [],
139
- :PNAME_LN => [],
140
- :PNAME_NS => [],
141
- :STRING_LITERAL1 => [],
142
- :STRING_LITERAL2 => [],
143
- :STRING_LITERAL_LONG1 => [],
144
- :STRING_LITERAL_LONG2 => [],
145
- "true" => [],
146
- },
147
- :"_:g2156281440" => {
117
+ :"_:g2152809700" => {
148
118
  "(" => [:triples, "."],
149
119
  "@base" => [],
150
120
  "@prefix" => [],
@@ -155,33 +125,7 @@ module RDF::Turtle::Meta
155
125
  :PNAME_LN => [:triples, "."],
156
126
  :PNAME_NS => [:triples, "."],
157
127
  },
158
- :"_:g2164861540" => {
159
- ";" => [:"_:_g1", :"_:_g0"],
160
- },
161
- :"_:g2165342840" => {
162
- "(" => [],
163
- "@base" => [:directive, "."],
164
- "@prefix" => [:directive, "."],
165
- "[" => [],
166
- :ANON => [],
167
- :BLANK_NODE_LABEL => [],
168
- :IRI_REF => [],
169
- :PNAME_LN => [],
170
- :PNAME_NS => [],
171
- },
172
- :"_:g2169711200" => {
173
- "(" => [:statement, :turtleDoc],
174
- "@base" => [:statement, :turtleDoc],
175
- "@prefix" => [:statement, :turtleDoc],
176
- "[" => [:statement, :turtleDoc],
177
- :"ebnf:eof" => [],
178
- :ANON => [:statement, :turtleDoc],
179
- :BLANK_NODE_LABEL => [:statement, :turtleDoc],
180
- :IRI_REF => [:statement, :turtleDoc],
181
- :PNAME_LN => [:statement, :turtleDoc],
182
- :PNAME_NS => [:statement, :turtleDoc],
183
- },
184
- :"_:g2169738260" => {
128
+ :"_:g2152877000" => {
185
129
  "(" => [:object, :"_:_g6"],
186
130
  "[" => [:object, :"_:_g6"],
187
131
  "false" => [:object, :"_:_g6"],
@@ -205,6 +149,62 @@ module RDF::Turtle::Meta
205
149
  :STRING_LITERAL_LONG2 => [:object, :"_:_g6"],
206
150
  "true" => [:object, :"_:_g6"],
207
151
  },
152
+ :"_:g2153010700" => {
153
+ "(" => [],
154
+ "@base" => [:directive, "."],
155
+ "@prefix" => [:directive, "."],
156
+ "[" => [],
157
+ :ANON => [],
158
+ :BLANK_NODE_LABEL => [],
159
+ :IRI_REF => [],
160
+ :PNAME_LN => [],
161
+ :PNAME_NS => [],
162
+ },
163
+ :"_:g2153337920" => {
164
+ "," => [:"_:_g5", :"_:_g4"],
165
+ ";" => [],
166
+ },
167
+ :"_:g2156954680" => {
168
+ ";" => [:"_:_g1", :"_:_g0"],
169
+ },
170
+ :"_:g2165682600" => {
171
+ "(" => [:statement, :turtleDoc],
172
+ "@base" => [:statement, :turtleDoc],
173
+ "@prefix" => [:statement, :turtleDoc],
174
+ "[" => [:statement, :turtleDoc],
175
+ :"ebnf:eof" => [],
176
+ :ANON => [:statement, :turtleDoc],
177
+ :BLANK_NODE_LABEL => [:statement, :turtleDoc],
178
+ :IRI_REF => [:statement, :turtleDoc],
179
+ :PNAME_LN => [:statement, :turtleDoc],
180
+ :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
208
  :BASE => {
209
209
  "@base" => ["@base"],
210
210
  },
@@ -641,15 +641,15 @@ module RDF::Turtle::Meta
641
641
  "@prefix" => [:PREFIX, :PNAME_NS, :IRI_REF],
642
642
  },
643
643
  :statement => {
644
- "(" => [:"_:g2156281440"],
645
- "@base" => [:"_:g2165342840"],
646
- "@prefix" => [:"_:g2165342840"],
647
- "[" => [:"_:g2156281440"],
648
- :ANON => [:"_:g2156281440"],
649
- :BLANK_NODE_LABEL => [:"_:g2156281440"],
650
- :IRI_REF => [:"_:g2156281440"],
651
- :PNAME_LN => [:"_:g2156281440"],
652
- :PNAME_NS => [:"_:g2156281440"],
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"],
653
653
  },
654
654
  :subject => {
655
655
  "(" => [:blank],
@@ -671,17 +671,17 @@ module RDF::Turtle::Meta
671
671
  :PNAME_NS => [:subject, :predicateObjectList],
672
672
  },
673
673
  :turtleDoc => {
674
- "(" => [:"_:g2169711200"],
675
- "@base" => [:"_:g2169711200"],
676
- "@prefix" => [:"_:g2169711200"],
677
- "[" => [:"_:g2169711200"],
674
+ "(" => [:"_:g2165682600"],
675
+ "@base" => [:"_:g2165682600"],
676
+ "@prefix" => [:"_:g2165682600"],
677
+ "[" => [:"_:g2165682600"],
678
678
  :"ebnf:empty" => [],
679
679
  :"ebnf:eof" => [],
680
- :ANON => [:"_:g2169711200"],
681
- :BLANK_NODE_LABEL => [:"_:g2169711200"],
682
- :IRI_REF => [:"_:g2169711200"],
683
- :PNAME_LN => [:"_:g2169711200"],
684
- :PNAME_NS => [:"_:g2169711200"],
680
+ :ANON => [:"_:g2165682600"],
681
+ :BLANK_NODE_LABEL => [:"_:g2165682600"],
682
+ :IRI_REF => [:"_:g2165682600"],
683
+ :PNAME_LN => [:"_:g2165682600"],
684
+ :PNAME_NS => [:"_:g2165682600"],
685
685
  },
686
686
  :verb => {
687
687
  "(" => [],
@@ -743,30 +743,27 @@ module RDF::Turtle::Meta
743
743
  :STRING_LITERAL_LONG2,
744
744
  "true"
745
745
  ].freeze
746
- FOLLOW = {
747
- "." => [
748
- "(",
749
- "@base",
750
- "@prefix",
751
- "[",
752
- :ANON,
753
- :BLANK_NODE_LABEL,
754
- :IRI_REF,
755
- :PNAME_LN,
756
- :PNAME_NS],
746
+ FIRST = {
747
+ :"_:_g0" => [
748
+ ";"],
757
749
  :"_:_g1" => [
758
750
  ";"],
759
751
  :"_:_g2" => [
760
- ";"],
752
+ "a",
753
+ :IRI_REF,
754
+ :PNAME_LN,
755
+ :PNAME_NS],
761
756
  :"_:_g3" => [
762
- ";"],
757
+ "a",
758
+ :IRI_REF,
759
+ :PNAME_LN,
760
+ :PNAME_NS],
763
761
  :"_:_g4" => [
764
- ";"],
762
+ ","],
765
763
  :"_:_g5" => [
766
764
  ","],
767
- :"_:_g7" => [
765
+ :"_:_g6" => [
768
766
  "(",
769
- ",",
770
767
  "[",
771
768
  "false",
772
769
  "true",
@@ -788,9 +785,19 @@ module RDF::Turtle::Meta
788
785
  :STRING_LITERAL2,
789
786
  :STRING_LITERAL_LONG1,
790
787
  :STRING_LITERAL_LONG2],
788
+ :"_:_g7" => [
789
+ "^^",
790
+ :LANGTAG],
791
791
  :"_:_g8" => [
792
+ "^^",
793
+ :LANGTAG],
794
+ :"_:g2152346260" => [
795
+ "a",
796
+ :IRI_REF,
797
+ :PNAME_LN,
798
+ :PNAME_NS],
799
+ :"_:g2152446700" => [
792
800
  "(",
793
- ",",
794
801
  "[",
795
802
  "false",
796
803
  "true",
@@ -812,11 +819,130 @@ module RDF::Turtle::Meta
812
819
  :STRING_LITERAL2,
813
820
  :STRING_LITERAL_LONG1,
814
821
  :STRING_LITERAL_LONG2],
815
- :"_:g2152509620" => [
816
- ";"],
817
- :"_:g2153021180" => [
822
+ :"_:g2152796420" => [
823
+ "a",
824
+ :IRI_REF,
825
+ :PNAME_LN,
826
+ :PNAME_NS],
827
+ :"_:g2152809700" => [
828
+ "(",
829
+ "[",
830
+ :ANON,
831
+ :BLANK_NODE_LABEL,
832
+ :IRI_REF,
833
+ :PNAME_LN,
834
+ :PNAME_NS],
835
+ :"_:g2152877000" => [
836
+ "(",
837
+ "[",
838
+ "false",
839
+ "true",
840
+ :ANON,
841
+ :BLANK_NODE_LABEL,
842
+ :DECIMAL,
843
+ :DECIMAL_NEGATIVE,
844
+ :DECIMAL_POSITIVE,
845
+ :DOUBLE,
846
+ :DOUBLE_NEGATIVE,
847
+ :DOUBLE_POSITIVE,
848
+ :INTEGER,
849
+ :INTEGER_NEGATIVE,
850
+ :INTEGER_POSITIVE,
851
+ :IRI_REF,
852
+ :PNAME_LN,
853
+ :PNAME_NS,
854
+ :STRING_LITERAL1,
855
+ :STRING_LITERAL2,
856
+ :STRING_LITERAL_LONG1,
857
+ :STRING_LITERAL_LONG2],
858
+ :"_:g2152903680" => [
859
+ "(",
860
+ "[",
861
+ "false",
862
+ "true",
863
+ :ANON,
864
+ :BLANK_NODE_LABEL,
865
+ :DECIMAL,
866
+ :DECIMAL_NEGATIVE,
867
+ :DECIMAL_POSITIVE,
868
+ :DOUBLE,
869
+ :DOUBLE_NEGATIVE,
870
+ :DOUBLE_POSITIVE,
871
+ :INTEGER,
872
+ :INTEGER_NEGATIVE,
873
+ :INTEGER_POSITIVE,
874
+ :IRI_REF,
875
+ :PNAME_LN,
876
+ :PNAME_NS,
877
+ :STRING_LITERAL1,
878
+ :STRING_LITERAL2,
879
+ :STRING_LITERAL_LONG1,
880
+ :STRING_LITERAL_LONG2],
881
+ :"_:g2153010700" => [
882
+ "@base",
883
+ "@prefix"],
884
+ :"_:g2153124700" => [
885
+ "(",
886
+ "[",
887
+ "false",
888
+ "true",
889
+ :ANON,
890
+ :BLANK_NODE_LABEL,
891
+ :DECIMAL,
892
+ :DECIMAL_NEGATIVE,
893
+ :DECIMAL_POSITIVE,
894
+ :DOUBLE,
895
+ :DOUBLE_NEGATIVE,
896
+ :DOUBLE_POSITIVE,
897
+ :INTEGER,
898
+ :INTEGER_NEGATIVE,
899
+ :INTEGER_POSITIVE,
900
+ :IRI_REF,
901
+ :PNAME_LN,
902
+ :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,
912
+ :PNAME_LN,
913
+ :PNAME_NS],
914
+ :"_:g2153658980" => [
915
+ "(",
916
+ "[",
917
+ "false",
918
+ "true",
919
+ :ANON,
920
+ :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,
931
+ :PNAME_LN,
932
+ :PNAME_NS,
933
+ :STRING_LITERAL1,
934
+ :STRING_LITERAL2,
935
+ :STRING_LITERAL_LONG1,
936
+ :STRING_LITERAL_LONG2],
937
+ :"_:g2156398800" => [
938
+ :IRI_REF,
939
+ :PNAME_LN,
940
+ :PNAME_NS],
941
+ :"_:g2156472020" => [
942
+ "^^",
943
+ :LANGTAG],
944
+ :"_:g2156771960" => [
818
945
  "(",
819
- ",",
820
946
  "[",
821
947
  "false",
822
948
  "true",
@@ -838,7 +964,13 @@ module RDF::Turtle::Meta
838
964
  :STRING_LITERAL2,
839
965
  :STRING_LITERAL_LONG1,
840
966
  :STRING_LITERAL_LONG2],
841
- :"_:g2156281440" => [
967
+ :"_:g2156954680" => [
968
+ ";"],
969
+ :"_:g2164414260" => [
970
+ ","],
971
+ :"_:g2164800240" => [
972
+ ";"],
973
+ :"_:g2165021300" => [
842
974
  "(",
843
975
  "@base",
844
976
  "@prefix",
@@ -848,7 +980,7 @@ module RDF::Turtle::Meta
848
980
  :IRI_REF,
849
981
  :PNAME_LN,
850
982
  :PNAME_NS],
851
- :"_:g2165342840" => [
983
+ :"_:g2165682600" => [
852
984
  "(",
853
985
  "@base",
854
986
  "@prefix",
@@ -858,8 +990,303 @@ module RDF::Turtle::Meta
858
990
  :IRI_REF,
859
991
  :PNAME_LN,
860
992
  :PNAME_NS],
861
- :"_:g2169711200" => [
862
- :"ebnf:eof"],
993
+ :"_:g2165812760" => [
994
+ "^^"],
995
+ :BASE => [
996
+ "@base"],
997
+ :BlankNode => [
998
+ :ANON,
999
+ :BLANK_NODE_LABEL],
1000
+ :BooleanLiteral => [
1001
+ "false",
1002
+ "true"],
1003
+ :IRIref => [
1004
+ :IRI_REF,
1005
+ :PNAME_LN,
1006
+ :PNAME_NS],
1007
+ :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
+ :DECIMAL,
1027
+ :DOUBLE,
1028
+ :INTEGER],
1029
+ :PREFIX => [
1030
+ "@prefix"],
1031
+ :PrefixedName => [
1032
+ :PNAME_LN,
1033
+ :PNAME_NS],
1034
+ :RDFLiteral => [
1035
+ :STRING_LITERAL1,
1036
+ :STRING_LITERAL2,
1037
+ :STRING_LITERAL_LONG1,
1038
+ :STRING_LITERAL_LONG2],
1039
+ :String => [
1040
+ :STRING_LITERAL1,
1041
+ :STRING_LITERAL2,
1042
+ :STRING_LITERAL_LONG1,
1043
+ :STRING_LITERAL_LONG2],
1044
+ :base => [
1045
+ "@base"],
1046
+ :blank => [
1047
+ "(",
1048
+ "[",
1049
+ :ANON,
1050
+ :BLANK_NODE_LABEL],
1051
+ :blankNodePropertyList => [
1052
+ "["],
1053
+ :collection => [
1054
+ "("],
1055
+ :directive => [
1056
+ "@base",
1057
+ "@prefix"],
1058
+ :literal => [
1059
+ "false",
1060
+ "true",
1061
+ :DECIMAL,
1062
+ :DECIMAL_NEGATIVE,
1063
+ :DECIMAL_POSITIVE,
1064
+ :DOUBLE,
1065
+ :DOUBLE_NEGATIVE,
1066
+ :DOUBLE_POSITIVE,
1067
+ :INTEGER,
1068
+ :INTEGER_NEGATIVE,
1069
+ :INTEGER_POSITIVE,
1070
+ :STRING_LITERAL1,
1071
+ :STRING_LITERAL2,
1072
+ :STRING_LITERAL_LONG1,
1073
+ :STRING_LITERAL_LONG2],
1074
+ :object => [
1075
+ "(",
1076
+ "[",
1077
+ "false",
1078
+ "true",
1079
+ :ANON,
1080
+ :BLANK_NODE_LABEL,
1081
+ :DECIMAL,
1082
+ :DECIMAL_NEGATIVE,
1083
+ :DECIMAL_POSITIVE,
1084
+ :DOUBLE,
1085
+ :DOUBLE_NEGATIVE,
1086
+ :DOUBLE_POSITIVE,
1087
+ :INTEGER,
1088
+ :INTEGER_NEGATIVE,
1089
+ :INTEGER_POSITIVE,
1090
+ :IRI_REF,
1091
+ :PNAME_LN,
1092
+ :PNAME_NS,
1093
+ :STRING_LITERAL1,
1094
+ :STRING_LITERAL2,
1095
+ :STRING_LITERAL_LONG1,
1096
+ :STRING_LITERAL_LONG2],
1097
+ :objectList => [
1098
+ "(",
1099
+ "[",
1100
+ "false",
1101
+ "true",
1102
+ :ANON,
1103
+ :BLANK_NODE_LABEL,
1104
+ :DECIMAL,
1105
+ :DECIMAL_NEGATIVE,
1106
+ :DECIMAL_POSITIVE,
1107
+ :DOUBLE,
1108
+ :DOUBLE_NEGATIVE,
1109
+ :DOUBLE_POSITIVE,
1110
+ :INTEGER,
1111
+ :INTEGER_NEGATIVE,
1112
+ :INTEGER_POSITIVE,
1113
+ :IRI_REF,
1114
+ :PNAME_LN,
1115
+ :PNAME_NS,
1116
+ :STRING_LITERAL1,
1117
+ :STRING_LITERAL2,
1118
+ :STRING_LITERAL_LONG1,
1119
+ :STRING_LITERAL_LONG2],
1120
+ :predicate => [
1121
+ :IRI_REF,
1122
+ :PNAME_LN,
1123
+ :PNAME_NS],
1124
+ :predicateObjectList => [
1125
+ "a",
1126
+ :IRI_REF,
1127
+ :PNAME_LN,
1128
+ :PNAME_NS],
1129
+ :prefixID => [
1130
+ "@prefix"],
1131
+ :statement => [
1132
+ "(",
1133
+ "@base",
1134
+ "@prefix",
1135
+ "[",
1136
+ :ANON,
1137
+ :BLANK_NODE_LABEL,
1138
+ :IRI_REF,
1139
+ :PNAME_LN,
1140
+ :PNAME_NS],
1141
+ :subject => [
1142
+ "(",
1143
+ "[",
1144
+ :ANON,
1145
+ :BLANK_NODE_LABEL,
1146
+ :IRI_REF,
1147
+ :PNAME_LN,
1148
+ :PNAME_NS],
1149
+ :triples => [
1150
+ "(",
1151
+ "[",
1152
+ :ANON,
1153
+ :BLANK_NODE_LABEL,
1154
+ :IRI_REF,
1155
+ :PNAME_LN,
1156
+ :PNAME_NS],
1157
+ :turtleDoc => [
1158
+ "(",
1159
+ "@base",
1160
+ "@prefix",
1161
+ "[",
1162
+ :ANON,
1163
+ :BLANK_NODE_LABEL,
1164
+ :IRI_REF,
1165
+ :PNAME_LN,
1166
+ :PNAME_NS],
1167
+ :verb => [
1168
+ "a",
1169
+ :IRI_REF,
1170
+ :PNAME_LN,
1171
+ :PNAME_NS],
1172
+ }.freeze
1173
+ FOLLOW = {
1174
+ "." => [
1175
+ "(",
1176
+ "@base",
1177
+ "@prefix",
1178
+ "[",
1179
+ :ANON,
1180
+ :BLANK_NODE_LABEL,
1181
+ :IRI_REF,
1182
+ :PNAME_LN,
1183
+ :PNAME_NS],
1184
+ :"_:_g1" => [
1185
+ ";"],
1186
+ :"_:_g2" => [
1187
+ ";"],
1188
+ :"_:_g3" => [
1189
+ ";"],
1190
+ :"_:_g4" => [
1191
+ ";"],
1192
+ :"_:_g5" => [
1193
+ ","],
1194
+ :"_:_g7" => [
1195
+ "(",
1196
+ ",",
1197
+ "[",
1198
+ "false",
1199
+ "true",
1200
+ :ANON,
1201
+ :BLANK_NODE_LABEL,
1202
+ :DECIMAL,
1203
+ :DECIMAL_NEGATIVE,
1204
+ :DECIMAL_POSITIVE,
1205
+ :DOUBLE,
1206
+ :DOUBLE_NEGATIVE,
1207
+ :DOUBLE_POSITIVE,
1208
+ :INTEGER,
1209
+ :INTEGER_NEGATIVE,
1210
+ :INTEGER_POSITIVE,
1211
+ :IRI_REF,
1212
+ :PNAME_LN,
1213
+ :PNAME_NS,
1214
+ :STRING_LITERAL1,
1215
+ :STRING_LITERAL2,
1216
+ :STRING_LITERAL_LONG1,
1217
+ :STRING_LITERAL_LONG2],
1218
+ :"_:_g8" => [
1219
+ "(",
1220
+ ",",
1221
+ "[",
1222
+ "false",
1223
+ "true",
1224
+ :ANON,
1225
+ :BLANK_NODE_LABEL,
1226
+ :DECIMAL,
1227
+ :DECIMAL_NEGATIVE,
1228
+ :DECIMAL_POSITIVE,
1229
+ :DOUBLE,
1230
+ :DOUBLE_NEGATIVE,
1231
+ :DOUBLE_POSITIVE,
1232
+ :INTEGER,
1233
+ :INTEGER_NEGATIVE,
1234
+ :INTEGER_POSITIVE,
1235
+ :IRI_REF,
1236
+ :PNAME_LN,
1237
+ :PNAME_NS,
1238
+ :STRING_LITERAL1,
1239
+ :STRING_LITERAL2,
1240
+ :STRING_LITERAL_LONG1,
1241
+ :STRING_LITERAL_LONG2],
1242
+ :"_:g2152809700" => [
1243
+ "(",
1244
+ "@base",
1245
+ "@prefix",
1246
+ "[",
1247
+ :ANON,
1248
+ :BLANK_NODE_LABEL,
1249
+ :IRI_REF,
1250
+ :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" => [
1263
+ ";"],
1264
+ :"_:g2165682600" => [
1265
+ :"ebnf:eof"],
1266
+ :"_:g2165812760" => [
1267
+ "(",
1268
+ ",",
1269
+ "[",
1270
+ "false",
1271
+ "true",
1272
+ :ANON,
1273
+ :BLANK_NODE_LABEL,
1274
+ :DECIMAL,
1275
+ :DECIMAL_NEGATIVE,
1276
+ :DECIMAL_POSITIVE,
1277
+ :DOUBLE,
1278
+ :DOUBLE_NEGATIVE,
1279
+ :DOUBLE_POSITIVE,
1280
+ :INTEGER,
1281
+ :INTEGER_NEGATIVE,
1282
+ :INTEGER_POSITIVE,
1283
+ :IRI_REF,
1284
+ :PNAME_LN,
1285
+ :PNAME_NS,
1286
+ :STRING_LITERAL1,
1287
+ :STRING_LITERAL2,
1288
+ :STRING_LITERAL_LONG1,
1289
+ :STRING_LITERAL_LONG2],
863
1290
  "a" => [
864
1291
  "(",
865
1292
  "[",