1

I am using jison parser to parse my commands. I want to parse the command:

grp <group_name> -i <id1> <id2> <id3> ......

and want to retrieve the data as:

{ group: <group_name>, id: [id1, id2, id3...] }

But to parse using jison parser, I could try

GROUP TEXT ID TEXT TEXT TEXT ... Here i will have to specify TEXT tokens 'n' number of times.

Can anyone tell me how to parse it without specifying n number of tokens?

Amala James
  • 1,336
  • 3
  • 16
  • 32

0 Answers0