I am currently attempting to enhance my programming language to support arrays, but I am encountering difficulties.
Array
: '[' Expr ("," Expr)* ']'
{{ $$ = ['ArrayList', $1]; }}
| '[' Expr ']'
{{ $$ = ['Array', $2]; }}
| '[' ']'
{{ $$ = ['Empty']; }}
;
However, when trying to parse "[1,2,3,4]," Jison notifies me that it was expecting "]" instead of ",". Any suggestions?