Changeset 86eec5c in tol
- Timestamp:
- May 20, 2013, 1:40:37 PM (13 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- f18e2c2
- Parents:
- be8fad2
- Location:
- tol/btol/bgrammar
- Files:
-
- 2 edited
-
nameblock.cpp (modified) (21 diffs)
-
tol_bnameblock.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/nameblock.cpp
rbe8fad2 r86eec5c 117 117 : BObject (), 118 118 public_ (), 119 private_ (),119 //private_ (), 120 120 evLevel_ (BGrammar::Level()), 121 121 level_ (-999999999), … … 131 131 { 132 132 SetEmptyKey(public_ ,emptyHashKey_); 133 SetEmptyKey(private_,emptyHashKey_);133 //SetEmptyKey(private_,emptyHashKey_); 134 134 #if (__USE_POOL__==__POOL_BFSMEM__) 135 135 short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->GetPageNum()); … … 145 145 : BObject (fullName), 146 146 public_ (), 147 private_ (),147 //private_ (), 148 148 evLevel_ (BGrammar::Level()), 149 149 level_ (-999999999), … … 159 159 { 160 160 SetEmptyKey(public_ ,emptyHashKey_); 161 SetEmptyKey(private_,emptyHashKey_);161 //SetEmptyKey(private_,emptyHashKey_); 162 162 #if (__USE_POOL__==__POOL_BFSMEM__) 163 163 short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->GetPageNum()); … … 173 173 : BObject (), 174 174 public_ (), 175 private_ (),175 //private_ (), 176 176 evLevel_ (BGrammar::Level()), 177 177 level_ (-999999999), … … 187 187 { 188 188 SetEmptyKey(public_ ,emptyHashKey_); 189 SetEmptyKey(private_,emptyHashKey_);189 //SetEmptyKey(private_,emptyHashKey_); 190 190 #if (__USE_POOL__==__POOL_BFSMEM__) 191 191 short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->GetPageNum()); … … 232 232 } 233 233 public_.clear(); 234 private_.clear();234 //private_.clear(); 235 235 set_.Delete(); 236 236 father_ = NULL; … … 473 473 if(oldBuilding && !BStandardOperator::evaluatingFunctionArgument_) 474 474 { 475 assert(name.HasName());475 //assert(name.HasName()); 476 476 oldBuildingLevel = oldBuilding->Level(); 477 477 ns_resultLevel = ns_result->Level(); … … 794 794 795 795 } 796 private_[name] = obj; 796 //private_[name] = obj; 797 public_[name] = obj; 797 798 } 798 799 if(obj->Grammar()==GraCode()) … … 865 866 } 866 867 } 868 /* 867 869 for(iter=private_.begin(); iter!=private_.end(); iter++) 868 870 { … … 889 891 } 890 892 } 893 */ 891 894 return(true); 892 895 } … … 958 961 { 959 962 /* */ 963 if(memberName[0]!='_') { return(NULL); } 964 //if(memberName[1]=='.') { return(NULL); } 965 //if(memberName=="_this") { result = owner_; } 960 966 BSyntaxObject* result = NULL; 961 967 if(Class()) … … 974 980 } 975 981 } 982 if(!result) 983 { 984 // BObjByNameHash::const_iterator found = private_.find(memberName); 985 // if(found==private_.end()) 986 BObjByNameHash::const_iterator found = public_.find(memberName); 987 if(found==public_.end()) 988 { 989 if(memberName=="_this") 990 { 991 result = owner_; 992 } 993 } 994 else 995 { 996 result = found->second; 997 } 998 } 976 999 /* */ 977 if(!result)978 {979 BObjByNameHash::const_iterator found = private_.find(memberName);980 if(found==private_.end())981 {982 if(memberName=="_this")983 {984 result = owner_;985 }986 }987 else988 {989 result = found->second;990 }991 }992 1000 return(result); 993 1001 } … … 1098 1106 for(iter=pbm.begin(); iter!=pbm.end(); iter++) 1099 1107 { 1100 ok = add_using_symbol(name, iter, false, false, usingAlsoSpecial); 1101 } 1108 bool uPr = false; 1109 bool uRO = false; 1110 if(name[0]=='_') 1111 { 1112 if(name[1]=='.') 1113 { 1114 uRO = usingAlsoReadOnly; 1115 } 1116 else 1117 { 1118 uPr = usingAlsoPrivate; 1119 } 1120 } 1121 ok = add_using_symbol(name, iter, uRO, uPr, usingAlsoSpecial); 1122 } 1123 /* 1102 1124 BObjByNameHash& prm = ns.Private(); 1103 1125 for(iter=prm.begin(); iter!=prm.end(); iter++) … … 1106 1128 usingAlsoReadOnly, usingAlsoPrivate, usingAlsoSpecial); 1107 1129 } 1130 */ 1108 1131 return(ok); 1109 1132 } … … 1236 1259 } 1237 1260 } 1261 /* 1238 1262 for(iter=private_.begin(); iter!=private_.end(); iter++) 1239 1263 { … … 1254 1278 } 1255 1279 } 1280 */ 1256 1281 return(lst); 1257 1282 } … … 1274 1299 } 1275 1300 } 1301 /* 1276 1302 for(iter=private_.begin(); iter!=private_.end(); iter++) 1277 1303 { … … 1284 1310 } 1285 1311 } 1312 */ 1286 1313 return(lst); 1287 1314 } … … 1322 1349 } 1323 1350 } 1351 /* 1324 1352 for(iter=private_.begin(); iter!=private_.end(); iter++) 1325 1353 { … … 1332 1360 } 1333 1361 } 1362 */ 1334 1363 doingRebuildFullNameDeep = false; 1335 1364 } -
tol/btol/bgrammar/tol_bnameblock.h
rbe8fad2 r86eec5c 76 76 static BRequiredPackage globalRequiredPackages_; 77 77 BObjByNameHash public_; 78 BObjByNameHash private_;78 //BObjByNameHash private_; 79 79 BSet set_; 80 80 const BNameBlock* father_; … … 131 131 const BObjByNameHash& Public () const { return(public_ ); } 132 132 BObjByNameHash& Public () { return(public_ ); } 133 const BObjByNameHash& Private() const { return(private_); }134 BObjByNameHash& Private() { return(private_); }133 //const BObjByNameHash& Private() const { return(private_); } 134 // BObjByNameHash& Private() { return(private_); } 135 135 const BSet& Set () const { return(set_); } 136 136 BSet& Set () { return(set_); }
Note: See TracChangeset
for help on using the changeset viewer.
