view anagram/guisupport/tracedc.cpp @ 18:562c313f14f4

some minor updates for 2022
author David A. Holland
date Tue, 31 May 2022 02:03:50 -0400
parents 13d2b8934445
children
line wrap: on
line source

/*
 * AnaGram, A System for Syntax Directed Programming
 * Copyright 1993-2002 Parsifal Software. All Rights Reserved.
 * See the file COPYING for license and usage terms.
 *
 * tracedc.cpp
 */

#include "dc.h"
#include "tracedc.h"

//#define INCLUDE_LOGGING
#include "log.h"


void trace_window_dc::init(void) {
  LOGSECTION("trace_window_dc::init");

  des->d_size = cint(0, parser_stack->nt);
  des->c_loc_doc.y = parser_stack->nt - 1;
  menu = NULL;

  look_ahead = 0;
}

trace_window_dc::trace_window_dc(AgString name, tsd *st,
				 unsigned sn, unsigned t, unsigned f)
  : dc(name, AgString(AgString::format(" S%03d:R%03d:T%03d ", sn, f, t)))
  , parser_stack(copy_tuple_set(st))
{
  init();
}

trace_window_dc::trace_window_dc(AgString name, tsd *et)
  : dc(name)
  , parser_stack(copy_tuple_set(et))
{
  LOGSECTION("trace_window_dc::trace_window_dc::(AgString, tsd *)");
  init();
}

trace_window_dc::trace_window_dc(AgString name, AgString foot, tsd *et)
  : dc(name, foot)
  , parser_stack(copy_tuple_set(et))
{
  init();
}