===
For loop : Comma separated assignment expressions enclosed in parenthesis
===

for (($i = 0), ($j = 0); $i -lt 10; $i++)
{
    "$i:$i"
    "$j:$j"
}

---

(program
  (statement_list
    (for_statement
      (for_initializer
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (array_literal_expression
                            (unary_expression
                              (parenthesized_expression
                                (pipeline
                                  (assignment_expression
                                    (left_assignment_expression
                                      (logical_expression
                                        (bitwise_expression
                                          (comparison_expression
                                            (additive_expression
                                              (multiplicative_expression
                                                (format_expression
                                                  (range_expression
                                                    (array_literal_expression
                                                      (unary_expression
                                                        (variable)))))))))))
                                    (assignement_operator)
                                    (pipeline
                                      (logical_expression
                                        (bitwise_expression
                                          (comparison_expression
                                            (additive_expression
                                              (multiplicative_expression
                                                (format_expression
                                                  (range_expression
                                                    (array_literal_expression
                                                      (unary_expression
                                                        (integer_literal
                                                          (decimal_integer_literal)))))))))))))))))
                          (unary_expression
                            (parenthesized_expression
                              (pipeline
                                (assignment_expression
                                  (left_assignment_expression
                                    (logical_expression
                                      (bitwise_expression
                                        (comparison_expression
                                          (additive_expression
                                            (multiplicative_expression
                                              (format_expression
                                                (range_expression
                                                  (array_literal_expression
                                                    (unary_expression
                                                      (variable)))))))))))
                                  (assignement_operator)
                                  (pipeline
                                    (logical_expression
                                      (bitwise_expression
                                        (comparison_expression
                                          (additive_expression
                                            (multiplicative_expression
                                              (format_expression
                                                (range_expression
                                                  (array_literal_expression
                                                    (unary_expression
                                                      (integer_literal
                                                        (decimal_integer_literal))))))))))))))))))))))))))
      (for_condition
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (variable))))))))
                (comparison_operator)
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (integer_literal
                              (decimal_integer_literal)))))))))))))
      (for_iterator
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (post_increment_expression
                              (variable)))))))))))))
      (statement_block
        (statement_list
          (pipeline
            (logical_expression
              (bitwise_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (string_literal
                                (expandable_string_literal
                                  (variable)
                                  (variable)))))))))))))
          (pipeline
            (logical_expression
              (bitwise_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (string_literal
                                (expandable_string_literal
                                  (variable)
                                  (variable))))))))))))))))))

===
For loop : Sub-expression using the semicolon to separate statements
===

for ($($i = 0;$j = 0); $i -lt 10; $i++)
{
    "`$i:$i"
    "`$j:$j"
}

---

(program
  (statement_list
    (for_statement
      (for_initializer
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (sub_expression
                              (statement_list
                                (pipeline
                                  (assignment_expression
                                    (left_assignment_expression
                                      (logical_expression
                                        (bitwise_expression
                                          (comparison_expression
                                            (additive_expression
                                              (multiplicative_expression
                                                (format_expression
                                                  (range_expression
                                                    (array_literal_expression
                                                      (unary_expression
                                                        (variable)))))))))))
                                    (assignement_operator)
                                    (pipeline
                                      (logical_expression
                                        (bitwise_expression
                                          (comparison_expression
                                            (additive_expression
                                              (multiplicative_expression
                                                (format_expression
                                                  (range_expression
                                                    (array_literal_expression
                                                      (unary_expression
                                                        (integer_literal
                                                          (decimal_integer_literal))))))))))))))
                                (empty_statement)
                                (pipeline
                                  (assignment_expression
                                    (left_assignment_expression
                                      (logical_expression
                                        (bitwise_expression
                                          (comparison_expression
                                            (additive_expression
                                              (multiplicative_expression
                                                (format_expression
                                                  (range_expression
                                                    (array_literal_expression
                                                      (unary_expression
                                                        (variable)))))))))))
                                    (assignement_operator)
                                    (pipeline
                                      (logical_expression
                                        (bitwise_expression
                                          (comparison_expression
                                            (additive_expression
                                              (multiplicative_expression
                                                (format_expression
                                                  (range_expression
                                                    (array_literal_expression
                                                      (unary_expression
                                                        (integer_literal
                                                          (decimal_integer_literal)))))))))))))))))))))))))))
      (for_condition
        (pipeline
          (logical_expression
            (bitwise_expression 
              (comparison_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (variable))))))))
                (comparison_operator)
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (integer_literal
                              (decimal_integer_literal)))))))))))))
      (for_iterator
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (post_increment_expression
                              (variable)))))))))))))
      (statement_block
        (statement_list
          (pipeline
            (logical_expression
              (bitwise_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (string_literal
                                (expandable_string_literal
                                  (variable)))))))))))))
          (pipeline
            (logical_expression
              (bitwise_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (string_literal
                                (expandable_string_literal
                                  (variable))))))))))))))))))

===
For loop : Minimum
===

$i = 1
for (;;)
{
    Write-Host $i
}

---

(program
  (statement_list
    (pipeline
      (assignment_expression
        (left_assignment_expression
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (variable)))))))))))
        (assignement_operator)
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (integer_literal
                              (decimal_integer_literal))))))))))))))
    (for_statement
      (statement_block
        (statement_list
          (pipeline
            (command
              (command_name)
              (command_elements
                (command_argument_sep)
                (variable)))))))))

===
For loop : Increment
===

$i=1
for (;;$i++)
{
    Write-Host $i
}

---

(program
  (statement_list
    (pipeline
      (assignment_expression
        (left_assignment_expression
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (variable)))))))))))
        (assignement_operator)
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (integer_literal
                              (decimal_integer_literal))))))))))))))
    (for_statement
      (for_iterator
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (post_increment_expression
                              (variable)))))))))))))
      (statement_block
        (statement_list
          (pipeline
            (command
              (command_name)
              (command_elements
                (command_argument_sep)
                (variable)))))))))

===
For loop : Increment and condition
===

$i=1
for(;$i -le 10;$i++)
{
    Write-Host $i
}

---

(program
  (statement_list
    (pipeline
      (assignment_expression
        (left_assignment_expression
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (variable)))))))))))
        (assignement_operator)
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (integer_literal
                              (decimal_integer_literal))))))))))))))
    (for_statement
      (for_condition
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (variable))))))))
                (comparison_operator)
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (integer_literal
                              (decimal_integer_literal)))))))))))))
      (for_iterator
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (post_increment_expression
                              (variable)))))))))))))
      (statement_block
        (statement_list
          (pipeline
            (command
              (command_name)
              (command_elements
                (command_argument_sep)
                (variable)))))))))

===
For loop : all
===

for($i=1; $i -le 10; $i++){Write-Host $i}

---

(program
  (statement_list
    (for_statement
      (for_initializer
        (pipeline
          (assignment_expression
            (left_assignment_expression
              (logical_expression
                (bitwise_expression
                  (comparison_expression
                    (additive_expression
                      (multiplicative_expression
                        (format_expression
                          (range_expression
                            (array_literal_expression
                              (unary_expression
                                (variable)))))))))))
            (assignement_operator)
            (pipeline
              (logical_expression
                (bitwise_expression
                  (comparison_expression
                    (additive_expression
                      (multiplicative_expression
                        (format_expression
                          (range_expression
                            (array_literal_expression
                              (unary_expression
                                (integer_literal
                                  (decimal_integer_literal)))))))))))))))
      (for_condition
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (variable))))))))
                (comparison_operator)
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (integer_literal
                              (decimal_integer_literal)))))))))))))
      (for_iterator
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (post_increment_expression
                              (variable)))))))))))))
      (statement_block
        (statement_list
          (pipeline
            (command
              (command_name)
              (command_elements
                (command_argument_sep)
                (variable)))))))))

===
For loop : all without ; as statement terminator
===

for ($i = 0
  $i -lt 10
  $i++){
  $i
}

---

(program
  (statement_list
    (for_statement
      (for_initializer
        (pipeline
          (assignment_expression
            (left_assignment_expression
              (logical_expression
                (bitwise_expression
                  (comparison_expression
                    (additive_expression
                      (multiplicative_expression
                        (format_expression
                          (range_expression
                            (array_literal_expression
                              (unary_expression
                                (variable)))))))))))
            (assignement_operator)
            (pipeline
              (logical_expression
                (bitwise_expression
                  (comparison_expression
                    (additive_expression
                      (multiplicative_expression
                        (format_expression
                          (range_expression
                            (array_literal_expression
                              (unary_expression
                                (integer_literal
                                  (decimal_integer_literal)))))))))))))))
      (for_condition
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (variable))))))))
                (comparison_operator)
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (integer_literal
                              (decimal_integer_literal)))))))))))))
      (for_iterator
        (pipeline
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (post_increment_expression
                              (variable)))))))))))))
      (statement_block
        (statement_list
          (pipeline
            (logical_expression
              (bitwise_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (variable))))))))))))))))
