protected function yyExpecting ( $state )
	{
		$token = 0;
		$n = 0;
		$len = 0;
		$ok = array_fill( 0, count( XPath2Parser::$yyName ), false );

		if ( ( $n = XPath2Parser::$yySindex[ $state ] ) != 0 )
		{
			for ( $token = $n < 0 ? -$n : 0; ( $token < count( XPath2Parser::$yyName ) && ( $n + $token < count( XPath2Parser::$yyTable ) ) ); ++ $token )
			{
				if ( XPath2Parser::$yyCheck[ $n + $token ] == $token && !$ok[ $token ] && ! is_null( XPath2Parser::$yyName[ $token ] ) )
				{
					++ $len;
					$ok[ $token ] = true;
				}
			}
		}

		if ( ( $n = XPath2Parser::$yyRindex[ $state ] ) != 0 )
		{
			for ( $token = $n < 0 ? -$n : 0; ( $token < count( XPath2Parser::$yyName ) ) && ( $n + $token < count( XPath2Parser::$yyTable ) ); ++ $token )
			{
				if ( XPath2Parser::$yyCheck[ $n + $token ] == $token && ! $ok[ $token ] && ! is_null( XPath2Parser::$yyName[ $token ] ) )
				{
					++ $len;
					$ok[ $token ] = true;
				}
			}
		}

	/**
	 * @var array[ string ] $result
	 */
		$result = array_fill( 0, $len, null );
		for ( $n = $token = 0; $n < $len;  ++ $token )
			if ( $ok[ $token ] ) $result[ $n++ ] = XPath2Parser::$yyName[ $token ];
		return $result;
	}
protected function yyExpecting ( $state )
	{
		$token = 0;
		$n = 0;
		$len = 0;
		$ok = array_fill( 0, count( XPath2Parser::$yyName ), false );

		if ( ( $n = XPath2Parser::$yySindex[ $state ] ) != 0 )
		{
			for ( $token = $n < 0 ? -$n : 0; ( $token < count( XPath2Parser::$yyName ) && ( $n + $token < count( XPath2Parser::$yyTable ) ) ); ++ $token )
			{
				if ( XPath2Parser::$yyCheck[ $n + $token ] == $token && !$ok[ $token ] && ! is_null( XPath2Parser::$yyName[ $token ] ) )
				{
					++ $len;
					$ok[ $token ] = true;
				}
			}
		}

		if ( ( $n = XPath2Parser::$yyRindex[ $state ] ) != 0 )
		{
			for ( $token = $n < 0 ? -$n : 0; ( $token < count( XPath2Parser::$yyName ) ) && ( $n + $token < count( XPath2Parser::$yyTable ) ); ++ $token )
			{
				if ( XPath2Parser::$yyCheck[ $n + $token ] == $token && ! $ok[ $token ] && ! is_null( XPath2Parser::$yyName[ $token ] ) )
				{
					++ $len;
					$ok[ $token ] = true;
				}
			}
		}

	/**
	 * @var array[ string ] $result
	 */
		$result = array_fill( 0, $len, null );
		for ( $n = $token = 0; $n < $len;  ++ $token )
			if ( $ok[ $token ] ) $result[ $n++ ] = XPath2Parser::$yyName[ $token ];
		return $result;
	}
protected function yyExpecting ( $ state ) { $ token = 0 ; $ n = 0 ; $ len = 0 ; $ ok = array_fill ( 0 , count ( XPath2Parser :: $ yyName ) , false ) ; if ( ( $ n = XPath2Parser :: $ yySindex [ $ state ] ) != 0 ) { for ( $ token = $ n < 0 ? - $ n : 0 ; ( $ token < count ( XPath2Parser :: $ yyName ) && ( $ n + $ token < count ( XPath2Parser :: $ yyTable ) ) ) ; ++ $ token ) { if ( XPath2Parser :: $ yyCheck [ $ n + $ token ] == $ token && ! $ ok [ $ token ] && ! is_null ( XPath2Parser :: $ yyName [ $ token ] ) ) { ++ $ len ; $ ok [ $ token ] = true ; } } } if ( ( $ n = XPath2Parser :: $ yyRindex [ $ state ] ) != 0 ) { for ( $ token = $ n < 0 ? - $ n : 0 ; ( $ token < count ( XPath2Parser :: $ yyName ) ) && ( $ n + $ token < count ( XPath2Parser :: $ yyTable ) ) ; ++ $ token ) { if ( XPath2Parser :: $ yyCheck [ $ n + $ token ] == $ token && ! $ ok [ $ token ] && ! is_null ( XPath2Parser :: $ yyName [ $ token ] ) ) { ++ $ len ; $ ok [ $ token ] = true ; } } } /**
	 * @var array[ string ] $result
	 */ $ result = array_fill ( 0 , $ len , null ) ; for ( $ n = $ token = 0 ; $ n < $ len ; ++ $ token ) if ( $ ok [ $ token ] ) $ result [ $ n ++ ] = XPath2Parser :: $ yyName [ $ token ] ; return $ result ; }
computes list of expected tokens on error by tracing the tables.
@param int $state for which to compute the list.
@return array list of token names.
computes list of expected tokens on error by tracing the tables .