pyaiml21.interpreter.debugger.Debugger¶
- class pyaiml21.interpreter.debugger.Debugger(bot: pyaiml21.bot._bot.Bot, session: pyaiml21.session.session.Session)[source][source]¶
Interactive AIML debugger.
This is built on top of the interpreter and allows simple debugging of AIML source code.
Methods
add_frameAdd stack frame for current <template>.
Update the stacktrace with input_.
Continue evaluation.
Start the evaluation of node.
evalEvaluate node and return the result.
eval_seqEvaluate a sequence of nodes, concatenating the results.
eval_unknownEvaluate unknown tag by keeping the xml in the result.
failInterrupt the evaluation of the response, returning result.
fail_nodeAnnounce the interpreter that evaluation of node failed.
Print help.
Run the interactive loop, expecting commands from CLI.
End the evaluation of _node, update stacks.
Make one eval step within this function (not stopping in <srai>).
Return the value of a _predicate or a variable, or return value.
pop_framePop stack frame when leaving current <template>.
Print position of the node being evaluated.
Quit debugging session.
registerRegister a function used to interpret AIML, possibly overriding.
Remove chosen breakpoint.
Set a breakpoint on the file filename on line line.
Make one evaluation step, possibly using recursive <srai>.
Interrupt execution.
Pause the evaluation on the first interpreted node.
Display set breakpoints.
Print stack trace.
Attributes
PROMPTReturn the node that is currently being evaluated.
starsAccess stars for current category.
varsAccess local variables for current category.
- enter(node: pyaiml21.ast.node.Node)[source][source]¶
Start the evaluation of node.
- leave(_node: pyaiml21.ast.node.Node, result: str)[source][source]¶
End the evaluation of _node, update stacks.
- property node: Optional[pyaiml21.ast.node.Node][source]¶
Return the node that is currently being evaluated.