private function getAnnotations()
    {
        $tokens = array();

        while (null !== $this->lexer->lookahead) {

            // start at the @ symbol
            if (DocLexer::T_AT !== $this->lexer->lookahead['type']) {
                $this->lexer->moveNext();

                continue;
            }

            // something about being preceded by a non-catchable pattern
            $position = $this->lexer->token['position']
                + strlen($this->lexer->token['value']);

            if ((null !== $this->lexer->token)
                && ($this->lexer->lookahead['position'] === $position)) {
                $this->lexer->moveNext();

                continue;
            }

            // make sure we get a valid annotation name
            if ((null === ($glimpse = $this->lexer->glimpse()))
                || ((DocLexer::T_NAMESPACE_SEPARATOR !== $glimpse['type'])
                    && !in_array($glimpse['type'], self::$classIdentifiers))) {
                $this->lexer->moveNext();

                continue;
            }

            // find them all and merge them to the list
            if (null !== ($token = $this->getAnnotation())) {
                $tokens = array_merge($tokens, $token);
            }
        }

        return $tokens;
    }