Called before parsing content. Push the class name onto the class name
        stack. Used to construct the full name for members.
177519
def before_content(self):
        
        ChapelObject.before_content(self)
        if self.names:
            self.env.temp_data['chpl:class'] = self.names[0][0]
            self.clsname_set = True
534613
def populate_class_members(self, element_cls, prop_name):
        
        super(ZeroOrOne, self).populate_class_members(element_cls, prop_name)
        self._add_getter()
        self._add_creator()
        self._add_inserter()
        self._add_adder()
        self._add_get_or_adder()
        self._add_remover()
79187
public void put(String classname, ClassDescriptor cld)
    {
        cld.setRepository(this); // BRJ
        synchronized (descriptorTable)
        {
            descriptorTable.put(classname, cld);
            List extentClasses = cld.getExtentClasses();
            for (int i = 0; i < extentClasses.size(); ++i)
            {
                addExtent(((Class) extentClasses.get(i)).getName(), cld);
            }
            changeDescriptorEvent();
        }
    }
976707
private final void push() {
    if (ptr >= stack.length) {
      // doubling here is probably overkill, but anything that needs to double more than
      // once (32 levels deep) is very atypical anyway.
      byte[] newstack = new byte[stack.length<<1];
      System.arraycopy(stack,0,newstack,0,stack.length);
      stack = newstack;
    }
    stack[ptr++] = state;
  }
806979
def populate_class_members(self, element_cls, prop_name):
        
        super(OneAndOnlyOne, self).populate_class_members(
            element_cls, prop_name
        )
        self._add_getter()
39385
function processClassName(name, item) {
		name = transformClassName(name, item, 'element');
		name = transformClassName(name, item, 'modifier');
		
		// expand class name
		// possible values:
		// * block__element
		// * block__element_modifier
		// * block__element_modifier1_modifier2
		// * block_modifier
		var block = '', element = '', modifier = '';
		var separators = getSeparators();
		if (~name.indexOf(separators.element)) {
			var elements = name.split(separators.element);
			block = elements.shift();

			var modifiers = elements.pop().split(separators.modifier);
			elements.push(modifiers.shift());
			element = elements.join(separators.element);
			modifier = modifiers.join(separators.modifier);
		} else if (~name.indexOf(separators.modifier)) {
			var blockModifiers = name.split(separators.modifier);
			
			block = blockModifiers.shift();
			modifier = blockModifiers.join(separators.modifier);
		}
		
		if (block || element || modifier) {
			if (!block) {
				block = item.__bem.block;
			}
			
			// inherit parent bem element, if exists
//			if (item.parent && item.parent.__bem && item.parent.__bem.element)
//				element = item.parent.__bem.element + separators.element + element;
			
			// produce multiple classes
			var prefix = block;
			var result = [];
			
			if (element) {
				prefix += separators.element + element;
				result.push(prefix);
			} else {
				result.push(prefix);
			}
			
			if (modifier) {
				result.push(prefix + separators.modifier + modifier);
			}
			
			if (!item.__bem.block || modifier) {
				item.__bem.block = block;
			}
			
			item.__bem.element = element;
			item.__bem.modifier = modifier;
			
			return result;
		}
		
		// ...otherwise, return processed or original class name
		return name;
	}
453764
protected void addAsFirst(NonDelayedClassInfo classInfo) {
        String methodName = "addAsFirst";
        boolean doLog = tc.isDebugEnabled();
        String useHashText = (doLog ? getHashText() : null);
        String useClassHashText = (doLog ? classInfo.getHashText() : null);

        if (doLog) {
            logLinks(methodName, classInfo);
        }

        if (firstClassInfo == null) {
            if (doLog) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] Adding [ {1} ] to empty",
                                                  new Object[] { useHashText, useClassHashText }));
            }

            firstClassInfo = classInfo;

            lastClassInfo = classInfo;

            // last == first
            // lastClassInfoName == firstClassInfoName

            // first.next remains null
            // first.prev remains null

        } else if (firstClassInfo == lastClassInfo) {
            if (doLog) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] Adding [ {1} ] to singleton [ {2} ]",
                                                  new Object[] { useHashText, useClassHashText, firstClassInfo.getHashText() }));
            }

            firstClassInfo = classInfo;

            firstClassInfo.setNextClassInfo(lastClassInfo);
            lastClassInfo.setPriorClassInfo(classInfo);

            // last != first
            // lastClassInfoName != firstClassInfoName

            // first.prev == null
            // first.next == last

            // last.prev == first
            // last.next == null

        } else {
            if (doLog) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] Adding [ {1} ] to multitude [ {2} ]",
                                                  new Object[] { useHashText,
                                                                useClassHashText,
                                                                firstClassInfo.getHashText() }));
            }

            classInfo.setNextClassInfo(firstClassInfo);

            firstClassInfo.setPriorClassInfo(classInfo);

            firstClassInfo = classInfo;

            if (classInfos.size() > ClassInfoCache.classInfoCacheLimit) {
                NonDelayedClassInfo oldLastClassInfo = lastClassInfo;
                String lastClassName = lastClassInfo.getName();
                classInfos.remove(lastClassName);

                discardRef(lastClassName); // No current use for the old last class name; discard it.

                lastClassInfo = oldLastClassInfo.getPriorClassInfo();

                lastClassInfo.setNextClassInfo(null);

                // oldLastClassInfo.setNextClassInfo(null);
                oldLastClassInfo.setPriorClassInfo(null);

                if (doLog) {
                    Tr.debug(tc, MessageFormat.format("[ {0} ] new last [ {1} ] displaces [ {2} ]",
                                                      new Object[] { useHashText,
                                                                    lastClassInfo.getHashText(),
                                                                    oldLastClassInfo.getHashText() }));
                }

                DelayedClassInfo delayedClassInfo = oldLastClassInfo.getDelayedClassInfo();
                if (delayedClassInfo != null) {
                    if (doLog) {
                        Tr.debug(tc, MessageFormat.format("[ {0} ] Clearing link on displaced [ {1} ]",
                                                          new Object[] { useHashText, oldLastClassInfo.getHashText() }));
                    }

                    delayedClassInfo.setClassInfo(null);
                    oldLastClassInfo.setDelayedClassInfo(null);
                }
            }
        }
    }
1217646
function makeClassname(prefix) {
  function classname () {
    var result = {},
        objects = {},
        resultString = "";

    function add (strings) {
      classname.each(strings.split(" "), function (string) {
        result[string] = !!string;
      });
    }

    classname.each([].slice.call(arguments), function (x) {
      switch (classname.getType(x)) {
        case "string":
        case "number":
          add(x);
          break;

        case "array":
          add(classname.apply(null, x));
          break;

        case "element":
          add(classname(x.className || ""));
          break;

        case "nodelist":
          add(classname.apply(null, [].slice.call(x)));
          break;

        case "jquery":
          add(classname.apply(null, x.get()));
          break;

        case "object":
          objects = classname.extend(objects, x);
          break;
      }
    });

    result = classname.extend(result, objects);

    classname.each(result, function (val, key) {
      if (val) {
        resultString += " " + (prefix || "") + key;
      }
    });

    return resultString.substr(1);
  }

  classname.setTo = function (elements) {
    var type = classname.getType(elements);

    if (type === "element") {
      elements = [elements];
    }

    if (type === "jquery") {
      elements = elements.get();
    }

    if (type === "nodelist") {
      elements = [].slice.call(elements);
    }

    return function () {
      var classNames = classname.apply(null, arguments);

      classname.each(elements, function (element) {
        element.className = classNames;
      });
    };
  };

  classname.each = function (arr, fn) {
    var type = classname.getType(arr);

    if (type === "array") {
      for (var i = 0; i < arr.length; i++) {
        fn(arr[i], i);
      }
    }

    if (type === "object") {
      for (var key in arr) {
        fn(arr[key], key);
      }
    }
  };

  classname.getType = function (x) {
    var type = Object.prototype.toString.call(x).slice(8, -1).toLowerCase();

    if (type === "object" && x.jquery) {
      return "jquery";
    }

    if (type.indexOf("element") > 1) {
      return "element";
    }

    return type;
  };

  classname.extend = function (obj1, obj2) {
    var result = {},
        objs = [obj1, obj2];

    classname.each(objs, function (obj) {
      classname.each(obj, function (val, key) {
        if (obj.hasOwnProperty(key)) {
          result[key] = val;
        }
      });
    });

    return result;
  }

  return classname
}
613975
private void push(final LazyNode token){
		stackTop.addChild(token);
		// The stack allocation strategy here is to increase it in increments
		// of a power of two. This lets us check when all low bits are set and
		// its time to increase the stack again.
		// This lets us do a compare between a constant and a variable instead
		// of between two variables.
		if((stackPointer & STACK_INCREASE)==STACK_INCREASE){
			LazyNode[] newStack=new LazyNode[STACK_SIZE+STACK_INCREASE+1];
			System.arraycopy(stack,0,newStack,0,STACK_SIZE);
			STACK_SIZE=STACK_SIZE+STACK_INCREASE+1;
			stack=newStack;
		}
		stack[stackPointer++]=token;
		stackTop=token;
	}
449344
private void init(int ignoreFrames, boolean partial)
    {
        // Extract stack components, after we look for the Frame constructor
 	    // itself and pull that off the stack!
        int check=_stack.length;
        if (check>3) check=3;
        for (int i=0;i<check;i++)
        {
            if (__className.equals(_stack[i].getClassName()) &&
                "<init>".equalsIgnoreCase(_stack[i].getMethodName()))
            {
                _top=i+1;
                break;
            }
        }
        _top+=ignoreFrames;
        _where=_stack[_top].toString();
        if (!partial) complete();
    }
938656
private void push(ScopeOptions options) throws JSONException {
        m_top += 1;
        if (m_top >= MAX_DEPTH) {
            throw new JSONException("Nesting too deep.");
        }
        try {
            m_writer.write(options.m_prefix);
        }
        catch (IOException e) {
            throw new JSONException(e);
        }

        HashSetOfString keyTracker = options.createKeyTracker();
        m_scopeStack[m_top] = keyTracker;
        m_mode = (keyTracker == null) ? 'a' : 'k';
        m_expectingComma = false;
    }
32071
def _push(self, title, view, class_name, is_class, **kwargs):
        

        # Set the page title
        set_view_attr(view, "title", title, cls_name=class_name)

        module_name = view.__module__
        method_name = view.__name__

        _endpoint = build_endpoint_route_name(view, "index" if is_class else method_name, class_name)
        endpoint = kwargs.pop("endpoint", _endpoint)
        kwargs.setdefault("endpoint_kwargs", {})
        order = kwargs.pop("order", 0)

        # Tags
        _nav_tags = get_view_attr(view, "nav_tags", ["default"], cls_name=class_name)
        tags = kwargs.pop("tags", _nav_tags)
        if not isinstance(tags, list):
            _ = tags
            tags = [_]
        kwargs["tags"] = tags

        # visible: accepts a bool or list of callback to execute
        visible = kwargs.pop("visible", [True])
        if not isinstance(visible, list):
            visible = [visible]

        if get_view_attr(view, "nav_visible", cls_name=class_name) is False:
            visible = False

        kwargs["view"] = view
        kwargs["visible"] = visible
        kwargs["active"] = False
        kwargs["key"] = class_name

        if is_class:  # class menu
            kwargs["endpoint"] = endpoint
            kwargs["has_subnav"] = True
        else:
            kwargs["has_subnav"] = False
            kwargs.update({
                "order": order,
                "has_subnav": False,
                "title": title,
                "endpoint": endpoint,
            })

        self._title_map[endpoint] = title

        path = "%s.%s" % (module_name, method_name if is_class else class_name)
        attach_to = kwargs.pop("attach_to", [])
        if not attach_to:
            attach_to.append(path)

        for path in attach_to:
            if path not in self.MENU:
                self.MENU[path] = {
                    "title": None,
                    "endpoint": None,
                    "endpoint_kwargs": {},
                    "order": None,
                    "subnav": [],
                    "kwargs": {}
                }

            if is_class:  # class menu
                self.MENU[path]["title"] = title
                self.MENU[path]["order"] = order
                self.MENU[path]["kwargs"] = kwargs

            else:  # sub menu
                self.MENU[path]["subnav"].append(kwargs)
95296
public function onContentParsing()
    {
        $this->triggerEvent(self::API_VERSION_0_9, 'before_parse_content', array(&$this->rawContent));
        $this->triggerEvent(self::API_VERSION_1_0, 'onContentParsing', array(&$this->rawContent));
    }
1110381
private void pushTag(String qName) {
		final String currentTag = getCurrentTag();
		if ("".equals(currentTag)) {
			mTagStack.push(qName);
		} else {
			mTagStack.push(getCurrentTag() + "." + qName);
		}
	}
899214
protected void addName() {
        if (Strings.isNotEmpty(builder)) {
            int endOffset = 0;
            if (Strings.endsWith(builder, tagSeparator)) { // Ends with ','.
                endOffset = 1;
            }
            if (Strings.startsWith(builder, inheritanceMarker)) { // Starts with '.'.
                inherits.add(builder.substring(1, builder.length() - endOffset));
            } else {
                tags.add(builder.substring(0, builder.length() - endOffset));
            }
            Strings.clearBuilder(builder);
        }
    }
49960
public void addNamedEvent (String shortName, Class<? extends ComponentSystemEvent> cls)
    {
        String key = shortName;
        Collection<Class<? extends ComponentSystemEvent>> eventList;
        
        // Per the spec, if the short name is missing, generate one.
        
        if (shortName == null)
        {
            key = getFixedName (cls);
        }
        
        eventList = events.get (key);
        
        if (eventList == null)
        {
            // First event registered to this short name.
            
            eventList = new LinkedList<Class<? extends ComponentSystemEvent>>();
            
            events.put (key, eventList);
        }
        
        eventList.add (cls);
    }
933231
def add(cls, name, value):
        """"""
        attr = cls(value)
        attr._name = name
        setattr(cls, name, attr)