private function findInitialTokenPosition($input)
{
$pos = 0;
// search for first valid annotation
while (($pos = strpos($input, '@', $pos)) !== false) {
// if the @ is preceded by a space or * it is valid
if ($pos === 0 || $input[$pos - 1] === ' ' || $input[$pos - 1] === '*') {
return $pos;
}
$pos++;
}
return null;
}