Mercurial > ~dholland > hg > ag > index.cgi
comparison anagram/agcore/tree.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 | 607e3be6bad8 |
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 * tree.h | |
7 */ | |
8 | |
9 #ifndef TREE_H | |
10 #define TREE_H | |
11 | |
12 class CharSetExpression; // from csexp.h | |
13 #include "register.h" | |
14 | |
15 | |
16 struct parse_tree_map; | |
17 | |
18 class ParseTree : public KeyedObjectRegister<parse_tree_map> { | |
19 public: | |
20 ParseTree() {} | |
21 ParseTree(unsigned x); | |
22 ParseTree(const ParseTree &t); | |
23 ParseTree(CharSetExpression *x); | |
24 static void reset(); | |
25 | |
26 class Map; | |
27 friend class Map; | |
28 | |
29 class Map { | |
30 public: | |
31 parse_tree_map &operator [] (unsigned x); | |
32 }; | |
33 }; | |
34 | |
35 #include "symbol.h" | |
36 #include "token.h" | |
37 | |
38 struct parse_tree_map { | |
39 Token token_number; | |
40 Symbol token_name; | |
41 CharSetExpression *expression; | |
42 int char_set; | |
43 | |
44 parse_tree_map(); | |
45 parse_tree_map(CharSetExpression *x); | |
46 ~parse_tree_map() {} | |
47 int operator < (const parse_tree_map &t) const; | |
48 }; | |
49 | |
50 extern ParseTree::Map map_parse_tree; | |
51 | |
52 | |
53 #endif /* TREE_H */ |