Only the adaptive top-down parser atd-parser supports specifiers for spur update mode switching.
The following spur update modes are available:
The parser updates spur when leading out PCFG productions with terminal symbols or nonterminal symbols at the right-hand side. The specifier
#su
(without the following ‘0’) sets this mode. This is default spur update mode.
The parser does not update spur when leading out PCFG productions with terminal symbols at the right-hand side. The parser still updates spur when leading out PCFG productions with nonterminal symbols at the right-hand side. The specifier
#su0
sets this mode.
The specifiers #su and #su0 have the scope of a grouping: they do not affect spur update mode outside of an expression ‘(’ … ‘)’ containing the specifiers.
The specifier #su or #su0 in a production right-hand side changes current spur update mode, that is, spur update mode for subsequent elements in a sequence or grouping until the next specifier #su or #su0 in the sequence or grouping.
If a sequence element is a grouping, current spur update mode propagates to the grouping, that is, it becomes initial spur update mode for the grouping.
Example
To disable updating spur on processing a put-back sequence, put
#su0before the put-back sequence and optionally put#suafter it:#su0 .~ | . . .
The specifier #su or #su0 can follow a nonterminal symbol at a production left-hand side for setting initial spur update mode for the right-hand side.
As default spur update mode is “enabled”, it only makes sense to put the specifier #su0 in the left-hand side for switching initial spur update mode to “disabled”.