13 Commits (8f71c07cecdc29129cf6990fbeb18aad827626b4)

Author SHA1 Message Date
David Majda 8f71c07cec Implement the "--cache" command-line option 12 years ago
David Majda 58cc5b739d Implement "--track-line-and-column" command-line option 12 years ago
David Majda a0898388fb /bin/pegjs: Avoid calling |process.openStdin|
While |process.openStdin| is not officially deprecated, it's no longer
documented and just using |process.stdin| and resuming it seems to be
the official way.
12 years ago
David Majda de256105eb /bin/pegjs: Don't close standard output
Avoids "Error: process.stdout cannot be closed" error when invoked
without file arguments.
12 years ago
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