code: function(selector) {
              selector = selector || '';
              selector = Selector._replaceShorthand(Y.Lang.trim(selector)); 
              var token = Selector._getToken(),     // one token per simple selector (left selector holds combinator)
                  query = selector, // original query for debug report
                  tokens = [],    // array of tokens
                  found = false,  // whether or not any matches were found this pass
                  match,         // the regex match
                  test,
                  i, parser;
  
              /*
                  Search for selector patterns, store, and strip them from the selector string
                  until no patterns match (invalid selector) or we run out of chars.
  
                  Multiple attributes and pseudos are allowed, in any order.
                  for example:
                      'form:first-child[type=button]:not(button)[lang|=en]'
              */
              outer:
              do {
                  found = false; // reset after full pass
                  for (i = 0; (parser = Selector._parsers[i++]);) {
                      if ( (match = parser.re.exec(selector)) ) { // note assignment
                          if (parser.name !== COMBINATOR ) {
                              token.selector = selector;
                          }
                          selector = selector.replace(match[0], ''); // strip current match from selector
                          if (!selector.length) {
                              token.last = true;
                          }
  
                          if (Selector._attrFilters[match[1]]) { // convert class to className, etc.
                              match[1] = Selector._attrFilters[match[1]];
                          }
  
                          test = parser.fn(match, token);
                          if (test === false) { // selector not supported
                              found = false;
                              break outer;
                          } else if (test) {
                              token.tests.push(test);
                          }
  
                          if (!selector.length || parser.name === COMBINATOR) {
                              tokens.push(token);
                              token = Selector._getToken(token);
                              if (parser.name === COMBINATOR) {
                                  token.combinator = Y.Selector.combinators[match[1]];
                              }
                          }
                          found = true;
                      }
                  }
              } while (found && selector.length);
  
              if (!found || selector.length) { // not fully parsed
                  tokens = [];
              }
              return tokens;
          }
docs: Break selector into token units per simple selector.
  Combinator is attached to the previous token.