bump product version to 6.3.0.0.beta1
[LibreOffice.git] / idlc / inc / idlctypes.hxx
blob273429e530f8e58bf9db34251f9a03f42b93069a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_IDLC_INC_IDLCTYPES_HXX
20 #define INCLUDED_IDLC_INC_IDLCTYPES_HXX
22 #include <stdio.h>
24 #include <list>
25 #include <set>
26 #include <string>
27 #include <unordered_map>
28 #include <vector>
30 #include <sal/types.h>
31 #include <rtl/ustring.hxx>
34 class AstDeclaration;
36 typedef std::list< AstDeclaration* > DeclList;
38 class AstScope;
39 AstDeclaration* scopeAsDecl(AstScope* pScope);
40 AstScope* declAsScope(AstDeclaration* pDecl);
42 // flags used for attributes, properties and services
43 #define AF_INVALID 0x0000
44 #define AF_READONLY 0x0001
45 #define AF_OPTIONAL 0x0002
46 #define AF_MAYBEVOID 0x0004
47 #define AF_BOUND 0x0008
48 #define AF_CONSTRAINED 0x0010
49 #define AF_TRANSIENT 0x0020
50 #define AF_MAYBEAMBIGUOUS 0x0040
51 #define AF_MAYBEDEFAULT 0x0080
52 #define AF_REMOVABLE 0x0100
53 #define AF_ATTRIBUTE 0x0200
54 #define AF_PROPERTY 0x0400
56 enum ParseState
58 PS_NoState,
59 PS_TypeDeclSeen, // Seen complete typedef declaration
60 PS_ConstantDeclSeen, // Seen complete const declaration
61 PS_ExceptionDeclSeen, // Seen complete exception declaration
62 PS_InterfaceDeclSeen, // Seen complete interface declaration
63 PS_ServiceDeclSeen, // Seen complete service declaration
64 PS_SingletonDeclSeen, // Seen complete singleton declaration
65 PS_ModuleDeclSeen, // Seen complete module declaration
66 PS_AttributeDeclSeen, // Seen complete attribute declaration
67 PS_PropertyDeclSeen, // Seen complete property declaration
68 PS_OperationDeclSeen, // Seen complete operation declaration
69 PS_InterfaceInheritanceDeclSeen, // Seen complete interface inheritance decl
70 PS_ConstantsDeclSeen, // Seen complete constants declaration
72 PS_ServiceSeen, // Seen a SERVICE keyword
73 PS_ServiceIDSeen, // Seen the service ID
74 PS_ServiceSqSeen, // '{' seen for service
75 PS_ServiceQsSeen, // '}' seen for service
76 PS_ServiceBodySeen, // Seen complete service body
77 PS_ServiceMemberSeen, // Seen a service member
78 PS_ServiceIFHeadSeen, // Seen an interface member header
79 PS_ServiceSHeadSeen, // Seen an service member header
81 PS_SingletonSeen, // Seen a SINGLETON keyword
82 PS_SingletonIDSeen, // Seen the singleton ID
83 PS_SingletonSqSeen, // '{' seen for singleton
84 PS_SingletonQsSeen, // '}' seen for singleton
85 PS_SingletonBodySeen, // Seen complete singleton body
87 PS_ModuleSeen, // Seen a MODULE keyword
88 PS_ModuleIDSeen, // Seen the module ID
89 PS_ModuleSqSeen, // '{' seen for module
90 PS_ModuleQsSeen, // '}' seen for module
91 PS_ModuleBodySeen, // Seen complete module body
93 PS_ConstantsSeen, // Seen a CONSTANTS keyword
94 PS_ConstantsIDSeen, // Seen the constants ID
95 PS_ConstantsSqSeen, // '{' seen for constants
96 PS_ConstantsQsSeen, // '}' seen for constants
97 PS_ConstantsBodySeen, // Seen complete constants body
99 PS_InterfaceSeen, // Seen an INTERFACE keyword
100 PS_InterfaceIDSeen, // Seen the interface ID
101 PS_InterfaceHeadSeen, // Seen the interface head
102 PS_InheritSpecSeen, // Seen a complete inheritance spec
103 PS_ForwardDeclSeen, // Forward interface decl seen
104 PS_InterfaceSqSeen, // '{' seen for interface
105 PS_InterfaceQsSeen, // '}' seen for interface
106 PS_InterfaceBodySeen, // Seen an interface body
107 PS_InheritColonSeen, // Seen ':' in inheritance list
109 PS_SNListCommaSeen, // Seen ',' in list of scoped names
110 PS_ScopedNameSeen, // Seen a complete scoped name
111 PS_SN_IDSeen, // Seen an identifier as part of a scoped name
112 PS_ScopeDelimSeen, // Seen a scope delim as party of a scoped name
114 PS_ConstSeen, // Seen a CONST keyword
115 PS_ConstTypeSeen, // Parsed the type of a constant
116 PS_ConstIDSeen, // Seen the constant ID
117 PS_ConstAssignSeen, // Seen the '='
118 PS_ConstExprSeen, // Seen the constant value expression
120 PS_TypedefSeen, // Seen a TYPEDEF keyword
121 PS_TypeSpecSeen, // Seen a complete type specification
122 PS_DeclaratorsSeen, // Seen a complete list of declarators
124 PS_StructSeen, // Seen a STRUCT keyword
125 PS_StructHeaderSeen, // Seen struct header
126 PS_StructIDSeen, // Seen the struct ID
127 PS_StructSqSeen, // '{' seen for struct
128 PS_StructQsSeen, // '}' seen for struct
129 PS_StructBodySeen, // Seen complete body of struct decl
131 PS_MemberTypeSeen, // Seen type of struct or except member
132 PS_MemberDeclsSeen, // Seen decls of struct or except members
133 PS_MemberDeclsCompleted,// Completed one struct or except member to ';'
135 PS_EnumSeen, // Seen an ENUM keyword
136 PS_EnumIDSeen, // Seen the enum ID
137 PS_EnumSqSeen, // Seen '{' for enum
138 PS_EnumQsSeen, // Seen '}' for enum
139 PS_EnumBodySeen, // Seen complete enum body
140 PS_EnumCommaSeen, // Seen ',' in list of enumerators
142 PS_SequenceSeen, // Seen a SEQUENCE keyword
143 PS_SequenceSqSeen, // Seen '<' for sequence
144 PS_SequenceQsSeen, // Seen '>' for sequence
145 PS_SequenceTypeSeen, // Seen type decl for sequence
147 PS_FlagHeaderSeen, // Seen the attribute|property|interface member head
148 PS_AttrSeen, // Seen ATTRIBUTE keyword
149 PS_AttrTypeSeen, // Seen type decl for attribute
150 PS_AttrCompleted, // Seen complete attribute declaration
151 PS_ReadOnlySeen, // Seen READONLY keyword
152 PS_OptionalSeen, // Seen OPTIONAL keyword
153 PS_MayBeVoidSeen, // Seen MAYBEVOID yword
154 PS_BoundSeen, // Seen BOUND keyword
155 PS_ConstrainedSeen, // Seen CONSTRAINED keyword
156 PS_TransientSeen, // Seen TRANSIENT keyword
157 PS_MayBeAmbigiousSeen, // Seen MAYBEAMBIGIOUS keyword
158 PS_MayBeDefaultSeen, // Seen MAYBEDEFAULT keyword
159 PS_RemoveableSeen, // Seen REMOVABLE keyword
161 PS_PropertySeen, // Seen PROPERTY keyword
162 PS_PropertyTypeSeen, // Seen type decl for property
163 PS_PropertyCompleted, // Seen complete property declaration
165 PS_ExceptSeen, // Seen EXCEPTION keyword
166 PS_ExceptHeaderSeen, // Seen exception header keyword
167 PS_ExceptIDSeen, // Seen exception identifier
168 PS_ExceptSqSeen, // Seen '{' for exception
169 PS_ExceptQsSeen, // Seen '}' for exception
170 PS_ExceptBodySeen, // Seen complete exception body
172 PS_OpTypeSeen, // Seen operation return type
173 PS_OpIDSeen, // Seen operation ID
174 PS_OpParsCompleted, // Completed operation param list
175 PS_OpSqSeen, // Seen '(' for operation
176 PS_OpQsSeen, // Seen ')' for operation
177 PS_OpParCommaSeen, // Seen ',' in list of op params
178 PS_OpParDirSeen, // Seen parameter direction
179 PS_OpParTypeSeen, // Seen parameter type
180 PS_OpParDeclSeen, // Seen parameter declaration
182 PS_RaiseSeen, // Seen RAISES keyword
183 PS_RaiseSqSeen, // Seen '(' for RAISES
184 PS_RaiseQsSeen, // Seen ')' for RAISES
186 PS_DeclsCommaSeen, // Seen ',' in declarators list
187 PS_DeclsDeclSeen // Seen complete decl in decls list
190 #endif // INCLUDED_IDLC_INC_IDLCTYPES_HXX
192 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */