# indent w/ 2 spaces
source: |
  gate test_gate(theta) a, b {
    reset a;
    barrier b;
    gphase(-theta/2);
    CX a, b;
    barrier;
  }
reference: |
  program
    statementOrScope
      statement
        gateStatement
          gate
          test_gate
          (
          identifierList
            theta
          )
          identifierList
            a
            ,
            b
          scope
            {
            statementOrScope
              statement
                resetStatement
                  reset
                  gateOperand
                    indexedIdentifier
                      a
                  ;
            statementOrScope
              statement
                barrierStatement
                  barrier
                  gateOperandList
                    gateOperand
                      indexedIdentifier
                        b
                  ;
            statementOrScope
              statement
                gateCallStatement
                  gphase
                  (
                  expressionList
                    expression
                      expression
                        -
                        expression
                          theta
                      /
                      expression
                        2
                  )
                  ;
            statementOrScope
              statement
                gateCallStatement
                  CX
                  gateOperandList
                    gateOperand
                      indexedIdentifier
                        a
                    ,
                    gateOperand
                      indexedIdentifier
                        b
                  ;
            statementOrScope
              statement
                barrierStatement
                  barrier
                  ;
            }
    <EOF>
