Examples of HomogeneousType


Examples of org.sablecc.util.Type.SimpleType.HomogeneousType

            throw new InternalException("Unhandle " + currentMacro.getClass());
        }

        if (node.getType() instanceof HomogeneousType) {

            HomogeneousType type = (HomogeneousType) node.getType();

            String listType = computeListType(type.getName());

            newList.newNormalDeclaration(listType);
            this.listStack.push(new NormalListDescriptor(listName, listType));

        }
        else {
            String leftListType;
            String rightListType;

            if (node.getType() instanceof SeparatedType) {
                SeparatedType type = (SeparatedType) node.getType();

                leftListType = computeListType(type.getLeftElementName());
                rightListType = computeListType(type.getRightElementName());

                newList.newSeparatedDeclaration(leftListType, rightListType);

                this.listStack.push(new DoubleListDescriptor(
                        DoubleListDescriptor.Type.SEPARATED, listName,
                        leftListType, rightListType));
            }
            else if (node.getType() instanceof AlternatedType) {
                AlternatedType type = (AlternatedType) node.getType();

                leftListType = computeListType(type.getLeftElementName());
                rightListType = computeListType(type.getRightElementName());

                newList.newAlternatedDeclaration(leftListType, rightListType);

                this.listStack.push(new DoubleListDescriptor(
                        DoubleListDescriptor.Type.ALTERNATED, listName,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.