private RE concat(RE x,RE y){
  if (rec == Recursion.RIGHT) {
    return x.concat(y);
  }
 else {
    return y.concat(x);
  }
}

private RE concat ( RE x , RE y ) { if ( rec == Recursion . RIGHT ) { return x . concat ( y ) ; } else { return y . concat ( x ) ; } }
given a pair of regular expressions , concatenate them in a manner consistent with this production ' s recursion form ( left - or right - recursive ) .
