You could use
Browserify so that you can require() browserified modules like your parser in the browser. Maybe there's a way to make PEG.js generate vanilla JavaScript modules that create a global variable with your parser, but I'm not sure about it, I'll leave that to someone else who knows PEG.js better.
If you want to know more about require() in the browser, I suggest you read about
RequireJS. The techniques to modularize JavaScript are a bit controversial, but I find them rather exciting. My favorite technique is
AMD.