7.4.4.9 scn Instruction

This instruction has the syntax

        scn     NONT_QUOTED, RHS, POS, LENGTH

The instruction scans the next terminal symbols in a training terminal symbol sequence and behaves as the rd instruction (see rd Instruction) but does not remove processed terminal symbols from a training terminal symbol sequence.

The parameter LENGTH specifies the number of terminal symbols to scan in a training terminal symbol sequence. The parameters NONT_QUOTED, RHS, and POS identify an occurrence of an auxiliary nonterminal symbol in a PCFG corresponding to a regular expression grammar. The right-hand sides of the auxiliary nonterminal symbol are terminal symbol sequences scanned by the scn instruction.

The parameter NONT_QUOTED is a PCFG nonterminal symbol specified in double quotation marks. The nonterminal symbol is at the left-hand side of a PCFG production containing the auxiliary nonterminal symbol in a right-hand side. The parameter RHS is zero-based index of a right-hand side containing the auxiliary nonterminal symbol. The parameter POS is zero-based position of the auxiliary nonterminal symbol in the right-hand side.