1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pe_file.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ADC_CPP_PE_FILE_HXX
32 #define ADC_CPP_PE_FILE_HXX
40 #include <semantic/callf.hxx>
41 #include <semantic/sub_peu.hxx>
63 class PE_File
: public Cpp_PE
68 std
, /// before class, struct or union
75 PeEnvironment
& io_rEnv
);
78 virtual void Call_Handler(
79 const cpp::Token
& i_rTok
);
80 virtual Cpp_PE
* Handle_ChildFailure();
83 typedef SubPe
< PE_File
, PE_Namespace
> SP_Namespace
;
84 typedef SubPe
< PE_File
, PE_Typedef
> SP_Typedef
;
85 typedef SubPe
< PE_File
, PE_VarFunc
> SP_VarFunc
;
86 typedef SubPe
< PE_File
, PE_TemplateTop
> SP_Template
;
87 typedef SubPe
< PE_File
, PE_Defines
> SP_Defines
;
88 typedef SubPe
< PE_File
, PE_Ignore
> SP_Ignore
;
90 typedef SubPe
< PE_File
, PE_Using
> SP_Using
;
93 typedef SubPeUse
< PE_File
, PE_Namespace
> SPU_Namespace
;
94 typedef SubPeUse
< PE_File
, PE_Typedef
> SPU_Typedef
;
95 typedef SubPeUse
< PE_File
, PE_VarFunc
> SPU_VarFunc
;
96 typedef SubPeUse
< PE_File
, PE_TemplateTop
> SPU_Template
;
97 typedef SubPeUse
< PE_File
, PE_Defines
> SPU_Defines
;
98 typedef SubPeUse
< PE_File
, PE_Ignore
> SPU_Ignore
;
100 void Setup_StatusFunctions();
101 virtual void InitData();
102 virtual void TransferData();
103 void Hdl_SyntaxError( const char *);
105 void SpReturn_VarFunc();
106 void SpReturn_Template();
108 void On_std_namespace(const char * i_sText
);
109 void On_std_ClassKey(const char * i_sText
);
110 void On_std_typedef(const char * i_sText
);
111 void On_std_enum(const char * i_sText
);
112 void On_std_VarFunc(const char * i_sText
);
113 void On_std_template(const char * i_sText
);
114 void On_std_extern(const char * i_sText
);
115 void On_std_using(const char * i_sText
);
116 void On_std_SwBracketRight(const char * i_sText
);
118 void On_std_DefineName(const char * i_sText
);
119 void On_std_MacroName(const char * i_sText
);
121 void On_in_extern_Constant(const char * i_sText
);
122 void On_in_extern_Ignore(const char * i_sText
);
123 void On_in_externC_SwBracket_Left(const char * i_sText
);
124 void On_in_externC_NoBlock(const char * i_sText
);
126 PeEnvironment
& access_Env() { return *pEnv
; }
130 PeEnvironment
* pEnv
;
132 Dyn
< PeStatusArray
<PE_File
> >
135 Dyn
<SP_Namespace
> pSpNamespace
;
136 Dyn
<SP_Typedef
> pSpTypedef
;
137 Dyn
<SP_VarFunc
> pSpVarFunc
;
138 Dyn
<SP_Template
> pSpTemplate
;
139 Dyn
<SP_Defines
> pSpDefs
;
141 Dyn
<SP_Ignore
> pSpIgnore
;
146 Dyn
<SPU_Namespace
> pSpuNamespace
;
147 Dyn
<SPU_Typedef
> pSpuTypedef
;
148 Dyn
<SPU_VarFunc
> pSpuVarFunc
;
149 Dyn
<SPU_Template
> pSpuTemplate
;
150 Dyn
<SPU_Defines
> pSpuDefs
;
152 Dyn
<SPU_Ignore
> pSpuUsing
;
153 Dyn
<SPU_Ignore
> pSpuIgnoreFailure
;
155 bool bWithinSingleExternC
; /** After 'extern "C"' without following '{',
156 waiting for the next function or variable to
168 -> Named Namespace declaration
169 -> Unnamed Namespace declaration
170 -> Namespace alias definition
194 -> TemplateFunction
/Method
-Implementation
195 -> TemplatePredeclaration
202 -> AssemblerDeclaration