lib/rdf/turtle/reader.rb in rdf-turtle-1.1.8.1 vs lib/rdf/turtle/reader.rb in rdf-turtle-1.99.0

- old
+ new

@@ -281,11 +281,11 @@ when :BASE prod(:base) do @lexer.shift terminated = token.value == '@base' iri = @lexer.shift - error("Expected IRIREF", :production => :base, token: iri) unless iri === :IRIREF + error("Expected IRIREF", production: :base, token: iri) unless iri === :IRIREF @options[:base_uri] = process_iri(iri) error("base", "#{token} should be downcased") if token.value.start_with?('@') && token.value != '@base' if terminated error("base", "Expected #{token} to be terminated") unless @lexer.first === '.' @@ -299,12 +299,12 @@ when :PREFIX prod(:prefixID, %w{.}) do @lexer.shift pfx, iri = @lexer.shift, @lexer.shift terminated = token.value == '@prefix' - error("Expected PNAME_NS", :production => :prefix, token: pfx) unless pfx === :PNAME_NS - error("Expected IRIREF", :production => :prefix, token: iri) unless iri === :IRIREF + error("Expected PNAME_NS", production: :prefix, token: pfx) unless pfx === :PNAME_NS + error("Expected IRIREF", production: :prefix, token: iri) unless iri === :IRIREF debug("prefixID") {"Defined prefix #{pfx.inspect} mapping to #{iri.inspect}"} prefix(pfx.value[0..-2], process_iri(iri)) error("prefixId", "#{token} should be downcased") if token.value.start_with?('@') && token.value != '@prefix' if terminated @@ -523,17 +523,17 @@ token: e.token) rescue SyntaxError end end raise EOFError, "End of input found when recovering" if @lexer.first.nil? - debug("recovery", "current token: #{@lexer.first.inspect}", :level => 4) + debug("recovery", "current token: #{@lexer.first.inspect}", level: 4) unless e.is_a?(Recovery) # Get the list of follows for this sequence, this production and the stacked productions. - debug("recovery", "stack follows:", :level => 4) + debug("recovery", "stack follows:", level: 4) @prod_stack.reverse.each do |prod| - debug("recovery", :level => 4) {" #{prod[:prod]}: #{prod[:recover_to].inspect}"} + debug("recovery", level: 4) {" #{prod[:prod]}: #{prod[:recover_to].inspect}"} end end # Find all follows to the top of the stack follows = @prod_stack.map {|prod| Array(prod[:recover_to])}.flatten.compact.uniq @@ -570,10 +570,10 @@ m += "[line: #{@lineno}] " if @lineno m += message m += " (found #{options[:token].inspect})" if options[:token] m += ", production = #{options[:production].inspect}" if options[:production] @warnings << m unless @recovering - debug(node, m, options.merge(:level => 1)) + debug(node, m, options.merge(level: 1)) end ## # Error information, used as level `0` debug messages. #