7.4.4.3 peek Instruction

This instruction has the syntax

        peek    ORD

The instruction fetches a look-ahead terminal symbol from a training terminal symbol sequence and returns an outcome equal to the numeric identifier of the look-ahead terminal symbol. The parameter ORD is the ordinal number of an AST node for a ‘?’ or ‘*’ quantifier or a set of alternatives separated by ‘|’ requiring look-ahead terminal symbol analysis to select a branch for transferring control. The parser uses that ordinal number to mark a regular expression part containing a parse error in a stack trace dumped on executing an abrt instruction.

Example:

        peek    3

This instruction returns the identifier of the next terminal symbol from a training terminal symbol sequence to select a control transfer target for an AST node with ordinal number 3.