Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Shift–reduce parsing, handle » ?

Aussi appelé : shift--reduce parsing · handle

Definition 3.1 University Computer Science — Year 3 · Chapitre 3 — Bottom-Up Parsing

Shift–reduce parsing reads the input from left to right onto a stack, shifting tokens and reducing right sides of productions at the top of the stack to their left sides. A handle of a right sentential form γ\gamma is a production A→βA \to \beta together with a position of β\beta in γ\gamma such that replacing that β\beta by AA gives the previous form of a rightmost derivation of γ\gamma.

The parse tree of id + id * id, each interior node numbered by the reduction that built it. Reduction 8 is the first step of the rightmost derivation on the right, reduction 1 its last.
The parse tree of id + id * id, each interior node numbered by the reduction that built it. Reduction 8 is the first step of the rightmost derivation on the right, reduction 1 its last.
Lire dans le chapitre →