Open hildjj opened 4 months ago
Example:
foo.peggy:
foo = "1" bar = "2"
bin/peggy.js -S bar --allowed-start-rules foo,bar f.peggy
const {parse} = require('./f.js') parse("2") // Error, expected "1"
generate-js.js has this:
const startRuleFunction = name(allowedStartRules[0]);
there should be a new option defaultStartRule that gets hooked up in the CLI correctly and ends up in the AST for later use by generate-js.
defaultStartRule
Work-around:
bin/peggy.js --allowed-start-rules bar,foo f.peggy
the docs clearly say that -S is only for testing.
-S
Example:
foo.peggy:
generate-js.js has this:
there should be a new option
defaultStartRule
that gets hooked up in the CLI correctly and ends up in the AST for later use by generate-js.