public ES3Parser.program_return program() // throws RecognitionException [1]
{
ES3Parser.program_return retval = new ES3Parser.program_return();
retval.Start = input.LT(1);
object root_0 = null;
ES3Parser.sourceElement_return follow = default(ES3Parser.sourceElement_return);
script = input.ToString().Split('\n');
Program program = new Program();
try
{
// C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:1844:2: ( (follow= sourceElement )* )
// C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:1844:4: (follow= sourceElement )*
{
root_0 = (object)adaptor.GetNilNode();
// C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:1844:4: (follow= sourceElement )*
do
{
int alt87 = 2;
int LA87_0 = input.LA(1);
if ( ((LA87_0 >= NULL && LA87_0 <= BREAK) || LA87_0 == CONTINUE || (LA87_0 >= DELETE && LA87_0 <= DO) || (LA87_0 >= FOR && LA87_0 <= IF) || (LA87_0 >= NEW && LA87_0 <= WITH) || LA87_0 == LBRACE || LA87_0 == LPAREN || LA87_0 == LBRACK || LA87_0 == SEMIC || (LA87_0 >= ADD && LA87_0 <= SUB) || (LA87_0 >= INC && LA87_0 <= DEC) || (LA87_0 >= NOT && LA87_0 <= INV) || (LA87_0 >= Identifier && LA87_0 <= StringLiteral) || LA87_0 == RegularExpressionLiteral || (LA87_0 >= DecimalLiteral && LA87_0 <= HexIntegerLiteral)) )
{
alt87 = 1;
}
switch (alt87)
{
case 1 :
// C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:1844:5: follow= sourceElement
{
PushFollow(FOLLOW_sourceElement_in_program6752);
follow = sourceElement();
state.followingStackPointer--;
adaptor.AddChild(root_0, follow.Tree);
program.Statements.AddLast(follow.value);
}
break;
default:
goto loop87;
}
} while (true);
loop87:
; // Stops C# compiler whining that label 'loop87' has no statements
retval.value = program;
}
retval.Stop = input.LT(-1);
retval.Tree = (object)adaptor.RulePostProcessing(root_0);
adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop);
}
catch (RecognitionException re)
{
ReportError(re);
Recover(input,re);
// Conversion of the second argument necessary, but harmless
retval.Tree = (object)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re);
}
finally
{
}
return retval;
}
// $ANTLR end "program"