Mercurial > ~dholland > hg > ag > index.cgi
comparison anagram/guisupport/ruletabdc.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 * ruletabdc.h | |
7 */ | |
8 | |
9 #ifndef RULETABDC_H | |
10 #define RULETABDC_H | |
11 | |
12 #include "conflicttrc.h" | |
13 #include "dc.h" | |
14 #include "q1glbl.h" | |
15 | |
16 class rule_table_dc : public dc { | |
17 public: | |
18 static MenuOption *auxTable[]; | |
19 virtual MenuOption **getAuxWinMenu(void) { return auxTable; } | |
20 | |
21 rule_table_dc(void); | |
22 rule_table_dc(rule_stack_dc &x) : dc(x) {} | |
23 | |
24 virtual void getLine(unsigned) const; | |
25 virtual void synchCursor(unsigned) const; | |
26 struct localize { | |
27 unsigned rule; | |
28 unsigned index; | |
29 localize(unsigned); | |
30 unsigned token() { | |
31 unsigned nt = ibnfn[rule]; | |
32 if (index < nt) return ibnfs[ibnfb[rule] + index]; | |
33 return 0; | |
34 } | |
35 | |
36 }; | |
37 virtual dc_ref expansion_rules(unsigned); | |
38 virtual dc_ref productions(unsigned); | |
39 virtual dc_ref rule_context(unsigned); | |
40 virtual dc_ref usage(unsigned); | |
41 | |
42 virtual int expansion_rules_ok(unsigned); | |
43 virtual int productions_ok(unsigned); | |
44 virtual int rule_context_ok(unsigned ln) { return ln != 0; } | |
45 virtual int usage_ok(unsigned); | |
46 }; | |
47 | |
48 | |
49 #endif /* RULETABDC_H */ |