1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
// This file is part of PUMA.
// Copyright (C) 1999-2003 The PUMA developer team.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
// MA 02111-1307 USA
#ifndef __CCBuilder_h__
#define __CCBuilder_h__
#include "Puma/CBuilder.h"
namespace Puma {
class CCBuilder : public CBuilder {
public:
CCBuilder () {}
public:
// functions to create several kinds of syntax trees
// A.1 Keywords
virtual CTree *namespace_name ();
// A.4 Expression
virtual CTree *prim_expr ();
virtual CTree *id_expr ();
virtual CTree *unqual_id ();
virtual CTree *qual_id ();
virtual CTree *nested_name_spec ();
virtual CTree *nested_name_spec1 ();
virtual CTree *class_or_ns_name ();
virtual CTree *postfix_expr (CTree * = (CTree*)0);
virtual CTree *postfix_expr2 ();
virtual CTree *pseudo_dtor_name ();
virtual CTree *new_expr ();
virtual CTree *new_placement ();
virtual CTree *direct_new_declarator ();
virtual CTree *direct_new_declarator1 ();
virtual CTree *new_init ();
virtual CTree *delete_expr ();
virtual CTree *pm_expr ();
// A.5 Statements
virtual CTree *condition (CTree * = (CTree*)0);
virtual CTree *decl_stmt ();
// A.6 Declarations
virtual CTree *decl ();
virtual CTree *simple_type_spec ();
virtual CTree *elaborated_type_spec ();
virtual CTree *linkage_spec ();
// A.6.1 Namespaces
virtual CTree *namespace_def ();
virtual CTree *named_ns_def ();
virtual CTree *orig_namespace_def (CTree * = 0);
virtual CTree *namespace_body ();
virtual CTree *ns_alias_def ();
virtual CTree *qual_ns_spec ();
virtual CTree *using_decl ();
virtual CTree *using_directive ();
// A.7 Declarators
virtual CTree *declarator ();
virtual CTree *declarator_id ();
virtual CTree *param_init ();
// A.8 Classes
virtual CTree *class_head (CTree * = (CTree*)0);
virtual CTree *class_spec ();
virtual CTree *member_decl ();
virtual CTree *member_decl1 ();
virtual CTree *access_decl ();
virtual CTree *member_declarator ();
virtual CTree *pure_spec ();
virtual CTree *const_init ();
// A.9 Derived classes
virtual CTree *base_clause ();
virtual CTree *base_spec_list ();
virtual CTree *base_spec ();
virtual CTree *access_spec ();
// A.10 Special member functions
virtual CTree *conv_fct_id ();
virtual CTree *ctor_init ();
virtual CTree *mem_init_list ();
virtual CTree *mem_init ();
virtual CTree *mem_init_id ();
// A.11 Overloading
virtual CTree *oper_fct_id ();
// A.12 Templates
virtual CTree *template_decl ();
virtual CTree *template_param_list ();
virtual CTree *template_param ();
virtual CTree *type_param ();
virtual CTree *non_type_param (CTree * = (CTree*)0);
virtual CTree *template_id ();
virtual CTree *template_arg_list ();
virtual CTree *template_arg ();
virtual CTree *explicit_instantiation ();
virtual CTree *explicit_specialization ();
// A.13 Exception handling
virtual CTree *try_block ();
virtual CTree *fct_try_block ();
virtual CTree *handler_seq ();
virtual CTree *handler ();
virtual CTree *exception_decl ();
virtual CTree *throw_expr ();
virtual CTree *exception_spec ();
virtual CTree *type_id_list ();
};
} // namespace Puma
#endif /* __CCBuilder_h__ */
|