next up previous contents
Next: The :demo directive Up: Tracing and Debugging Previous: The Special Tracing Flag

The trace-enable and trace-disable Family of Functions

                 

In general, a grammar is defined in a file, that you load in your Lisp environment. The tracing flags are defined in that file after the alts and opts or as local flags. When you develop a grammar, you want to focus on different parts of the grammar. In order to do that, you can selectively enable or disable some of the flags defined in the grammar.

The function all-tracing-flags returns a list of all the flags defined in the grammar. You can then choose to enable or disable all the flags, only a given flag, or all flags whose name matches a given string.

When a flag is disabled, everything happens as if the flag was not defined at all in the grammar. Note that you cannot create a new flag in the grammar by using these functions. You can simply turn on and off existing flags. It is therefore a good idea to define all the possible flags in a grammar and to adjust the list of enabled flags from within lisp.

When you use the def-alt and def-conj notation (cf. Section [*]), the functions trace-enable-alt and trace-disable-alt can be used to enable and disable all the tracing flags appearing under a given def-alt or def-conj construct. The expansion keyword determines if the enabling/disabling only concerns the tracing flags appearing directly in the def-alt construct, or also all the flags appearing in the expansion of the construct.


next up previous contents
Next: The :demo directive Up: Tracing and Debugging Previous: The Special Tracing Flag
Michael Elhadad - elhadad@cs.bgu.ac.il