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);
    }
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);
    }
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 ) ; }
Tries to parse a token beginning on the start marker
@param string $text The text
@param int $startPos The start position of the token
@param int& $endPos The end position of the token or the next position
@return Token Returns the parsed token or null if parsing failed
Tries to parse a token beginning on the start marker