+ if (lex_match (ctx->lexer, T_COMMA))
+ {
+ if (!totals && lex_match_id (ctx->lexer, "TOTALS"))
+ {
+ if (!lex_force_match (ctx->lexer, T_LBRACK))
+ goto error;
+ }
+ }
+ else if (lex_force_match (ctx->lexer, T_RBRACK))
+ {
+ if (totals && !lex_force_match (ctx->lexer, T_RBRACK))
+ goto error;
+ return sub;
+ }
+ else
+ goto error;