diff --git a/Rakefile b/Rakefile index 71273a8..3869a45 100644 --- a/Rakefile +++ b/Rakefile @@ -22,7 +22,7 @@ file "lib/pegjs-runtime-#{version}.min.js" => "lib/runtime.js" do |t| end file "lib/metagrammar.js" => "lib/metagrammar.pegjs" do |t| - system "bin/pegjs --start grammar PEG.grammarParser lib/metagrammar.pegjs" + system "bin/pegjs --start-rule grammar PEG.grammarParser lib/metagrammar.pegjs" end desc "Build the minified parser runtime" diff --git a/bin/pegjs-main.js b/bin/pegjs-main.js index 7db14fa..3059e07 100644 --- a/bin/pegjs-main.js +++ b/bin/pegjs-main.js @@ -95,10 +95,10 @@ var args = Array.prototype.slice.call(arguments, 1); while (args.length > 0 && isOption(args[0])) { switch (args[0]) { case "-s": - case "--start": + case "--start-rule": nextArg(); if (args.length === 0) { - abort("Missing parameter of the -s/--start option."); + abort("Missing parameter of the -s/--start-rule option."); } startRule = args[0]; break;