The Parle\RParser class

(PECL parle >= 0.7.0)

Introduction

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

Class synopsis

classParle\RParser {
constintACTION_ERROR = 0;
constintACTION_SHIFT = 1;
constintACTION_GOTO = 3;
constintERROR_SYNTAX = 0;
publicint$action = 0;
publicint$reduceId = 0;
publicadvance(): void
publicbuild(): void
publicconsume(string$data, Parle\RLexer$rlexer): void
publicdump(): void
publicleft(string$tok): void
publicnonassoc(string$tok): void
publicprecedence(string$tok): void
publicpush(string$name, string$rule): int
publicreset(int$tokenId = ?): void
publicright(string$tok): void
publicsigil(int$idx = ?): string
publicsigilCount(): int
publicsigilName(int$idx): string
publictoken(string$tok): void
publictokenId(string$tok): int
publictrace(): string
publicvalidate(string$data, Parle\RLexer$lexer): bool
}

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.

Table of Contents

To Top