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

Parle\Lexer::callout

(PECL parle >= 0.7.2)

Parle\Lexer::callout — Define token callback

说明

public Parle\Lexer::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 lexer classphp parle lexer process next lexer rulephp parle lexer define token callbackphp parle lexer retrieve the current tokenphp parle lexer insert regex macrophp parle lexer add a lexer rulephp parle lexer reset lexerphp 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 retrieve the current tokenphp 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 token
关注编程学问公众号
编程学问网 湘ICP备20001732号