public function process($tokenList)
 {
     $base_expr = "";
     $resultList = array();
     $tablePair = array();
     foreach ($tokenList as $k => $v) {
         $token = new ExpressionToken($k, $v);
         if ($token->isWhitespaceToken()) {
             continue;
         }
         switch ($token->getUpper()) {
             case 'TO':
                 // separate source table from destination
                 $tablePair['source'] = array('expr_type' => ExpressionType::TABLE, 'table' => trim($base_expr), 'no_quotes' => $this->revokeQuotation($base_expr), 'base_expr' => $base_expr);
                 $base_expr = "";
                 break;
             case ',':
                 // split rename operations
                 $tablePair['destination'] = array('expr_type' => ExpressionType::TABLE, 'table' => trim($base_expr), 'no_quotes' => $this->revokeQuotation($base_expr), 'base_expr' => $base_expr);
                 $resultList[] = $tablePair;
                 $tablePair = array();
                 $base_expr = "";
                 break;
             default:
                 $base_expr .= $token->getToken();
                 break;
         }
     }
     if ($base_expr !== "") {
         $tablePair['destination'] = array('expr_type' => ExpressionType::TABLE, 'table' => trim($base_expr), 'no_quotes' => $this->revokeQuotation($base_expr), 'base_expr' => $base_expr);
         $resultList[] = $tablePair;
     }
     return $resultList;
 }
 public function process($tokenList)
 {
     $skip = 0;
     $warning = true;
     $base_expr = "";
     $expr_type = false;
     $option = false;
     $resultList = array();
     foreach ($tokenList as $k => $v) {
         $token = new ExpressionToken($k, $v);
         if ($token->isWhitespaceToken()) {
             continue;
         }
         if ($skip > 0) {
             $skip--;
             continue;
         }
         switch ($token->getUpper()) {
             case 'VIEW':
             case 'SCHEMA':
             case 'DATABASE':
             case 'TABLE':
                 $expr_type = strtolower($token->getTrim());
                 break;
             case 'IF':
                 $warning = false;
                 $skip = 1;
                 break;
             case 'TEMPORARY':
                 $expr_type = ExpressionType::TEMPORARY_TABLE;
                 $skip = 1;
                 break;
             case 'RESTRICT':
             case 'CASCADE':
                 $option = $token->getUpper();
                 break;
             case ',':
                 $resultList[] = array('expr_type' => $expr_type, 'base_expr' => $base_expr);
                 $base_expr = "";
                 break;
             default:
                 $base_expr .= $token->getToken();
         }
     }
     if ($base_expr !== "") {
         $resultList[] = array('expr_type' => $expr_type, 'base_expr' => $base_expr);
     }
     return array('option' => $option, 'warning' => $warning, 'object_list' => $resultList);
 }