Skip to content

Commit d55975e

Browse files
committed
more fixes
1 parent c80b2fe commit d55975e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/sparql.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5616,7 +5616,7 @@ private function yy_reduce(
56165616
case 422:
56175617
case 423:
56185618
#line 641 "sparql.y"
5619-
{ $yygotominor = new NTToken(); $yygotominor->copyBools($this->yystack[$this->yyidx + 0]->minor); $yygotominor->ssVars = $this->yystack[$this->yyidx + -1]->minor->ssVars; $yygotominor->vars = $this->yystack[$this->yyidx + 0]->minor->vars; $yygotominor->bNodes = $this->yystack[$this->yyidx + 0]->minor->bNodes; $yygotominor->query = $this->yystack[$this->yyidx + -1]->minor->query . ' ' $this->yystack[$this->yyidx + 0]->minor->query; }
5619+
{ $yygotominor = new NTToken(); $yygotominor->copyBools($this->yystack[$this->yyidx + 0]->minor); $yygotominor->ssVars = $this->yystack[$this->yyidx + -1]->minor->ssVars; $yygotominor->vars = $this->yystack[$this->yyidx + 0]->minor->vars; $yygotominor->bNodes = $this->yystack[$this->yyidx + 0]->minor->bNodes; $yygotominor->query = $this->yystack[$this->yyidx + -1]->minor->query . ' ' . $this->yystack[$this->yyidx + 0]->minor->query; }
56205620
#line 5418 "sparql.php"
56215621
break;
56225622
case 426:
@@ -5670,7 +5670,7 @@ private function yy_reduce(
56705670
break;
56715671
case 452:
56725672
#line 675 "sparql.y"
5673-
{ $yygotominor = new NTToken(); $yygotominor->copyBools($this->yystack[$this->yyidx + -3]->minor); copyBools($this->yystack[$this->yyidx + -1]->minor) $yygotominor->vars = $this->yystack[$this->yyidx + -3]->minor->vars + $this->yystack[$this->yyidx + -1]->minor->vars; $yygotominor->bNodes = $this->yystack[$this->yyidx + -3]->minor->bNodes + $this->yystack[$this->yyidx + -1]->minor->bNodes; $yygotominor->query = 'LANGMATCHES( ' . $this->yystack[$this->yyidx + -3]->minor->query . ', ' . $this->yystack[$this->yyidx + -1]->minor->query . ' )'; }
5673+
{ $yygotominor = new NTToken(); $yygotominor->copyBools($this->yystack[$this->yyidx + -3]->minor); $yygotominor->copyBools($this->yystack[$this->yyidx + -1]->minor); $yygotominor->vars = $this->yystack[$this->yyidx + -3]->minor->vars + $this->yystack[$this->yyidx + -1]->minor->vars; $yygotominor->bNodes = $this->yystack[$this->yyidx + -3]->minor->bNodes + $this->yystack[$this->yyidx + -1]->minor->bNodes; $yygotominor->query = 'LANGMATCHES( ' . $this->yystack[$this->yyidx + -3]->minor->query . ', ' . $this->yystack[$this->yyidx + -1]->minor->query . ' )'; }
56745674
#line 5472 "sparql.php"
56755675
break;
56765676
case 453:
@@ -5690,7 +5690,7 @@ private function yy_reduce(
56905690
break;
56915691
case 456:
56925692
#line 679 "sparql.y"
5693-
{ $yygotominor = new NTToken(); $yygotominor->hasBN = true; $yygotominor->copyBools($this->yystack[$this->yyidx + -1]->minor); $yygotominor->vars = $this->yystack[$this->yyidx + -1]->minor->vars; $yygotominor->bNodes[$this->yystack[$this->yyidx + -1]->minor->query] = 1; $yygotominor->addBNodes($this->yystack[$this->yyidx + -1]->minor->bNodes); $yygotominor->query = 'BNODE( ' $this->yystack[$this->yyidx + -1]->minor->query; ' )'; }
5693+
{ $yygotominor = new NTToken(); $yygotominor->hasBN = true; $yygotominor->copyBools($this->yystack[$this->yyidx + -1]->minor); $yygotominor->vars = $this->yystack[$this->yyidx + -1]->minor->vars; $yygotominor->bNodes[$this->yystack[$this->yyidx + -1]->minor->query] = 1; $yygotominor->addBNodes($this->yystack[$this->yyidx + -1]->minor->bNodes); $yygotominor->query = 'BNODE( ' . $this->yystack[$this->yyidx + -1]->minor->query . ' )'; }
56945694
#line 5492 "sparql.php"
56955695
break;
56965696
case 457:
@@ -5985,7 +5985,7 @@ private function yy_reduce(
59855985
break;
59865986
case 517:
59875987
#line 746 "sparql.y"
5988-
{ $yygotominor = new NTToken(); $yygotominor->hasAGG = true; $yygotominor->query = 'SAMPLE( DISTINCT ' . $this->yystack[$this->yyidx + -1]->minor->query . ' )'; $yygotominor->copyBools($this->yystack[$this->yyidx + -1]->minor); $yygotominor->vars = $this->yystack[$this->yyidx + -1]->minor->vars; $yygotominor->bNodes = $this->yystack[$this->yyidx + -1]->minor->bNodes); }
5988+
{ $yygotominor = new NTToken(); $yygotominor->hasAGG = true; $yygotominor->query = 'SAMPLE( DISTINCT ' . $this->yystack[$this->yyidx + -1]->minor->query . ' )'; $yygotominor->copyBools($this->yystack[$this->yyidx + -1]->minor); $yygotominor->vars = $this->yystack[$this->yyidx + -1]->minor->vars; $yygotominor->bNodes = $this->yystack[$this->yyidx + -1]->minor->bNodes; }
59895989
#line 5787 "sparql.php"
59905990
break;
59915991
case 518:

resource/sparql.y

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ additiveExpressionX(A) ::= additiveExpressionX(B) numericLiteralPositive(C). { A
638638
additiveExpressionX(A) ::= additiveExpressionX(B) numericLiteralNegative(C). { A = new NTToken(); A->copyBools(B); A->ssVars = B->ssVars; A->vars = B->vars; A->bNodes = B->bNodes; A->query = B->query . ' ' . C->query; }
639639
additiveExpressionX(A) ::= additiveExpressionX(B) PLUS multiplicativeExpression(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . ' + ' . C->query; }
640640
additiveExpressionX(A) ::= additiveExpressionX(B) MINUS multiplicativeExpression(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . ' - ' . C->query; }
641-
additiveExpressionX(A) ::= numericLiteralPositive(B) additiveExpressionY(C). { A = new NTToken(); A->copyBools(C); A->ssVars = B->ssVars; A->vars = C->vars; A->bNodes = C->bNodes; A->query = B->query . ' ' C->query; }
641+
additiveExpressionX(A) ::= numericLiteralPositive(B) additiveExpressionY(C). { A = new NTToken(); A->copyBools(C); A->ssVars = B->ssVars; A->vars = C->vars; A->bNodes = C->bNodes; A->query = B->query . ' ' . C->query; }
642642
additiveExpressionX(A) ::= numericLiteralNegative(B) additiveExpressionY(C). { A = new NTToken(); A->copyBools(C); A->ssVars = B->ssVars; A->vars = C->vars; A->bNodes = C->bNodes; A->query = B->query . ' ' C->query; }
643643
additiveExpressionX(A) ::= numericLiteralPositive(B). { A = new NTToken(); A->query = B->query; }
644644
additiveExpressionX(A) ::= numericLiteralNegative(B). { A = new NTToken(); A->query = B->query; }
@@ -672,11 +672,11 @@ builtInCall(A) ::= existsFunc(B). { A = new NTToken(); A->copyBools(B); A->ssVar
672672
builtInCall(A) ::= notExistsFunc(B). { A = new NTToken(); A->copyBools(B); A->ssVars = B->ssVars; A->vars = B->vars; A->bNodes = B->bNodes; A->query = B->query; }
673673
builtInCall(A) ::= STR LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; A->query = 'STR( ' . B->query . ' )'; }
674674
builtInCall(A) ::= LANG LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; A->query = 'STR( ' . B->query . ' )'; }
675-
builtInCall(A) ::= LANGMATCHES LPARENTHESE expression(B) COMMA expression(C) RPARENTHESE. { A = new NTToken(); A->copyBools(B); copyBools(C) A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = 'LANGMATCHES( ' . B->query . ', ' . C->query . ' )'; }
675+
builtInCall(A) ::= LANGMATCHES LPARENTHESE expression(B) COMMA expression(C) RPARENTHESE. { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = 'LANGMATCHES( ' . B->query . ', ' . C->query . ' )'; }
676676
builtInCall(A) ::= DATATYPE LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; A->query = 'DATATYPE( ' . B->query . ' )'; }
677677
builtInCall(A) ::= BOUND LPARENTHESE var(B) RPARENTHESE. { A = new NTToken(); A->vars = B->vars; A->query = 'BOUND( ' . B->query . ' )'; }
678678
builtInCall(A) ::= URI LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; A->query = 'URI( ' . B->query . ' )'; }
679-
builtInCall(A) ::= BNODE LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->hasBN = true; A->copyBools(B); A->vars = B->vars; A->bNodes[B->query] = 1; A->addBNodes(B->bNodes); A->query = 'BNODE( ' B->query; ' )'; }
679+
builtInCall(A) ::= BNODE LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->hasBN = true; A->copyBools(B); A->vars = B->vars; A->bNodes[B->query] = 1; A->addBNodes(B->bNodes); A->query = 'BNODE( ' . B->query . ' )'; }
680680
builtInCall(A) ::= BNODE NIL. { A = new NTToken(); A->hasBN = true; A->query = 'BNODE( )'; }
681681
builtInCall(A) ::= RAND NIL. { A = new NTToken(); A->query = 'RAND( )'; }
682682
builtInCall(A) ::= ABS LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; A->query = 'ABS(' . B->query . ' )'; }
@@ -743,7 +743,7 @@ aggregate(A) ::= SUM LPARENTHESE DISTINCT expression(B) RPARENTHESE. { A = new N
743743
aggregate(A) ::= MIN LPARENTHESE DISTINCT expression(B) RPARENTHESE. { A = new NTToken(); A->hasAGG = true; A->query = 'MIN( DISTINCT ' . B->query . ' )'; A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; }
744744
aggregate(A) ::= MAX LPARENTHESE DISTINCT expression(B) RPARENTHESE. { A = new NTToken(); A->hasAGG = true; A->query = 'MAX( DISTINCT ' . B->query . ' )'; A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; }
745745
aggregate(A) ::= AVG LPARENTHESE DISTINCT expression(B) RPARENTHESE. { A = new NTToken(); A->hasAGG = true; A->query = 'AVG( DISTINCT ' . B->query . ' )'; A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; }
746-
aggregate(A) ::= SAMPLE LPARENTHESE DISTINCT expression(B) RPARENTHESE. { A = new NTToken(); A->hasAGG = true; A->query = 'SAMPLE( DISTINCT ' . B->query . ' )'; A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes); }
746+
aggregate(A) ::= SAMPLE LPARENTHESE DISTINCT expression(B) RPARENTHESE. { A = new NTToken(); A->hasAGG = true; A->query = 'SAMPLE( DISTINCT ' . B->query . ' )'; A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; }
747747
aggregate(A) ::= SUM LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->hasAGG = true; A->query = 'SUM( ' . B->query . ' )'; A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; }
748748
aggregate(A) ::= MIN LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->hasAGG = true; A->query = 'MIN( ' . B->query . ' )'; A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; }
749749
aggregate(A) ::= MAX LPARENTHESE expression(B) RPARENTHESE. { A = new NTToken(); A->hasAGG = true; A->query = 'MAX( ' . B->query . ' )'; A->copyBools(B); A->vars = B->vars; A->bNodes = B->bNodes; }

0 commit comments

Comments
 (0)