Package apigen.adt.api.types

Examples of apigen.adt.api.types.Entry


         
         
          while (!entries.isEmpty()) { //For each entry in the module
            List<Entry> alts = new LinkedList<Entry>();
            ListIterator<Entry> iter = entries.listIterator();
            Entry first = iter.next();
            alts.add(first);
            String typeId = ((ATermAppl) first.getSort()).getAFun().getName();

            iter.remove();
            while (iter.hasNext()) {
                try {
                    Entry entry = iter.next();
                    if (((ATermAppl) entry.getSort())
                        .getAFun()
                        .getName()
                        .equals(typeId)) {
                        alts.add(entry);
                        iter.remove();
View Full Code Here


            }
        }
    }

    private Type processAlternatives(String typeId, String moduleName, List<Entry> alts) {
        Entry first = alts.get(0);

        if (first.isList() || first.isSeparatedList() || first.isNamedList()) {
            if (alts.size() > 1) {
                throw new RuntimeException("Multiple definitions of same list: " + alts);
            }

            if (first.isSeparatedList()) {
                return processSeparatedList(typeId, moduleName, first);
            } else if (first.isNamedList()) {
                return processNamedList(typeId, moduleName, first);
            } else {
                return processList(typeId, moduleName, first);
            }
        }
View Full Code Here

    private Type processConstructors(String typeId, String moduleName, List<Entry> alts) {
        Type type = new Type(typeId, moduleName);
        ListIterator<Entry> iter = alts.listIterator();

        while (iter.hasNext()) {
            Entry entry = iter.next();

            if (entry.isConstructor()) {
                String altId = ((ATermAppl) entry.getAlternative()).getAFun().getName();
                ATerm pattern = entry.getTermPattern();

                Alternative alt = new Alternative(altId, pattern);

                addAlternative(typeId, type, altId, alt);
            } else {
View Full Code Here

TOP

Related Classes of apigen.adt.api.types.Entry

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.