(PECL parle >= 0.5.1)
Parser class. Rules can be defined on the fly. Once finalized, a Parle\Lexer instance is required to deliver the token stream.
public advance(): void
public build(): void
public consume(string $data, Parle\Lexer $lexer): void
public dump(): void
public errorInfo(): Parle\ErrorInfo
public left(string $tok): void
public nonassoc(string $tok): void
public precedence(string $tok): void
public push(string $name, string $rule): int
public reset(int $tokenId = ?): void
public right(string $tok): void
public sigil(int $idx): string
public sigilCount(): int
public sigilName(int $idx): string
public token(string $tok): void
public tokenId(string $tok): int
public trace(): string
public validate(string $data, Parle\Lexer $lexer): bool}
Parle\Parser::ACTION_ERRORParle\Parser::ACTION_SHIFTParle\Parser::ACTION_REDUCEParle\Parser::ACTION_GOTOParle\Parser::ACTION_ACCEPTParle\Parser::ERROR_SYNTAXParle\Parser::ERROR_NON_ASSOCIATIVEParle\Parser::ERROR_UNKNOWN_TOKENCurrent parser action that matches one of the action class constants, readonly.
Grammar rule id just processed in the reduce action. The value corresponds either to a token or to a production id. Readonly.
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.parle-parser.php