operators: document exact precedenc, split up similar operators
This commit is contained in:
		
							parent
							
								
									f435634a29
								
							
						
					
					
						commit
						92ddce4f46
					
				
					 1 changed files with 95 additions and 8 deletions
				
			
		|  | @ -15,13 +15,16 @@ weakest binding).</para> | |||
|   <tgroup cols='3'> | ||||
|     <thead> | ||||
|       <row> | ||||
|         <entry>Name</entry> | ||||
|         <entry>Syntax</entry> | ||||
|         <entry>Associativity</entry> | ||||
|         <entry>Description</entry> | ||||
|         <entry>Precedence</entry> | ||||
|       </row> | ||||
|     </thead> | ||||
|     <tbody> | ||||
|       <row> | ||||
|         <entry>Select</entry> | ||||
|         <entry><replaceable>e</replaceable> <literal>.</literal> | ||||
|         <replaceable>attrpath</replaceable> | ||||
|         [ <literal>or</literal> <replaceable>def</replaceable> ] | ||||
|  | @ -33,19 +36,25 @@ weakest binding).</para> | |||
|         dot-separated list of attribute names.)  If the attribute | ||||
|         doesn’t exist, return <replaceable>def</replaceable> if | ||||
|         provided, otherwise abort evaluation.</entry> | ||||
|         <entry>1</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Application</entry> | ||||
|         <entry><replaceable>e1</replaceable> <replaceable>e2</replaceable></entry> | ||||
|         <entry>left</entry> | ||||
|         <entry>Call function <replaceable>e1</replaceable> with | ||||
|         argument <replaceable>e2</replaceable>.</entry> | ||||
|         <entry>2</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Arithmetic Negation</entry> | ||||
|         <entry><literal>-</literal> <replaceable>e</replaceable></entry> | ||||
|         <entry>none</entry> | ||||
|         <entry>Arithmetic negation.</entry> | ||||
|         <entry>3</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Has Attribute</entry> | ||||
|         <entry><replaceable>e</replaceable> <literal>?</literal> | ||||
|         <replaceable>attrpath</replaceable></entry> | ||||
|         <entry>none</entry> | ||||
|  | @ -53,34 +62,69 @@ weakest binding).</para> | |||
|         the attribute denoted by <replaceable>attrpath</replaceable>; | ||||
|         return <literal>true</literal> or | ||||
|         <literal>false</literal>.</entry> | ||||
|         <entry>4</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>List Concatenation</entry> | ||||
|         <entry><replaceable>e1</replaceable> <literal>++</literal> <replaceable>e2</replaceable></entry> | ||||
|         <entry>right</entry> | ||||
|         <entry>List concatenation.</entry> | ||||
|         <entry>5</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Multiplication</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal>*</literal> <replaceable>e2</replaceable>, | ||||
|         </entry> | ||||
|         <entry>left</entry> | ||||
|         <entry>Arithmetic multiplication.</entry> | ||||
|         <entry>6</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Division</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal>/</literal> <replaceable>e2</replaceable> | ||||
|         </entry> | ||||
|         <entry>left</entry> | ||||
|         <entry>Arithmetic multiplication and division.</entry> | ||||
|         <entry>Arithmetic division.</entry> | ||||
|         <entry>6</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Addition</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal>+</literal> <replaceable>e2</replaceable> | ||||
|         </entry> | ||||
|         <entry>left</entry> | ||||
|         <entry>Arithmetic addition.</entry> | ||||
|         <entry>7</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Subtraction</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal>+</literal> <replaceable>e2</replaceable>, | ||||
|           <replaceable>e1</replaceable> <literal>-</literal> <replaceable>e2</replaceable> | ||||
|         </entry> | ||||
|         <entry>left</entry> | ||||
|         <entry>Arithmetic addition and subtraction.  String or path concatenation (only by <literal>+</literal>).</entry> | ||||
|         <entry>Arithmetic subtraction.</entry> | ||||
|         <entry>7</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>String Concatenation</entry> | ||||
|         <entry> | ||||
|           <replaceable>string1</replaceable> <literal>+</literal> <replaceable>string2</replaceable> | ||||
|         </entry> | ||||
|         <entry>left</entry> | ||||
|         <entry>String concatenation.</entry> | ||||
|         <entry>7</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Not</entry> | ||||
|         <entry><literal>!</literal> <replaceable>e</replaceable></entry> | ||||
|         <entry>none</entry> | ||||
|         <entry>Boolean negation.</entry> | ||||
|         <entry>8</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Update</entry> | ||||
|         <entry><replaceable>e1</replaceable> <literal>//</literal> | ||||
|         <replaceable>e2</replaceable></entry> | ||||
|         <entry>right</entry> | ||||
|  | @ -89,47 +133,90 @@ weakest binding).</para> | |||
|         <replaceable>e2</replaceable> (with the latter taking | ||||
|         precedence over the former in case of equally named | ||||
|         attributes).</entry> | ||||
|         <entry>9</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Less Than</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal><</literal> <replaceable>e2</replaceable>, | ||||
|           <replaceable>e1</replaceable> <literal>></literal> <replaceable>e2</replaceable>, | ||||
|           <replaceable>e1</replaceable> <literal><=</literal> <replaceable>e2</replaceable>, | ||||
|         </entry> | ||||
|         <entry>none</entry> | ||||
|         <entry>Arithmetic comparison.</entry> | ||||
|         <entry>10</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Less Than or Equal To</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal><=</literal> <replaceable>e2</replaceable> | ||||
|         </entry> | ||||
|         <entry>none</entry> | ||||
|         <entry>Arithmetic comparison.</entry> | ||||
|         <entry>10</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Greater Than</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal>></literal> <replaceable>e2</replaceable> | ||||
|         </entry> | ||||
|         <entry>none</entry> | ||||
|         <entry>Arithmetic comparison.</entry> | ||||
|         <entry>10</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Greater Than or Equal To</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal>>=</literal> <replaceable>e2</replaceable> | ||||
|         </entry> | ||||
|         <entry>none</entry> | ||||
|         <entry>Arithmetic comparison.</entry> | ||||
|         <entry>10</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Equality</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal>==</literal> <replaceable>e2</replaceable> | ||||
|         </entry> | ||||
|         <entry>none</entry> | ||||
|         <entry>Equality.</entry> | ||||
|         <entry>11</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Inequality</entry> | ||||
|         <entry> | ||||
|           <replaceable>e1</replaceable> <literal>==</literal> <replaceable>e2</replaceable>, | ||||
|           <replaceable>e1</replaceable> <literal>!=</literal> <replaceable>e2</replaceable> | ||||
|         </entry> | ||||
|         <entry>none</entry> | ||||
|         <entry>Equality and inequality.</entry> | ||||
|         <entry>Inequality.</entry> | ||||
|         <entry>11</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Logical And</entry> | ||||
|         <entry><replaceable>e1</replaceable> <literal>&&</literal> | ||||
|         <replaceable>e2</replaceable></entry> | ||||
|         <entry>left</entry> | ||||
|         <entry>Logical AND.</entry> | ||||
|         <entry>12</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Logical Or</entry> | ||||
|         <entry><replaceable>e1</replaceable> <literal>||</literal> | ||||
|         <replaceable>e2</replaceable></entry> | ||||
|         <entry>left</entry> | ||||
|         <entry>Logical OR.</entry> | ||||
|         <entry>13</entry> | ||||
|       </row> | ||||
|       <row> | ||||
|         <entry>Logical Implication</entry> | ||||
|         <entry><replaceable>e1</replaceable> <literal>-></literal> | ||||
|         <replaceable>e2</replaceable></entry> | ||||
|         <entry>none</entry> | ||||
|         <entry>Logical implication (equivalent to | ||||
|         <literal>!<replaceable>e1</replaceable> || | ||||
|         <replaceable>e2</replaceable></literal>).</entry> | ||||
|         <entry>14</entry> | ||||
|       </row> | ||||
|     </tbody> | ||||
|   </tgroup> | ||||
| </table> | ||||
| 
 | ||||
| </section> | ||||
| </section> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue