I have a left-recursive error with my C grammar which can be found here http://www.archive-host.com/files/1959502/24fe084677d7655eb57ba66e1864081450017dd9/cAST.txt. When I replace
initializer
: assignment_expression
| '{' initializer_list '}'
;
with
initializer
: assignment_expression
| '{' initializer_list '}'
| initializer_list
;
I did this because I am trying to do this code in Ctrl-D
int k [2] = 1,4;
However this code does work with the first version
int k [2] = {1,4};
Is there a way to do without the { } please?
int k [2] = 1,4;isn't C. - masoud