Expression format

The format of an expression is given.

The format of an expression is as follows:


KEY:

something_like_this                is a token
something_in_italics is a terminal, that is, does not break down any further
|         is a choice between tokens
[         is an optional part of the construction
"XXX"     is a literal token (that is, use XXX not
          including the quotes)  
=================================================
expression ::=    function_call | 
      variable_name | 
   other_name | 
   constant |
   unary_expression | 
   binary_expression | 
   if_then_else_expression |
   substring_expression |
   "(" expression ")"

function_call ::= function_name "(" [argument_list] ")"
argument_list ::= expression | expression "," argument_list
function_name ::=    name of a built-in function | 
   name of a user-defined_function
variable_name ::=       job_parameter name | 
      stage_variable_name |
      link_variable name
other_name ::=    name of a built-in macro, system variable, and so on.
constant ::= numeric_constant | string_constant 
numeric_constant ::= ["+" | "-"] digits ["." [digits]] ["E" | "e" ["+" | "-"] digits]
string_constant ::=    "'" [characters] "'" |
   """ [characters] """ |
   "\" [characters] "\"
unary_expression ::= unary_operator expression
unary_operator ::= "+" | "-"
binary_expression ::= expression binary_operator expression 
binary_operator ::=    arithmetic_operator |
   concatenation_operator |
   matches_operator |
   relational_operator |
   logical_operator
arithmetic_operator ::= "+" | "-" | "*" | "/" | "^"
concatenation_operator ::= ":"
relational_operator ::=    "   =" |"EQ" | 
      "<>" | "#" | "NE" |
      ">" | "GT" |
      ">=" | "=>" | "GE" |
      "<" | "LT" |
      "<=" | "=<" | "LE" 
logical_operator ::= "AND" | "OR"    
if_then_else_expression ::= "IF" expression "THEN" expression "ELSE" expression 
substring_expression ::= expression "[" [expression ["," expression] "]"
field_expression ::=    expression "[" expression "," 
   expression "," 
   expression "]"
         /*    That is, always 3 args
Note: keywords like "AND" or "IF" or "EQ" might be in any case