00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef G__TOKENINFO_H
00018 #define G__TOKENINFO_H
00019
00020
00021 #ifndef G__API_H
00022 #include "Api.h"
00023 #endif
00024
00025 namespace Cint {
00026
00027 class G__ClassInfo;
00028 class G__MethodInfo;
00029
00030
00031
00032
00033
00034
00035
00036 class
00037 #ifndef __CINT__
00038 G__EXPORT
00039 #endif
00040 G__TokenInfo {
00041 public:
00042 enum G__TokenType { t_invalid
00043 , t_class , t_typedef, t_fundamental , t_enum
00044 , t_memberfunc, t_globalfunc
00045 , t_datamember, t_local, t_global, t_enumelement
00046 };
00047 enum G__TokenProperty {p_invalid , p_type , p_data, p_func};
00048
00049 ~G__TokenInfo() {}
00050 G__TokenInfo() :
00051 tokentype(t_invalid), tokenproperty(p_invalid), methodscope(),
00052 bytecode(NULL), localvar(NULL), glob(), nextscope(), tinfo() { Init(); }
00053 G__TokenInfo(const G__TokenInfo& tki);
00054 G__TokenInfo& operator=(const G__TokenInfo& tki);
00055 void Init();
00056
00057
00058 G__MethodInfo MakeLocalTable(G__ClassInfo& tag_scope
00059 ,const char* fname,const char* paramtype);
00060
00061
00062 int Query(G__ClassInfo& tag_scope,G__MethodInfo& func_scope
00063 ,const char* preopr,const char* name,const char* postopr);
00064
00065
00066 enum G__TokenType GetTokenType() { return(tokentype); }
00067 enum G__TokenProperty GetTokenProperty() { return(tokenproperty); }
00068 G__ClassInfo GetNextScope() { return(nextscope); }
00069
00070 private:
00071 enum G__TokenType tokentype;
00072 enum G__TokenProperty tokenproperty;
00073 G__MethodInfo methodscope;
00074 struct G__bytecodefunc *bytecode;
00075 struct G__var_array *localvar;
00076 G__ClassInfo glob;
00077 G__ClassInfo nextscope;
00078 G__TypeInfo tinfo;
00079
00080 int SearchTypeName(const char* name,const char* postopr);
00081 int SearchLocalVariable(const char* name,G__MethodInfo& func_scope
00082 ,const char* postopr);
00083 int SearchDataMember(const char* name,G__ClassInfo& tag_scope
00084 ,const char* postopr);
00085 int SearchGlobalVariable(const char* name,const char* postopr);
00086 int SearchMemberFunction(const char* name,G__ClassInfo& tag_scope);
00087 int SearchGlobalFunction(const char* name);
00088 void GetNextscope(const char* name,G__ClassInfo& tag_scope);
00089 };
00090
00091 }
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 using namespace Cint;
00131 #endif