public function ParseToken($text, $startPos, &$endPos)
    {
        $endPos = $startPos + strlen(self::Start); 
        $tokenString = $this->ExtractTokenString($text, $startPos, $endPos);
        
        if (!$tokenString)
        {
            return null;
        }
        $nextStop = 0;
        $type = $this->ParseType($tokenString, $nextStop);
        
        if (!$type)
        {
            return null;
        }
        $typeParams = $this->ParseParams($tokenString, $nextStop);
         
        if ($typeParams === false)
        {
            return null;
        }
        $property = $this->ParseProperty($tokenString, $nextStop);
        
        if (!$property)
        {
            return null;
        }
        $propParams = $this->ParseParams($tokenString, $nextStop);
        
        if ($propParams === false)
        {
            return null;
        }
        $filters = $this->ParseFilters($tokenString, $nextStop);
        if ($filters === false)
        {
            return null;
        }
        return new Token($type, $typeParams, $property, $propParams, $filters);
    }