Package com.dtrules.compiler.ebl.cup.parser

Examples of com.dtrules.compiler.ebl.cup.parser.RLocalType


                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! ";
                }
View Full Code Here

TOP

Related Classes of com.dtrules.compiler.ebl.cup.parser.RLocalType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.