//
// Execution part of processor
//
internal void Execute()
{
Debug.Assert(_actionStack != null);
while (_execResult == ExecResult.Continue)
{
ActionFrame frame = (ActionFrame)_actionStack.Peek();
if (frame == null)
{
Debug.Assert(_builder != null);
_builder.TheEnd();
ExecutionResult = ExecResult.Done;
break;
}
// Execute the action which was on the top of the stack
if (frame.Execute(this))
{
_actionStack.Pop();
}
}
if (_execResult == ExecResult.Interrupt)
{
_execResult = ExecResult.Continue;
}
}