示例#1
0
 function SQL_Parser($string = null, $dialect = "MySQL", $useCache = true)
 {
     $this->dialect = $dialect;
     if ($useCache) {
         $parser =& SQL_Parser::loadParser($dialect);
         $this->cloneDialect($parser);
     } else {
         $this->setDialect($dialect);
     }
     if (is_string($string)) {
         $this->lexer = new Lexer($string, 1);
         $this->lexer->symbols =& $this->symbols;
     }
 }