9 Commits (21c6d9ccd387517ebc12e0cd8a52945a0e0e2800)

Author SHA1 Message Date
David Majda fb5028eb90 Use |util| module instead of |sys|
|sys| emits a warning in Node.js 0.6.x.
12 years ago
David Majda c90e7f369b Fix regexp for detecting command-line options in /bin/pegjs
Closes GH-51.
13 years ago
David Majda dcf904c392 bin/pegjs: Default parser variable name is "module.exports"
The previous default name was "exports.parser". This meant that to use
the generated parser in Node.js, you had to use code like this:

  var parser = require("./my-cool-parser").parser;
  parser.parse(...);

Now you can shorten it a bit:

  var parser = require("./my-cool-parser");
  parser.parse(...);

The shorter version makes sense since no other objects except the parser
are exported from the module.
13 years ago
David Majda d5caaa7877 Nicer messages in command-line mode on read/write errors 13 years ago
David Majda 957b96c1b5 Add check for missing parameter of the -e/--export-var option. 13 years ago
David Majda d0c074e2f8 Small style fixes 13 years ago
David Majda 814ce7d9db Switch command-line mode backend from Rhino to Node 13 years ago
David Majda 08635b658b Make bin/pegjs work when called via a symlink
Similar issue exists on Windows too (they have symlinks since Vista), but I
could not find how to dereference symlinks from batch files, so I did not fix
it. I guess this does not matter much given how little the symlinks are used in
the Windows world.

Closes #1.
14 years ago
David Majda c3dd696a3e Initial commit. 14 years ago