The #r… specifier marks a right-hand side of a production of a source PCFG.
The right-hand side consists of nonterminal symbols.
The specifier has the format:
#rIndexOfRightHandSide
where IndexOfRightHandSide is a non-negative integer number. It is the identifier of a right-hand side of a nonterminal symbol in a source PCFG.
There are a few kinds of places where inserting an #r… specifier is necessary:
Example
A #l-A: B C D #r0 ;
Example 1
A #l-A: E #r2 | F F #r0 | G G G #r1 ;The source PCFG productions might have the form
A: F F | G G G | E ;
Example 2
A #l-A: B C D #l-_A_1C ( F F #r1 | G G G #r2 | E #r0 ) ... ;The source PCFG productions for the nonterminal symbol
_A_1Cmight have the form_A_1C: E | F F | G G G ;
Example
S #l-S: B C ( #l-_S_1A D D #r0 )* ...