Open p8nut opened 4 years ago
i might have find a solution but it's not really a nice one ...
in the select when you have an array, elements are not separated by comma. so in the grammar, i change that:
array_elements
= (
head:data_structure
tail:(',' _ value:data_structure { return value; })*
{ return [head].concat(tail); }
)?
by (replace ',' by ' ') :
array_elements
= (
head:data_structure
tail:(' ' _ value:data_structure { return value; })*
{ return [head].concat(tail); }
)?
and it seem to work, all the int
s are parsed now.
but i think there might have a lot of side effect with this way.
may be link with #5 seem that if there is more than one element in an array
int
s are not parsed (if there is only oneint
it is parsed) here a strace of a program with aselect
which will produce
if we look at the args array, the second parameter is an array of integer but the third parameter is an array of strings.
Thanks for this module it's really useful.