comparison anagram/guisupport/stexpdc.h @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:13d2b8934445
1 /*
2 * AnaGram, A System for Syntax Directed Programming
3 * Copyright 1993-2002 Parsifal Software. All Rights Reserved.
4 * See the file COPYING for license and usage terms.
5 *
6 * stexpdc.h
7 */
8
9 #ifndef STEXPDC_H
10 #define STEXPDC_H
11
12 class state_expansion_dc : public dc {
13 public:
14 static MenuOption *auxTable[];
15 virtual MenuOption **getAuxWinMenu(void) { return auxTable; }
16 unsigned state_number;
17 tsd *expansion;
18
19 state_expansion_dc(unsigned, const AgString, const AgString);
20 state_expansion_dc(state_expansion_dc &x)
21 : dc(x),
22 state_number(x.state_number),
23 expansion(x.expansion) {}
24
25 ~state_expansion_dc(void);
26 virtual unsigned token(unsigned);
27 virtual void getLine(unsigned) const;
28 virtual void synchCursor(unsigned) const;
29
30 virtual dc_ref aux_trace(unsigned);
31 virtual dc_ref expansion_chain(unsigned);
32 virtual dc_ref expansion_rules(unsigned);
33 virtual dc_ref previous_states(unsigned);
34 virtual dc_ref productions(unsigned ln);
35 virtual dc_ref reduction_states(unsigned);
36 virtual dc_ref rule_context(unsigned);
37 virtual dc_ref set_elements(unsigned);
38 virtual dc_ref usage(unsigned);
39
40 virtual int expansion_chain_ok(unsigned);
41 virtual int expansion_rules_ok(unsigned);
42 virtual int previous_states_ok(unsigned);
43 virtual int productions_ok(unsigned ln);
44 virtual int reduction_states_ok(unsigned);
45 virtual int rule_context_ok(unsigned ln) { return ln != 0; }
46 virtual int set_elements_ok(unsigned);
47 virtual int usage_ok(unsigned);
48 };
49
50 class expansion_chain_dc : public state_expansion_dc {
51 public:
52 unsigned rule_number;
53 expansion_chain_dc(unsigned sn, unsigned rn, AgString foot);
54 };
55
56 dc_ref expansion_chain_window(int,int,int);
57 dc_ref state_expansion_window(int);
58
59 #endif /* STEXPDC_H */