« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 141 for Parser (0.001 sec.)
The Parle\Parser class | PHP 8.3 9883
The Parle\Parser class (PECL parle >= 0.5.1) はじめに Parser class. Rules can be defined on the fly. Once finalized, a Parle\Lexer instance is required to deliver the token stream. クラス概要 class Parle\Parser { /* 定数 */ const int ACTION ... public function trace (): string public function validate ( string $data , Parle\Lexer $lexer ): bool } 定義済み定数 Parle\Parser::ACTION_ERROR Parle\Parser::ACTION_SHIFT Parle\Parser::ACTION_REDUCE Parle\Parser::ACTION_GOTO Parle\Parser::ACTION_ACCEPT ... Parle\Parser::ERROR_SYNTAX Parle\Parser::ERROR_NON_ASSOCIATIVE Parle\Parser::ERROR_UNKNOWN_TOKEN プロパティ action Current parser actio ... d just processed in the reduce action. The value corresponds either to a token or to a production id. Readonly. 目次 Parle\Parser::advance — Process next parser rule Parle\Parser::build — Finalize the grammar rules Parle\Parser::consume — Consume the d ...
https://man.mtool.work/php/8.3/class.parle-parser.html
XML 外部エンティティの例 | PHP 8.3 9181
XML 外部エンティティの例 この例は、XML コードに焦点を当てます。この例は、他のドキュメント をインクルードし処理するための外部エンティティリファレンスのハン ドラの使用法およびPIの処理方法、PIが含むコードに関する"信頼度" を定義する手段を説明し ... -]*)\:\/\/@i" , $file ) && fileowner ( $file ) == getmyuid ()) { return true ; } return false ; } function startElement ( $parser , $name , $attribs ) { echo "&lt;<font color=\"#0000cc\"> $name </font>" ; if ( count ( $attribs )) { foreach ( $attribs a ... <font color=\"#009900\"> $k </font>=\"<font color=\"#990000\"> $v </font>\"" ; } } echo "&gt;" ; } function endElement ( $parser , $name ) { echo "&lt;/<font color=\"#0000cc\"> $name </font>&gt;" ; } function characterData ( $parser , $data ) { echo " ... <b> $data </b>" ; } function PIHandler ( $parser , $target , $data ) { switch ( strtolower ( $target )) { case "php" : global $parser_file ; // If the parsed document is " ...
https://man.mtool.work/php/8.3/example.xml-external-entity.html
Parsing and lexing | PHP 8.3 9086
Parsing and lexing はじめに 警告 この拡張モジュールは、 実験的 なものです。この拡張モジュールの動作・ 関数名・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 このモジュールは自己 ... ation is based on » these libraries and requires a » C++14 capable compiler. The lexer is based on the regex matching, the parser is LALR(1). Lexers and parsers are generated on the fly and can be used immediately after they've been finalized. Parle de ... mming language and beyond. The helper methods such as Parle\Lexer::dump() to inspect the generated state machine, or Parle\Parser::dump() to inspect the generated grammar, are useful. The method Parle\Parser::trace() can also be used to track the parsi ... peration. インストール/設定 要件 インストール手順 定義済み定数 Pattern matching — Parle pattern matching 例 Lexer examples Parser examples Parle\Lexer — The Parle\Lexer class Parle\Lexer::advance — Process next lexer rule Parle\Lexer::build — Finalize ...
https://man.mtool.work/php/8.3/book.parle.html
xml_set_object — オブジェクト内部で XML パーサーを使用する | PHP 8.3 8646
xml_set_object (PHP 4, PHP 5, PHP 7, PHP 8) xml_set_object — オブジェクト内部で XML パーサーを使用する 警告 この関数は PHP 8.4.0 で 非推奨 になります。この関数に頼らないことを強く推奨します。 説明 #[ \Deprecated ( since : '8.4' , message : ... 'provide a proper method callable to xml_set_*_handler() functions' , )] function xml_set_object ( XMLParser $parser , object $object ): true この関数は、 object の内部から parser を使用可能にします。 xml_set_element_handler() 等に ... より設定される 全てのコールバック関数は、 object のメソッドであると仮定されます。 パラメータ parser オブジェクト内部で使う XML パーサーへの参照。 object XML パーサーを使うオブジェクト。 戻り値 常に true を返します。 変更履 ... ージョン 説明 8.4.0 この関数は非推奨になりました。 代わりに、 xml_set_() 関数に適切な callable を渡してください。 8.0.0 引数 parser は、 XMLParser インスタンスを期待するようになりました。 これより前のバージョンでは、有効な xml resource が期待されていまし ...
https://man.mtool.work/php/8.3/function.xml-set-object.html
CommonMark\Parser::__construct — Parsing | PHP 8.3 8586
CommonMark\Parser::__construct (cmark >= 1.0.0) CommonMark\Parser::__construct — Parsing 説明 public function CommonMark\Parser::__construct ( int $options = ? ) 警告 この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述さ ... れています。 パラメータ options A mask of: CommonMark\Parser\Normal ( int ) CommonMark\Parser\Normalize ( int ) CommonMark\Parser\ValidateUTF8 ( int ) CommonMark\Parser\Smart ( int ) ... 他のマニュアルの関連ページ Python pyexpat Python email.parser DuckDB Functions DuckDB PEG Parser DuckDB Legacy Parser Extension ...
https://man.mtool.work/php/8.3/commonmark-parser.construct.html
Parle\Parser::trace — Trace the parser operation | PHP 8.3 8527
Parle\Parser::trace (PECL parle >= 0.5.1) Parle\Parser::trace — Trace the parser operation 説明 public function Parle\Parser::trace (): string Retrieve the current parser operation description. This can be especially useful for studying the ... parser and to optimize the grammar. パラメータ この関数にはパラメータはありません。 戻り値 Returns a string with the trace inform ... ation. 他のマニュアルの関連ページ Python trace DuckDB Legacy Parser Extension DuckDB PEG Parser Python pyexpat Python email.parser Python xml.dom.pulldom ...
https://man.mtool.work/php/8.3/parle-parser.trace.html
The CommonMark\Parser class | PHP 8.3 8503
The CommonMark\Parser class (cmark >= 1.0.0) はじめに Provides an incremental parser as an alternative to the simple Parsing API function クラス概要 final class CommonMark\Parser { /* コンストラクタ */ public function __construct ( int $opt ... /* メソッド */ public function parse ( string $buffer ): void public function finish (): CommonMark\Node } 目次 CommonMark\Parser::__construct — Parsing CommonMark\Parser::parse — Parsing CommonMark\Parser::finish — Parsing 他のマニュアルの関連ページ P ... ython email.parser Python pyexpat DuckDB Legacy Parser Extension DuckDB PEG Parser DuckDB Functions DuckDB Overview of DuckDB Internals ...
https://man.mtool.work/php/8.3/class.commonmark-parser.html
XMLタグのマッピングの例 | PHP 8.3 8503
XMLタグのマッピングの例 例1 XMLをHTMLにマップする この例は、XMLドキュメントのタグを直接HTMLタグにマップします。 "map array" にないエレメントは無視されます。もちろん、この例は、 特定の XML ドキュメント型を有する場合のみ動作します。 <?php $fi ... examples/book.xml" ; $map_array = array( "BOLD" => "B" , "EMPHASIS" => "I" , "LITERAL" => "TT" ); function startElement ( $parser , $name , $attrs ) { global $map_array ; if (isset( $map_array [ $name ])) { echo "< $map_array [ $name ] >" ; } } functio ... n endElement ( $parser , $name ) { global $map_array ; if (isset( $map_array [ $name ])) { echo "</ $map_array [ $name ] >" ; } } function charac ... terData ( $parser , $data ) { echo $data ; } $xml_parser = xml_parser_create (); // use case-folding so we are sure to find the tag in $map_ ...
https://man.mtool.work/php/8.3/example.xml-map-tags.html
クラスを使ってXMLをパースする | PHP 8.3 8467
クラスを使ってXMLをパースする この例は、どのようにクラスをハンドラと一緒に使うかを示しています。 例1 Show XML Element Structure <?php $file = "examples/book.xml" ; class CustomXMLParser { private $fp ; private $parser ; private $depth = 0 ; ... $this -> fp = fopen ( $file , 'r' ))) { throw new RunTimeException ( "could not open XML file ' { $file } '" ); } $this -> parser = xml_parser_create (); xml_set_element_handler ( $this -> parser , self :: startElement (...), self :: endElement (...)); ... xml_set_character_data_handler ( $this -> parser , self :: cdata (...)); } private function startElement ( $parser , $name , $attrs ) { for ( $i = 0 ; $i < $this -> depth ... ; $i ++) { echo " " ; } echo " $name \n" ; $this -> depth ++; } private function endElement ( $parser , $name ) { $this -> depth --; } private function cdata ( $parse , $cdata ) { if ( trim ( $cdata ) === '' ) { return; } fo ...
https://man.mtool.work/php/8.3/example.xml-parsing-with-class.html
Parser examples | PHP 8.3 8467
Parser examples 例1 Simple calculator <?php use Parle \{ Parser , ParserException , Lexer , Token }; $p = new Parser ; $p -> token ( "INTEGER" ); $p -> left ( "'+' '-' '*' '/'" ); $p -> push ( "start" , "exp" ); $prod_add = $p -> push ( "ex ... + 1" , "33 / 10" , "100 * 45" , "17 - 45" , ); foreach ( $exp as $in ) { if (! $p -> validate ( $in , $lex )) { throw new ParserException ( "Failed to validate input" ); } $p -> consume ( $in , $lex ); while ( Parser :: ACTION_ERROR != $p -> action && ... Parser :: ACTION_ACCEPT != $p -> action ) { switch ( $p -> action ) { case Parser :: ACTION_ERROR : throw new ParserException ( " ... Parser error" ); break; case Parser :: ACTION_SHIFT : case Parser :: ACTION_GOTO : case Parser :: ACTION_ACCEPT : break; case Parser :: ACTION_REDUCE : switch ...
https://man.mtool.work/php/8.3/parle.examples.parser.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT