Skip to content

Instantly share code, notes, and snippets.

@erichocean
Created January 5, 2011 05:06
Show Gist options
  • Save erichocean/765959 to your computer and use it in GitHub Desktop.
Save erichocean/765959 to your computer and use it in GitHub Desktop.
How I converted the PEG grammar into source code (which I then modified)
var peg = require('./peg') ;
var sys = require('sys') ;
var posix = require('posix') ;
posix.cat("./ECMAScript_jsdoc.peg").addCallback(function (grammar) {
var parser = peg.generateParser(grammar) ;
sys.puts(parser) ;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment