nprod Instruction ¶This instruction has the syntax
nprod NONT_QUOTED, RHS, ORD
The instruction increments the frequency of a production of a source PCFG with nonterminal symbols at the right-hand side and updates the spur accordingly.
The production has a nonterminal symbol NONT_QUOTED at the left-hand side.
The parameter RHS is zero-based index of a right-hand side for the nonterminal symbol as specified for the production in the source PCFG.
The parameter ORD is the ordinal number of an nprod instruction with the same parameters NONT_QUOTED and RHS.
An nprod instruction corresponds to a #pn-… specifier in a top-down template grammar.
See Ending a Nonterminal Production, for more information on #pn-… specifiers.
Example:
nprod "S", 5, 2
This instruction corresponds to an occurrence of #pn-S-5 specifier in a regular expression of a top-down template grammar.
The occurrence has ordinal number 2.