Skip to content

Commit 47cffd3

Browse files
committed
more php code
1 parent 3caa831 commit 47cffd3

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

resource/sparql.y

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -164,43 +164,43 @@ subSelect(A) ::= selectClause(B) whereclause(C) solutionModifier(D).
164164
subSelect(A) ::= selectClause(B) whereclause(C).
165165

166166

167-
selectClause(A) ::= SELECT DISTINCT selectClauseX(B).
168-
selectClause(A) ::= SELECT REDUCED selectClauseX(B).
169-
selectClause(A) ::= SELECT STAR selectClauseX(B).
170-
selectClause(A) ::= SELECT DISTINCT STAR.
171-
selectClause(A) ::= SELECT REDUCED STAR.
172-
selectClause(A) ::= SELECT selectClauseX(B).
173-
selectClause(A) ::= SELECT STAR.
174-
selectClauseX(A) ::= selectClauseX(B) LPARENTHESE expression(C) AS var(D) RPARENTHESE.
175-
selectClauseX(A) ::= selectClauseX(B) LPARENTHESE expression(C) RPARENTHESE.
176-
selectClauseX(A) ::= selectClauseX(B) builtInCall(C).
177-
selectClauseX(A) ::= selectClauseX(B) rdfLiteral(C).
178-
selectClauseX(A) ::= selectClauseX(B) numericLiteral(C).
179-
selectClauseX(A) ::= selectClauseX(B) booleanLiteral(C).
180-
selectClauseX(A) ::= selectClauseX(B) var(C).
181-
selectClauseX(A) ::= selectClauseX(B) functionCall(C).
182-
selectClauseX(A) ::= LPARENTHESE expression(B) AS var(C) RPARENTHESE.
183-
selectClauseX(A) ::= LPARENTHESE expression(B) RPARENTHESE.
184-
selectClauseX(A) ::= builtInCall(B).
185-
selectClauseX(A) ::= rdfLiteral(B).
186-
selectClauseX(A) ::= numericLiteral(B).
187-
selectClauseX(A) ::= booleanLiteral(B).
188-
selectClauseX(A) ::= var(B).
189-
selectClauseX(A) ::= functionCall(B).
190-
191-
constructQuery(A) ::= CONSTRUCT LBRACE triplesTemplate(B) RBRACE datasetClauseX(C) whereclause(D) solutionModifier(E).
192-
constructQuery(A) ::= CONSTRUCT LBRACE RBRACE datasetClauseX(C) whereclause(D) solutionModifier(E).
193-
constructQuery(A) ::= CONSTRUCT datasetClauseX(B) WHERE LBRACE triplesTemplate(C) RBRACE solutionModifier(D).
194-
constructQuery(A) ::= CONSTRUCT datasetClauseX(B) WHERE LBRACE RBRACE solutionModifier(C).
195-
constructQuery(A) ::= CONSTRUCT LBRACE triplesTemplate(B) RBRACE whereclause(C) solutionModifier(D).
196-
constructQuery(A) ::= CONSTRUCT LBRACE RBRACE whereclause(C) solutionModifier(D).
197-
constructQuery(A) ::= CONSTRUCT LBRACE triplesTemplate(B) RBRACE whereclause(C).
198-
constructQuery(A) ::= CONSTRUCT LBRACE RBRACE whereclause(C).
199-
constructQuery(A) ::= CONSTRUCT LBRACE triplesTemplate(B) RBRACE datasetClauseX(C) whereclause(D).
200-
constructQuery(A) ::= CONSTRUCT LBRACE RBRACE datasetClauseX(C) whereclause(D).
201-
constructQuery(A) ::= CONSTRUCT datasetClauseX(B) WHERE LBRACE triplesTemplate(C) RBRACE.
202-
constructQuery(A) ::= CONSTRUCT datasetClauseX(B) WHERE LBRACE RBRACE.
203-
constructQuery(A) ::= CONSTRUCT WHERE LBRACE triplesTemplate(B) RBRACE solutionModifier(C).
167+
selectClause(A) ::= SELECT DISTINCT selectClauseX(B). { A = B; A->query = 'SELECT DISTINCT' . B->query}
168+
selectClause(A) ::= SELECT REDUCED selectClauseX(B). { A = B; A->query = 'SELECT REDUCED' . B->query}
169+
selectClause(A) ::= SELECT STAR selectClauseX(B). { A = B; A->query = 'SELECT *' . B->query}
170+
selectClause(A) ::= SELECT DISTINCT STAR. 'SELECT DISTINCT *'; }
171+
selectClause(A) ::= SELECT REDUCED STAR. 'SELECT REDUCED *'; }
172+
selectClause(A) ::= SELECT selectClauseX(B). { A = B; A->query = 'SELECT ' . B->query}
173+
selectClause(A) ::= SELECT STAR. { A = B; A->query = 'SELECT *'; }
174+
selectClauseX(A) ::= selectClauseX(B) LPARENTHESE expression(C) AS var(D) RPARENTHESE. { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . PHP_EOL . '( ' . C->query . ' AS ' . C->query . ' )'; }
175+
selectClauseX(A) ::= selectClauseX(B) LPARENTHESE expression(C) RPARENTHESE. { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . PHP_EOL . '( ' . C->query . ' )'; }
176+
selectClauseX(A) ::= selectClauseX(B) builtInCall(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . PHP_EOL . C->query; }
177+
selectClauseX(A) ::= selectClauseX(B) rdfLiteral(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . PHP_EOL . C->query; }
178+
selectClauseX(A) ::= selectClauseX(B) numericLiteral(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . PHP_EOL . C->query; }
179+
selectClauseX(A) ::= selectClauseX(B) booleanLiteral(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . PHP_EOL . C->query; }
180+
selectClauseX(A) ::= selectClauseX(B) var(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . PHP_EOL . C->query; }
181+
selectClauseX(A) ::= selectClauseX(B) functionCall(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = B->query . PHP_EOL . C->query; }
182+
selectClauseX(A) ::= LPARENTHESE expression(B) AS var(C) RPARENTHESE. { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = '( ' . B->query . ' AS ' . C->query . ' )'; }
183+
selectClauseX(A) ::= LPARENTHESE expression(B) RPARENTHESE. { A = B; A->query = '( ' . B->query . ' )'; }
184+
selectClauseX(A) ::= builtInCall(B). { A = B; }
185+
selectClauseX(A) ::= rdfLiteral(B). { A = B; }
186+
selectClauseX(A) ::= numericLiteral(B). { A = B; }
187+
selectClauseX(A) ::= booleanLiteral(B). { A = B; }
188+
selectClauseX(A) ::= var(B). { A = B; }
189+
selectClauseX(A) ::= functionCall(B). { A = B; }
190+
191+
constructQuery(A) ::= CONSTRUCT LBRACE triplesTemplate(B) RBRACE datasetClauseX(C) whereclause(D) solutionModifier(E). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->copyBools(D); A->ssVars = B->ssVars + C->ssVars + D->ssVars; A->vars = B->vars + C->vars + D->vars; A->bNodes = B->bNodes + C->bNodes + D->bNodes; A->query = 'CONSTRUCT' . PHP_EOL . '{' . PHP_EOL . B->query . PHP_EOL . '}' . PHP_EOL. C->query . PHP_EOL . D->query . PHP_EOL . E->query; }
192+
constructQuery(A) ::= CONSTRUCT LBRACE RBRACE datasetClauseX(B) whereclause(C) solutionModifier(D). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->copyBools(D); A->ssVars = B->ssVars + C->ssVars + D->ssVars; A->vars = B->vars + C->vars + D->vars; A->bNodes = B->bNodes + C->bNodes + D->bNodes; A->query = 'CONSTRUCT { }' . PHP_EOL . B->query . PHP_EOL. C->query . PHP_EOL . D->query; }
193+
constructQuery(A) ::= CONSTRUCT datasetClauseX(B) WHERE LBRACE triplesTemplate(C) RBRACE solutionModifier(D). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->copyBools(D); A->ssVars = B->ssVars + C->ssVars + D->ssVars; A->vars = B->vars + C->vars + D->vars; A->bNodes = B->bNodes + C->bNodes + D->bNodes; A->query = 'CONSTRUCT' . PHP_EOL . B->query . PHP_EOL . 'WHERE' . PHP_EOL . '{' . PHP_EOL . C->query . PHP_EOL . '}' . PHP_EOL. D->query; }
194+
constructQuery(A) ::= CONSTRUCT datasetClauseX(B) WHERE LBRACE RBRACE solutionModifier(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = 'CONSTRUCT' . PHP_EOL . B->query . PHP_EOL ' WHERE' . PHP_EOL . '{' . PHP_EOL . B->query . PHP_EOL . '}' . PHP_EOL . C->query; }
195+
constructQuery(A) ::= CONSTRUCT LBRACE triplesTemplate(B) RBRACE whereclause(C) solutionModifier(D). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->copyBools(D); A->ssVars = B->ssVars + C->ssVars + D->ssVars; A->vars = B->vars + C->vars + D->vars; A->bNodes = B->bNodes + C->bNodes + D->bNodes; A->query = 'CONSTRUCT {' . PHP_EOL . B->query . PHP_EOL . '}' . PHP_EOL. C->query . PHP_EOL . D->query; }
196+
constructQuery(A) ::= CONSTRUCT LBRACE RBRACE whereclause(B) solutionModifier(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = 'CONSTRUCT { }' . PHP_EOL . B->query . PHP_EOL . C->query; }
197+
constructQuery(A) ::= CONSTRUCT LBRACE triplesTemplate(B) RBRACE whereclause(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = 'CONSTRUCT {' . PHP_EOL . B->query . PHP_EOL . '}' . PHP_EOL . C->query; }
198+
constructQuery(A) ::= CONSTRUCT LBRACE RBRACE whereclause(B). { A = B; A->query = 'CONSTRUCT { }' . PHP_EOL B->query; }
199+
constructQuery(A) ::= CONSTRUCT LBRACE triplesTemplate(B) RBRACE datasetClauseX(C) whereclause(D). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->copyBools(D); A->ssVars = B->ssVars + C->ssVars + D->ssVars; A->vars = B->vars + C->vars + D->vars; A->bNodes = B->bNodes + C->bNodes + D->bNodes; A->query = 'CONSTRUCT {' . PHP_EOL . B->query . PHP_EOL . '}' . PHP_EOL. C->query . PHP_EOL . D->query; }
200+
constructQuery(A) ::= CONSTRUCT LBRACE RBRACE datasetClauseX(B) whereclause(C).{ A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = 'CONSTRUCT { }' . PHP_EOL . B->query . PHP_EOL . C->query; }
201+
constructQuery(A) ::= CONSTRUCT datasetClauseX(B) WHERE LBRACE triplesTemplate(C) RBRACE. { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = 'CONSTRUCT' . PHP_EOL . B->query . PHP_EOL . 'WHERE {' . PHP_EOL . C->query . PHP_EOL . '}'; }
202+
constructQuery(A) ::= CONSTRUCT datasetClauseX(B) WHERE LBRACE RBRACE. { A = B; A->query = 'CONSTRUCT' . PHP_EOL . B->query . 'WHERE { }'; }
203+
constructQuery(A) ::= CONSTRUCT WHERE LBRACE triplesTemplate(B) RBRACE solutionModifier(C). { A = new NTToken(); A->copyBools(B); A->copyBools(C); A->ssVars = B->ssVars + C->ssVars; A->vars = B->vars + C->vars; A->bNodes = B->bNodes + C->bNodes; A->query = 'CONSTRUCT WHERE {' . PHP_EOL . B->query . PHP_EOL . '}' . PHP_EOL . C->query; }
204204
constructQuery(A) ::= CONSTRUCT WHERE LBRACE RBRACE solutionModifier(B). { A = B; A->query = 'CONSTRUCT WHERE { }' . PHP_EOL . B->query; }
205205
constructQuery(A) ::= CONSTRUCT WHERE LBRACE triplesTemplate(B) RBRACE. { A = B; A->query = 'CONSTRUCT WHERE {' . PHP_EOL B->query . PHP_EOL . '}'; }
206206
constructQuery(A) ::= CONSTRUCT WHERE LBRACE RBRACE. { A = new NTToken(); A->query = 'CONSTRUCT WHERE { }'; }

0 commit comments

Comments
 (0)