| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- | |
| Copyright (c) 2008, 2010 SAP AG. | |
| All rights reserved. This program and the accompanying materials | |
| are made available under the terms of the Eclipse Public License 2.0 | |
| which accompanies this distribution, and is available at | |
| https://www.eclipse.org/legal/epl-2.0/ | |
| SPDX-License-Identifier: EPL-2.0 | |
| Contributors: | |
| SAP AG - initial API and implementation | |
| --> | |
| <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd" > | |
| <reference id="ref_bnfofoql" xml:lang="en-us"> | |
| <title>BNF for the Object Query Language</title> | |
| <prolog> | |
| <copyright> | |
| <copyryear year=""></copyryear> | |
| <copyrholder> | |
| Copyright (c) 2008, 2010 SAP AG and others. | |
| All rights reserved. This program and the accompanying materials | |
| are made available under the terms of the Eclipse Public License 2.0 | |
| which accompanies this distribution, and is available at | |
| https://www.eclipse.org/legal/epl-2.0/ | |
| </copyrholder> | |
| </copyright> | |
| </prolog> | |
| <refbody> | |
| <section> | |
| <simpletable id="oql_table"> | |
| <strow> | |
| <stentry><codeblock>SelectStatement</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>"SELECT" SelectList FromClause ( WhereClause )? ( UnionClause )?</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>SelectList</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>(( "DISTINCT" | "AS RETAINED SET" )? ( "*" | "OBJECTS" SelectItem | SelectItem ( "," SelectItem )* ))</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>SelectItem</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( PathExpression | EnvVarPathExpression ) ( "AS" ( <STRING_LITERAL> | <IDENTIFIER> ) )?</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>PathExpression</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( ObjectFacet | BuiltInFunction ) ( "." ObjectFacet | "[" SimpleExpression ( ":" SimpleExpression)? "]" )*</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>EnvVarPathExpression</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( "$" "{" <IDENTIFIER> "}" ) ( "." ObjectFacet | "[" SimpleExpression ( ":" SimpleExpression)? "]" )*</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>ObjectFacet</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( ( "@" )? <IDENTIFIER> ( ParameterList )? )</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>ParameterList</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>"(" ( ( SimpleExpression ( "," SimpleExpression )* ) )? ")"</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>FromClause</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>"FROM" ( "OBJECTS" )? ( "INSTANCEOF" )? ( FromItem | "(" SelectStatement ")" ) ( <IDENTIFIER> )?</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>FromItem</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( ClassName | <STRING_LITERAL> | ObjectAddress ( "," ObjectAddress )* | ObjectId ( "," ObjectId )* | EnvVarPathExpression )</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>ClassName</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( <IDENTIFIER> ( "." <IDENTIFIER> )* ( "[]" )* )</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>ObjectAddress</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock><HEX_LITERAL></codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>ObjectId</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock><INTEGER_LITERAL></codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>WhereClause</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>"WHERE" ConditionalOrExpression</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>ConditionalOrExpression</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>ConditionalAndExpression ( "or" ConditionalAndExpression )*</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>ConditionalAndExpression</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>EqualityExpression ( "and" EqualityExpression )*</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>EqualityExpression</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>RelationalExpression ( ( "=" RelationalExpression | "!=" RelationalExpression ) )*</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>RelationalExpression</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( SimpleExpression ( ( "<" SimpleExpression | ">" SimpleExpression | "<=" SimpleExpression | ">=" SimpleExpression | ( LikeClause | InClause ) | "implements" ClassName ) )? )</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>LikeClause</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( "NOT" )? "LIKE" <STRING_LITERAL></codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>InClause</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( "NOT" )? "IN" SimpleExpression</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>SimpleExpression</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>MultiplicativeExpression ( "+" MultiplicativeExpression | "-" MultiplicativeExpression )*</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>MultiplicativeExpression</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>PrimaryExpression ( "*" PrimaryExpression | "/" PrimaryExpression )*</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>PrimaryExpression</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>Literal</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock> </codeblock></stentry> | |
| <stentry><codeblock>|</codeblock></stentry> | |
| <stentry><codeblock>"(" ( ConditionalOrExpression | SubQuery ) ")</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock> </codeblock></stentry> | |
| <stentry><codeblock>|</codeblock></stentry> | |
| <stentry><codeblock>PathExpression</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock> </codeblock></stentry> | |
| <stentry><codeblock>|</codeblock></stentry> | |
| <stentry><codeblock>EnvVarPathExpression</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>SubQuery</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>SelectStatement</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>Function</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( ( "toHex" | "toString" | "dominators" | "outbounds" | "inbounds" | "classof" | "dominatorof" ) "(" ConditionalOrExpression ")" )</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>Literal</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( <INTEGER_LITERAL> | <LONG_LITERAL> | <FLOATING_POINT_LITERAL> | <CHARACTER_LITERAL> | <STRING_LITERAL> | BooleanLiteral | NullLiteral )</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>BooleanLiteral</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>"true"</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock> </codeblock></stentry> | |
| <stentry><codeblock>|</codeblock></stentry> | |
| <stentry><codeblock>"false"</codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>NullLiteral</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock><NULL></codeblock></stentry> | |
| </strow> | |
| <strow> | |
| <stentry><codeblock>UnionClause</codeblock></stentry> | |
| <stentry><codeblock>::=</codeblock></stentry> | |
| <stentry><codeblock>( "UNION" "(" SelectStatement ")" )+</codeblock></stentry> | |
| </strow> | |
| </simpletable> | |
| </section> | |
| </refbody> | |
| </reference> |