99 {B}*"["{B}*"]")* {
100 yyextra->name += yytext;
101 BEGIN(Operator);
102 }
103<Start>{ID}({B}*"*")?{B}*"("{B}*"^"{B}*")"{B}*"(" { // Objective-C 2.0 block return type
104 if (!yyextra->insideObjC)
105 {
106 REJECT;
107 }
108 else
109 {
111 yyextra->type += yytext;
112 }
113 }
static void addType(yyscan_t yyscanner)
114<Start>{ID}{B}*"("{B}*{ID}{B}*")" { // Objective-C class categories
115 if (!yyextra->insideObjC)
116 {
117 REJECT;
118 }
119 else
120 {
121 yyextra->name += yytext;
122 }
123 }
124<Start>([~!]{B}*)?{ID}{B}*"["{B}*"]" { // PHP
125 if (!yyextra->insidePHP)
126 {
127 REJECT;
128 }
131 }
static void addTypeName(yyscan_t yyscanner)
132<Start>"anonymous_namespace{"[^}]+"}" { // anonymous namespace
133 if (!yyextra->scope.empty())
134 {
135 yyextra->scope+=
DString(
"::")+yytext;
136 }
137 else
138 {
139 yyextra->scope = yytext;
140 }
141 }
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
142<Start>([~!]{B}*)?{ID}/({B}*"["{B}*"]")* { // the []'s are for Java,
143
144
145
146
149 }
150<Start>{B}*"::"{B}* { // found a yyextra->scope specifier
151 if (!yyextra->scope.empty() && !yyextra->scope.endsWith("::"))
152 {
153 if (!yyextra->name.empty()) yyextra->scope+="::"+yyextra->name;
154 }
155 else
156 {
157 yyextra->scope = yyextra->name;
158 }
159 yyextra->name.clear();
160 }
161<Start>{B}*":" { // Objective-C argument separator
162 yyextra->name+=yytext;
163 }
164<Start>[*&]+ {
166 yyextra->type+=yytext;
167 }
168<Start>{B}+ {
170 }
171<Start>{B}*"("({ID}"::")*{B}*[&*]({B}*("const"|"volatile"){B}+)? {
172 if (yyextra->insidePHP) REJECT;
173 if (yyextra->insidePython) REJECT;
176 yyextra->type+=text.stripWhiteSpace();
177 }
178<Start>{B}*")" {
179 yyextra->type+=")";
180 }
181<Start>{B}*"decltype"/{B}*"(" {
182 yyextra->roundCount=0;
183 yyextra->type="decltype";
184 BEGIN(DeclType);
185 }
186<DeclType>{B}*"(" {
187 ++yyextra->roundCount;
188 yyextra->type+="(";
189 }
190<DeclType>{B}*")" {
191 yyextra->type+=")";
192 if (--yyextra->roundCount == 0) {
193 BEGIN(Start);
194 }
195 }
196<DeclType>. {
197 yyextra->type+=yytext;
198 }
199<Start>{B}*"(" { // TODO: function pointers
200 yyextra->args+="(";
201 BEGIN(ReadArgs);
202 }
203<Start>{B}*"[" {
204 yyextra->args+="[";
205 BEGIN(ReadArgs);
206 }
207<Start>{B}*"<" {
208 yyextra->name+="<";
209 yyextra->sharpCount=0;
210 yyextra->roundCount=0;
211 BEGIN(Template);
212 }
213<Template>"<<" { yyextra->name+="<<"; }
214<Template>">>" { yyextra->name+=">>"; }
215<Template>"(" { yyextra->name+="(";
216 yyextra->roundCount++;
217 }
218<Template>")" { yyextra->name+=")";
219 if (yyextra->roundCount>0)
220 {
221 yyextra->roundCount--;
222 }
223 }
224<Template>"<" {
225 yyextra->name+="<";
226 if (yyextra->roundCount==0)
227 {
228 yyextra->sharpCount++;
229 }
230 }
231<Template>">" {
232 yyextra->name+=">";
233 if (yyextra->roundCount==0)
234 {
235 if (yyextra->sharpCount)
236 --yyextra->sharpCount;
237 else
238 {
239 BEGIN(Start);
240 }
241 }
242 }
243<Template>. {
244 yyextra->name+=*yytext;
245 }
246<Operator>{B}*"("{B}*")"{B}*"<>"{Bopt}/"(" {
247 yyextra->name+="() <>";
248 BEGIN(ReadArgs);
249 }
250<Operator>{B}*"("{B}*")"{Bopt}/"(" {
251 yyextra->name+="()";
252 BEGIN(ReadArgs);
253 }
254<Operator>[^(]*{B}*("<>"{B}*)?/"(" {
255 yyextra->name+=yytext;
256 BEGIN(ReadArgs);
257 }
258<ReadArgs>"throw"{B}*"(" {
259 yyextra->exceptionString="throw(";
260 BEGIN(ReadExceptions);
261 }
262<ReadArgs>. {
263 yyextra->args+=*yytext;
264 }
265<ReadExceptions>. {
266 yyextra->exceptionString+=*yytext;
267 }
268<*>.
269<*>\n
270
271%%