00001
00002
00003 #ifndef type_rep_i_h
00004 #define type_rep_i_h
00005
00006 #include <sstream>
00007 #include <cctype>
00008 #include <ptree.h>
00009 #include "ptree_util.h"
00010 #include "except.h"
00011 #include "scope.h"
00012 #include "typedef.h"
00013 #include "symbol_table.h"
00014 #include "enum.h"
00015 #include "class.h"
00016 #include "symbol_name.h"
00017
00018
00019
00022 class Type_reader {
00023
00024
00025
00026
00027
00028 enum {
00029 iInt = 01,
00030 iUnsigned = 010,
00031 iShort = 0100,
00032 iLong = 01000,
00033 iSigned = 010000,
00034 iFloat = 0100000,
00035 iDouble = 01000000,
00036 iChar = 010000000,
00037 };
00038 long mask;
00039 Type user_type;
00040 Type* builtin;
00041 Type qualifiers;
00042 Ptree* user_id;
00043 Abstract_scope* scope;
00044
00045 bool is_type_declaration;
00046 Ptree* name_for_anon;
00047
00048 Type result;
00049 public:
00050 Type get_result() const { return result; }
00051
00052 public:
00053 Type_reader(Abstract_scope* scope, Ptree* tree, bool is_type_declaration, Ptree* name_for_anon);
00054
00055 private:
00063 Ptree* read_type(Ptree*const tree);
00064 };
00065
00066 #endif // type_rep_i_h