throw new RuntimeException("Invalid Possessive. "+ident+" is not an Entity");
}
if(theType == -1){
if(localtypes.containsKey(ident.toLowerCase())){
RLocalType t = localtypes.get(ident.toLowerCase());
theType = t.type;
next.local = true;
next.value = t.index +" local@ ";
}else{
throw new RuntimeException("Undefined attribute '"+next.value+"'");
}
}else{
next.value = (entity.length()>0?entity+".":"")+ident;
}
unget = new RSymbol(false, new Symbol(sym.COMMA)); // Inject a comma after every possessive
unget.value = ",";
}
if(next.sym==sym.IDENT){
String entity = "";
String ident = next.value.toString();
if(ident.indexOf('.')>=0){
entity=ident.substring(0,ident.indexOf('.'));
ident =ident.substring(ident.indexOf('.')+1);
}
int theType = identType(ident,entity);
if(theType == -1 ){
if(localtypes.containsKey(next.value.toString().toLowerCase())){
RLocalType t = localtypes.get(next.value.toString().toLowerCase());
theType = t.type;
next = new RSymbol(true, next);
next.value = t.index +" local@ ";
((RSymbol)next).leftvalue = t.index +" local! ";
}