php8.5
Home/ Manual/ reference / parle/ The Parle\RParser class

The Parle\RParser class

Parser class. Rules can be defined on the fly. Once finalized, a Parle\RLexer instance is required to deliver the token stream.

Intro

Parser class. Rules can be defined on the fly. Once finalized, a Parle\RLexer instance is required to deliver the token stream.

Class synopsis

class Parle\RParser { }

Predefined Constants

Parle\RParser::ACTION_ERROR
Parle\RParser::ACTION_SHIFT
Parle\RParser::ACTION_REDUCE
Parle\RParser::ACTION_GOTO
Parle\RParser::ACTION_ACCEPT
Parle\RParser::ERROR_SYNTAX
Parle\RParser::ERROR_NON_ASSOCIATIVE
Parle\RParser::ERROR_UNKNOWN_TOKEN

Properties

action

Current parser action that matches one of the action class constants, readonly.

reduceId

Grammar rule id just processed in the reduce action. The value corresponds either to a token or to a production id. Readonly.

Rparser

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