lib/sparql/grammar/parser11.rb in sparql-3.2.0 vs lib/sparql/grammar/parser11.rb in sparql-3.2.1

- old
+ new

@@ -195,11 +195,11 @@ # Productions # [2] Query ::= Prologue # ( SelectQuery | ConstructQuery | DescribeQuery | AskQuery ) production(:Query) do |input, data, callback| - query = data[:query].first + query = data[:query].first if data[:query] # Add prefix if data[:PrefixDecl] pfx = data[:PrefixDecl].shift data[:PrefixDecl].each {|p| pfx.merge!(p)} @@ -804,11 +804,11 @@ end end # [70] FunctionCall ::= iri ArgList production(:FunctionCall) do |input, data, callback| - add_prod_data(:Function, Array(data[:iri]) + data[:ArgList]) + add_prod_data(:Function, SPARQL::Algebra::Operator::FunctionCall.new(data[:iri], *data[:ArgList])) end # [71] ArgList ::= NIL # | '(' 'DISTINCT'? Expression ( ',' Expression )* ')' production(:ArgList) do |input, data, callback| @@ -1435,10 +1435,10 @@ # [128] iriOrFunction ::= iri ArgList? production(:iriOrFunction) do |input, data, callback| if data.has_key?(:ArgList) # Function is (func arg1 arg2 ...) - add_prod_data(:Function, Array(data[:iri]) + data[:ArgList]) + add_prod_data(:Function, SPARQL::Algebra::Operator::FunctionCall.new(data[:iri], *data[:ArgList])) else input[:iri] = data[:iri] end end