code: private boolean mapPatternElemPos(int nesting, boolean isStart,
                                      boolean isAttrName)
    {
  
      if (0 == nesting)
      {
        if(m_patternMapSize >= m_patternMap.length)
        {
          int patternMap[] = m_patternMap;
          int len = m_patternMap.length;
          m_patternMap = new int[m_patternMapSize + 100];
          System.arraycopy(patternMap, 0, m_patternMap, 0, len);
        } 
        if (!isStart)
        {
          m_patternMap[m_patternMapSize - 1] -= TARGETEXTRA;
        }
        m_patternMap[m_patternMapSize] =
          (m_compiler.getTokenQueueSize() - (isAttrName ? 1 : 0)) + TARGETEXTRA;
  
        m_patternMapSize++;
  
        isStart = false;
      }
  
      return isStart;
    }
docs: Record the current position on the token queue as long as
  this is a top-level element.  Must be called before the
  next token is added to the m_tokenQueue.
  
  @param nesting The nesting count for the pattern element.
  @param isStart true if this is the start of a pattern.
  @param isAttrName true if we have determined that this is an attribute name.
  
  @return true if this is the start of a pattern.