docs: function(){
              
                  /*
                   * stylesheet
                   *  : [ CHARSET_SYM S* STRING S* ';' ]?
                   *    [S|CDO|CDC]* [ import [S|CDO|CDC]* ]*
                   *    [ namespace [S|CDO|CDC]* ]*
                   *    [ [ ruleset | media | page | font_face ] [S|CDO|CDC]* ]*
                   *  ;
                   */ 
                 
                  var tokenStream = this._tokenStream,
                      charset     = null,
                      token,
                      tt;
                      
                  this.fire("startstylesheet");
              
                  //try to read character set
                  this._charset();
                  
                  this._skipCruft();
  
                  //try to read imports - may be more than one
                  while (tokenStream.peek() == Tokens.IMPORT_SYM){
                      this._import();
                      this._skipCruft();
                  }
                  
                  //try to read namespaces - may be more than one
                  while (tokenStream.peek() == Tokens.NAMESPACE_SYM){
                      this._namespace();
                      this._skipCruft();
                  }
                  
                  //get the next token
                  tt = tokenStream.peek();
                  
                  //try to read the rest
                  while(tt > Tokens.EOF){
                  
                      try {
                  
                          switch(tt){
                              case Tokens.MEDIA_SYM:
                                  this._media();
                                  this._skipCruft();
                                  break;
                              case Tokens.PAGE_SYM:
                                  this._page(); 
                                  this._skipCruft();
                                  break;                   
                              case Tokens.FONT_FACE_SYM:
                                  this._font_face(); 
                                  this._skipCruft();
                                  break;  
                              case Tokens.S:
                                  this._readWhitespace();
                                  break;
                              default:                            
                                  if(!this._ruleset()){
                                  
                                      //error handling for known issues
                                      switch(tt){
                                          case Tokens.CHARSET_SYM:
                                              token = tokenStream.LT(1);
                                              this._charset(false);
                                              throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol);
                                          case Tokens.IMPORT_SYM:
                                              token = tokenStream.LT(1);
                                              this._import(false);
                                              throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol);
                                          case Tokens.NAMESPACE_SYM:
                                              token = tokenStream.LT(1);
                                              this._namespace(false);
                                              throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol);
                                          default:
                                              tokenStream.get();  //get the last token
                                              this._unexpectedToken(tokenStream.token());
                                      }
                                  
                                  }
                          }
                      } catch(ex) {
                          if (ex instanceof SyntaxError && !this.options.strict){
                              this.fire({
                                  type:       "error",
                                  error:      ex,
                                  message:    ex.message,
                                  line:       ex.line,
                                  col:        ex.col
                              });                     
                          } else {
                              throw ex;
                          }
                      }
                      
                      tt = tokenStream.peek();
                  }
                  
                  if (tt != Tokens.EOF){
                      this._unexpectedToken(tokenStream.token());
                  }
              
                  this.fire("endstylesheet");
              }