Class AttributeDict


  • public class AttributeDict
    extends java.lang.Object
    Track the attributes within retval, arg lists etc...

    Each rule has potentially 3 scopes: return values, parameters, and an implicitly-named scope (i.e., a scope defined in a rule). Implicitly-defined scopes are named after the rule; rules and scopes then must live in the same name space--no collisions allowed.

    • Field Detail

      • name

        public java.lang.String name
      • predefinedTokenDict

        public static final AttributeDict predefinedTokenDict
        All Token scopes (token labels) share the same fixed scope of of predefined attributes. I keep this out of the Token interface to avoid a runtime type leakage.
      • attributes

        public final java.util.LinkedHashMap<java.lang.String,​Attribute> attributes
        The list of Attribute objects.
    • Constructor Detail

      • AttributeDict

        public AttributeDict()
    • Method Detail

      • get

        public Attribute get​(java.lang.String name)
      • getName

        public java.lang.String getName()
      • size

        public int size()
      • intersection

        public java.util.Set<java.lang.String> intersection​(AttributeDict other)
        Return the set of keys that collide from this and other.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object