W3cubDocs

/PHP

Parle\RLexer::pushState

(PECL parle >= 0.5.1)

Parle\RLexer::pushStatePush a new start state

Description

public Parle\RLexer::pushState ( string $state ) : int

This lexer type can have more than one state machine. This allows you to lex different tokens depending on context, thus allowing simple parsing to take place. Once a state pushed, it can be used with a suitable Parle\RLexer::push() signature variant.

Parameters

state

Name of the state.

Return Values

© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/parle-rlexer.pushstate.php