Next: debug-ga-file, Previous: continue, Up: Commands
debug-ga
(mallex
)
Use debug-ga
to find errors in your allomorph rules. This command
works like ga
, but the allomorph generation will be stopped before the
first statement of the first rule is executed:
mallex> debug-ga [surface: "john", class: name] at rule "irregular_verb" debug> |
The prompt `debug>' that appears instead of `mallex>' indicates
that mallex
is currently executing the allomorph rules but has been
interrupted. Since this ability has been developed to support the
debugging of Malaga rules, this mode is called debug mode.
When mallex
arrives at the start of a new rule in debug mode (as in the
example above), the name of this rule is printed. When in debug mode, you can
always get the name of the current rule using the command rule
.
If you're running mallex
from Emacs, another Emacs window will display
the source file. An arrow is used to show to the statement that will be
executed next.
... allo_rule irregular_verb ($entry): =>? $entry.class = verb; ... |
In debug mode, you can, for example, get the variables that are
currently defined (using variable
or print
), and you can
execute statements (using step
, next
, walk
,
continue
, or run
). If you want to quit the debug mode,
just enter run
. The remaining statements for generation will then
be executed without interruption.