grammars may be seen as declarative descriptions of string languages. A
frequently raised question addresses the possibility of encapsulating
into declarative knowledg
In a formal grammar this may be accomplished by "flags" (see "Programmed gramma
QuickStart §11) or by other procedures, see for instance "Destroying
we deal with
that may be inserted in subgrammar rules. Every procedure name starts with an
underline character. Current procedures are
control derivations, and
modify the trace output, not the derivation itself.
that the names of procedures are not case-sensitive. Thus, for example,
"_traceOn" may be equivalently written "_Traceon", "_TRACEON", etc.
a procedure appears in the left argument of a rul
it is executed before the rule is applied. If it appears in the right argument
it is executed once the rule has been applied. Trace procedures, _destr
may appear on either side, but _got
must only appear in the right argument of a rul
in the left argument should be placed after weights and flags, and before any
variables or terminal symbols. Procedures in the right argument should be
placed after variables or terminal symbols.