The function trace-alts systematically monitors traversing of alts in the grammar, even if the alts are not traced, and outputs a message whenever a new branch is tried. It is best used in conjunction with a trace-disable-all setting, to follow uniquely alt traversal. The form of the output is as follows:
|
Each time a branch in an alt fails, the message ``fail in alt X'' is printed. If the alt is not traced, the name :anonymous is printed instead. This is useful to find possible errors even in places which are not traced in the grammar. In general, trace-alt should only be used in last recourse.