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

The Parle\Parser class

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

Intro

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

Class synopsis

class Parle\Parser { }

Predefined Constants

Parle\Parser::ACTION_ERROR
Parle\Parser::ACTION_SHIFT
Parle\Parser::ACTION_REDUCE
Parle\Parser::ACTION_GOTO
Parle\Parser::ACTION_ACCEPT
Parle\Parser::ERROR_SYNTAX
Parle\Parser::ERROR_NON_ASSOCIATIVE
Parle\Parser::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.

Parser

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