thanks to wonderful responses to this question I understand how to call javascript functions with varargs.
now I\'m looking to use apply with a constructor
To complete @CMS solution and preserve the prototype chain, you can do this:
var mid_parser = {}; mid_parser.__proto__ = Parser.prototype; Parser.apply(mid_parser, mid_patterns);
As a side note, it will not work with IE 8-.