PHP 7.2.0 Release Candidate 4 Released


(PECL parle >= 0.5.1)

Parle\RLexer::pushStatePush a new start state


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

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. To allow this, a 'start state' must be specified additionally at the beginning of the Parle\RLexer::push() call and an 'exit state' at the end. If '*' is used as start state, then the rule is applied to all lexer states. If '.' is specified as the exit state, then the lexer state is unchanged when that rule matches.



Name of the state.

Return Values

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top