--allowedStartRules doesn't work with the CLI
dbaum opened this issue · 3 comments
I think the underlying code expects an array of strings, but the arg parsing just assigns the comma separated string to opts. Doesn't it need to be split in cli.js at some point, either when parsing the arg or later when assigning to opts?
allowedStartRules = args[index + 1].split(',');
or
opts.allowedStartRules = allowedStartRules.split(',');
No. ts-pegjs is just a plugin for pegjs.
Pegjs expect that list to be an CSV string, (with commas as separator).
See doc https://pegjs.org/documentation
.
My mistake. Someone else had changed the imported ts-pegjs library I'm using to add a custom feature, cli.js was modified to call peg.buildParser() instead of peg.generate(), and I think that's causing the problem with allowedStartRules. Sorry to have bothered you with this - I didn't notice the local modifications when I had started debugging this problem.
OK. No problem!