Esempio n. 1
0
 /**
  * @return pos|-1
  */
 private static function getName($line, $len, $pos)
 {
     $isFirst = false;
     for ($i = $pos; $i < $len; $i++) {
         $c = $line[$i];
         if ($isFirst && Lexer::isAlpha($c) || !$isFirst && Lexer::isAlphanumeric($c)) {
             $isFirst = false;
             continue;
         }
         break;
     }
     return $isFirst ? -1 : $i - $pos;
 }