Parle\RLexer::push
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
Parle\RLexer::push
Референца за `parle-rlexer.push.php` со подобрена типографија и навигација.
Parle\RLexer::push
(PECL parle >= 0.5.1)
Parle\RLexer::push — Додај правило за лексер
= NULL
Притисни шема за препознавање на лексема.
A 'start state' and 'exit state' can be specified by using a suitable signature.
Параметри
regex-
Регуларен израз што се користи за совпаѓање на токени.
id-
ID на токен. Ако инстанцата на лексерот е наменета да се користи самостојно, ова може да биде произволен број. Ако инстанцата на лексерот ќе се предаде на парсер, тоа мора да биде ID вратено од Parle\RParser::tokenid().
state-
State name. If '*' is used as start state, then the rule is applied to all lexer states.
newState-
New state name, after the rule was applied.
If '.' is specified as the exit state, then the lexer state is unchanged when that rule matches. An exit state with '>' before the name means push. Use the signature without id for either continuation or to start matching, when a continuation or recursion is required.
If '<' is specified as exit state, it means pop. In that case, the signature containing the id can be used to identify the match. Note that even in the case an id is specified, the rule will finish first when all the previous pushes popped.
Вратени вредности
Не се враќа вредност.