编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
  • « Parle\RLexer::build
  • Parle\RLexer::consume »
  • PHP Manual
  • Parle\RLexer
  • Define token callback

Parle\RLexer::callout

(PECL parle >= 0.7.2)

Parle\RLexer::callout — Define token callback

说明

public Parle\RLexer::callout ( int $id , callable $callback ) : void

Define a callback to be invoked once lexer encounters a particular token.

参数

id

Token id.

callback

Callable to be invoked. The callable doesn't receive any arguments and its return value is ignored.

返回值

没有返回值。

相关文章
php parle the parle rlexer classphp parle lexer define token callbackphp parle lexer retrieve the current tokenphp parle parser declare a token with left associativityphp parle parser declare a token with no associativityphp parle parser declare a tokenphp parle parser get token idphp parle rlexer process next lexer rulephp parle rlexer finalize the lexer rule setphp parle rlexer define token callbackphp parle rlexer pass the data for processingphp parle rlexer dump the state machinephp parle rlexer retrieve the current tokenphp parle rlexer insert regex macrophp parle rlexer add a lexer rulephp parle rparser declare a token with left associativityphp parle rparser declare a token with no associativityphp parle rparser declare a token with right associativityphp parle rparser declare a tokenphp parle rparser get token id
关注编程学问公众号
编程学问网 湘ICP备20001732号