#implicitCopy
profiling ::=
#ignore(C++)
[insert_include]?
[
=> local sName1;
=> local sName2;
=> local sPrefix2;
=> local bNewLine;
->[
#readCompleteIdentifier:sName1
[
"::"
['~' => sPrefix2 = "destructor_"; | => sPrefix2 = "";]
#readIdentifier:sName2
=> set sName2 = sPrefix2 + sName2;
|
=> set sName2 = "";
]?
#check(sName2 || ((sName1 != "if") && (sName1 != "while") && (sName1 != "catch")))
'('
[parameter_token_list]?
')'
[post_function_token_decl]?
[':' constructor_initialization_token_list | !':']
'{' #!ignore ignoreLineBlanks
['\n' | => set bNewLine = true;]
!"#ifdef RAW_PROFILING"
] => {
if bNewLine {
@@endl()@@
}
local sKey = sName1 + "_" + sName2;
insert this.listOfKeys[sKey] = sKey;
if sName2 {
insert this.listOfKeys[sKey].class = sName1;
insert this.listOfKeys[sKey].name = sName2;
} else {
insert this.listOfKeys[sKey].name = sName1;
}
@#ifdef RAW_PROFILING
RawProfiling::RawProfiling::@sKey@_counter++;
RawProfiling::RawProfiling theProfiling(RawProfiling::RawProfiling::@sKey@_chronograph);
#endif
@
}
]*
->#empty;
insert_include ::=
![->["#ifdef" "RAW_PROFILING" '#' "include"]]
->["#include" #!ignore ->'\n']
=> {
@
#ifdef RAW_PROFILING
# include "RawProfiling.h"
#endif
@
};
parameter_token_list ::= parameter_tokens [',' parameter_tokens]*;
parameter_tokens ::=
[
#readIdentifier | '[' | ']' |
'.' |
#readInteger | '*' | '&' | "::"
]+;
post_function_token_decl ::= [#readIdentifier | '(' post_function_token_decl ')' | '.' | "::"]+;
constructor_initialization_token_list ::= constructor_initialization_tokens [',' constructor_initialization_tokens]*;
constructor_initialization_tokens ::= #readIdentifier '(' expression ')';
expression ::=
[[~['[' | ']' '(' | ')' | '{' | '}' | ',']]+ | '[' expression ']' | '(' expression ')']+;
ignoreLineBlanks : #!ignore ::= ["//" [~'\n']* | '\t' | ' ' | '\r']*;