Skip to content

More optimal merging of list semantic values #158

Description

@paulgazz

Per @kaarthikalagappan 's observation, try merging list semantic values by joining their lists of children, instead of wrapping the lists under separate static conditionals.

        } else if (/* the semantic value is a list */ false) {
          /*
            check whether it's a list using, with the caveat that
            using a name change annotation will prevent this from
            working properly.  (we could add a check to prohibit name
            changes for list nodes.)

            SemanticValues.ValueType valueType = semanticValues.getValueType(nodeName);  // really should take grammar symbol

            assert(this.value.nodename == other.value.nodename)
            assert(not null, children not null)


            if valueType == SemanticValues.ValueType.LIST

            this.value.node.addAll(other.value.children);  // take one semantic, this.value, and all the elements from the other.value to it
           */

Add this to case 3 of the stackframe merge function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions