php8.5
Home/ Manual/ parle / rlexer/ Parle\RLexer::pushState

Parle\RLexer::pushState

PHP function Edit on GitHub ✎

(PECL parle >= 0.5.1)

Push a new start state

Description

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

Source: reference/parle/parle/rlexer/pushstate.xml · from the official PHP manual (php/doc-en)