The specifier #d is an operator that consumes a terminal symbol and prepends it to remaining part of a parse unit or training terminal symbol sequence at the end of processing a sequence or grouping containing the operator.
If a sequence or grouping contains multiple #d operators, terminal symbols prepended to remaining part of a parse unit or training terminal symbol sequence are in the order of consuming the terminal symbols by the #d operators.
Example
(before processing the expression)
The expression in a grammar:
( #d . . . . #d . . )The remaining part of training terminal symbol sequence:
a b c d e f g h i j(after processing the expression)
The read instance of the expression:
( #d "b" "c" "d" "e" #d "g" "h" )The remaining part of training terminal symbol sequence:
a f i j
The #d operator is normally required at the beginning of an expression at the right-hand side of ‘<-’ operator to defer a look-ahead terminal symbol for subsequent consuming by the left-hand side of ‘<-’.
See Reverse Order Sequences, for more information and an example.