44 parentIdxOfBuffer(-1),
46 bufferSkipBlocks(false),
47 bufferSkipOuterBlocks(false),
50 followLocalIncludes(true),
51 followGlobalIncludes(true),
52 wantPreprocessor(true),
53 parseComplexMacros(true),
56 handleFunctions(true),
62 storeDocumentation(false),
181 enum EClassType { ctStructure = 0, ctClass = 1, ctUnion = 3 };
192 bool success = Parse();
196 return success ? 0 : 1;
205 wxChar SkipToOneOfChars(
const wxString& chars,
bool supportNesting =
false,
bool singleCharToken =
true);
214 void SkipAngleBraces();
219 void HandleIncludes();
224 void HandleNamespace();
236 void HandleFunction(
wxString& name,
bool isOperator =
false,
bool isPointer =
false);
241 void HandleForLoopArguments();
246 void HandleConditionalArguments();
252 bool CalcEnumExpression(
Token* tokenParent,
long& result,
wxString& peek);
255 void HandleTypedef();
274 bool ReadClsNames(
wxString& ancestor);
292 int implLineStart = 0,
295 bool isOperator =
false,
296 bool isImpl =
false);
306 bool InitTokenizer();
313 Token* TokenExists(
const wxString& name,
const Token* parent = 0,
short int kindMask = 0xFFFF);
320 Token* FindTokenFromQueue(std::queue<wxString>& q,
322 bool createIfNotExist =
false,
323 Token* parentIfCreated = 0);
335 void GetTemplateArgs();
346 void ResolveTemplateArgs(
Token* newToken);
361 std::map<wxString, wxString>& results);
372 bool IsStillAlive(
const wxString& funcInfo);
387 void RefineAnonymousTypeToken(
short int typeMask,
wxString alise);
480 #endif // PARSERTHREAD_H wxString m_LastUnnamedTokenName
TODO: describe me here.
size_t m_EnumUnnamedCount
wxString fileOfBuffer
which file the buffer belongs to, this usually happens when we parse a piece of the cbEditor and the ...
std::queue< wxString > m_EncounteredNamespaces
for member funcs implementation or a function declaration below eg: int ClassA::FunctionB(); Encounte...
A parser threaded task, which can be assigned to the thread task pool, and run there.
bool followLocalIncludes
parse the file in #include "file" directive
wxString m_PointerOrRef
a pointer indicator or a references
bool isTemp
this value is passed to the generated Token's m_IsTemp property
TokenScope m_LastScope
this member define the scope type of member variables, which is: public, private protected or undefin...
TokenIdxSet m_UsedNamespacesIds
globally included namespaces by "using namespace" statement
bool bufferSkipOuterBlocks
not used
unsigned int m_FileIdx
source file index on the "file map tree"
a container class to hold all the Tokens getting from parsing stage
int parentIdxOfBuffer
when parsing a function body, all the tokens are the children of the function token ...
This is just a simple lexer class.
bool m_IsLocal
if true, means we are parsing a file which belongs to a C::B project, otherwise, we are parsing a fil...
wxString m_Filename
the file name of the parsing source
TokenTree * m_TokenTree
a pointer to the token tree, all the tokens will be added to that tree structure
unsigned int m_FileSize
file size, actually the length of the wxString
bool handleEnums
whether to parse "enum ..." like statement
wxUSE_UNICODE_dependent wxChar
bool handleClasses
whether to parse "class ...." like statement
ParserBase * m_Parent
a pointer to its parent Parser object, the Parserthread class has two place to communicate with Parse...
wxString m_TemplateArgument
holds current template argument(s) when a template occurs
std::vector< NameSpace > NameSpaceVec
a symbol found in the parsed files, it can be many kinds, such as a variable, a class and so on...
std::set< int, std::less< int > > TokenIdxSet
bool m_ParsingTypedef
this makes a difference in unnamed class/struct/enum handling
EClassType
specify which "class like type" we are handling: struct or class or union
bool handleFunctions
whether to parse the functions
bool handleVars
whether to parse the variable definition
wxString m_LastToken
hold the previous token string
Tokenizer m_Tokenizer
if we regard the parserThread class as a syntax analyzer, then the Tokenizer class is regard as the l...
bool wantPreprocessor
handle the #if like preprocessor directives, this value is passed to Tokenizer
#define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M)
bool parseComplexMacros
not used
bool storeDocumentation
should tokenizer detect and store doxygen documentation?
std::queue< wxString > m_EncounteredTypeNamespaces
namespaces in function return types for a function declaration below: e.g.
wxString m_Str
This is a very important member variables! It serves as a type stack, eg: parsing the statement: "uns...
#define CC_LOCKER_TRACK_TT_MTX_LOCK(M)
This is what you have to use instead of wxThread to add tasks to the Thread Pool. ...
bool useBuffer
useBuffer specifies that we're not parsing a file, but a temporary buffer.
Token * m_LastParent
parent Token, for example, when you are parsing in the class member variables, m_LastParent holds a p...
bool handleTypedefs
whether to parse "typedef ..." like statement
bool followGlobalIncludes
parse the file in #include <file> directive
int initLineOfBuffer
since we are not parsing start from the first line of the file, this is the first line number of the ...
bool bufferSkipBlocks
do we parse inside the {...} body
size_t m_StructUnionUnnamedCount
ParserThreadOptions m_Options
parser options, see the ParserThreadOptions structure
int Execute()
Execute() is a virtual function derived from cbThreadedTask class, we should override it here...
wxString m_Buffer
a wxString holding the parsing buffer, if it is a file in the hard disk, then this stands for the fil...