// $ANTLR start "initializer"
// C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:497:1: initializer returns [ListExpression expression ] : (exp1= assignment_expression | '{' exp2= initializer ( ',' exp3= initializer )* '}' );
public final ListExpression initializer() throws RecognitionException {
ListExpression expression = null;
AssignmentExpression exp1 =null;
ListExpression exp2 =null;
ListExpression exp3 =null;
expression =null;
ListExpression listExpression=new ListExpression(null,-1);
try {
// C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:507:5: (exp1= assignment_expression | '{' exp2= initializer ( ',' exp3= initializer )* '}' )
int alt45=2;
int LA45_0 = input.LA(1);
if ( ((LA45_0 >= CHARACTER_LITERAL && LA45_0 <= DECIMAL_LITERAL)||LA45_0==FLOATING_POINT_LITERAL||LA45_0==HEX_LITERAL||LA45_0==IDENTIFIER||LA45_0==OCTAL_LITERAL||LA45_0==STRING_LITERAL||LA45_0==20||LA45_0==25||LA45_0==27||LA45_0==29||LA45_0==32||(LA45_0 >= 35 && LA45_0 <= 36)||LA45_0==98) ) {
alt45=1;
}
else if ( (LA45_0==93) ) {
alt45=2;
}
else {
if (state.backtracking>0) {state.failed=true; return expression;}
NoViableAltException nvae =
new NoViableAltException("", 45, 0, input);
throw nvae;
}
switch (alt45) {
case 1 :
// C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:507:5: exp1= assignment_expression
{
pushFollow(FOLLOW_assignment_expression_in_initializer1367);
exp1=assignment_expression();
state._fsp--;
if (state.failed) return expression;
if ( state.backtracking==0 ) {
listExpression.addExpression(exp1);
}
}
break;
case 2 :
// C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:511:4: '{' exp2= initializer ( ',' exp3= initializer )* '}'
{
match(input,93,FOLLOW_93_in_initializer1374); if (state.failed) return expression;
pushFollow(FOLLOW_initializer_in_initializer1378);
exp2=initializer();
state._fsp--;
if (state.failed) return expression;
if ( state.backtracking==0 ) {
listExpression.addExpression(exp2);
}
// C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:517:3: ( ',' exp3= initializer )*
loop44:
do {
int alt44=2;
int LA44_0 = input.LA(1);
if ( (LA44_0==34) ) {
alt44=1;
}
switch (alt44) {
case 1 :
// C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:517:4: ',' exp3= initializer
{
match(input,34,FOLLOW_34_in_initializer1387); if (state.failed) return expression;
pushFollow(FOLLOW_initializer_in_initializer1391);
exp3=initializer();
state._fsp--;
if (state.failed) return expression;
if ( state.backtracking==0 ) {
listExpression.addExpression(exp3);
}
}
break;