Mercurial > ~dholland > hg > ag > index.cgi
diff anagram/guisupport/tracedc.cpp @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/anagram/guisupport/tracedc.cpp Sat Dec 22 17:52:45 2007 -0500 @@ -0,0 +1,47 @@ +/* + * 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(); +}