Ejemplo n.º 1
0
Archivo: loader.php Proyecto: GE3/GE3
 private function tokenize($s)
 {
     if (!self::$regexp) {
         self::$regexp = '~' . implode('|', self::$patterns) . '~mA';
     }
     $s = str_replace("\r", '', $s);
     $s = strtr($s, "\t", ' ');
     $s = "\n" . $s . "\n";
     $this->input = $s;
     $this->tokens = NString::split($s, self::$regexp, PREG_SPLIT_NO_EMPTY);
     if (end($this->tokens) !== "\n") {
         $this->n = key($this->tokens);
         $this->error();
     }
 }