code: function (validator) {
    EventEmitter.apply(this);
    this._validator = validator || Parser.defaultValidator;
    this._configuration = new Configuration();
    this._tokenizer = new Tokenizer(this._configuration);
    this.state = Parser.states.empty;
    this.buffer = '';
  }
docs: The `Parser` class encapsulates an online parsing algorithm, similar to a
  SAX-parser. By itself it doesn't do anything useful, however several
  callbacks can be provided for different parsing events.
  
  @constructs Parser
  @param {Validator} [validator] Accepts a validator class for handling
  data validation.