public void try_statement(Block container)
{
IToken token = null;
IToken token2 = null;
IToken token3 = null;
try
{
TryStatement statement;
Block block;
token = this.LT(1);
this.match(0x2b);
if (base.inputState.guessing == 0)
{
statement = new TryStatement(ToLexicalInfo(token));
block = statement.get_ProtectedBlock();
container.Add(statement);
}
this.compound_or_single_stmt(block);
while (true)
{
TypeReference reference;
if ((this.LA(1) != 7) || (this.LA(2) != 0x3f))
{
break;
}
token2 = this.LT(1);
this.match(7);
this.match(0x3f);
token3 = this.LT(1);
this.match(0x3b);
switch (this.LA(1))
{
case 0x42:
this.match(0x42);
reference = this.type_reference();
break;
case 0x40:
break;
default:
throw new NoViableAltException(this.LT(1), this.getFilename());
}
this.match(0x40);
if (base.inputState.guessing == 0)
{
Declaration declaration;
ExceptionHandler handler;
if (reference == null)
{
reference = new SimpleTypeReference(ToLexicalInfo(token3), "System.Exception");
}
ExceptionHandler handler1 = handler = new ExceptionHandler(ToLexicalInfo(token2));
Declaration declaration1 = declaration = new Declaration(ToLexicalInfo(token3));
declaration.set_Name(token3.getText());
declaration.set_Type(reference);
handler.set_Declaration(declaration);
ExceptionHandler handler2 = handler;
statement.get_ExceptionHandlers().Add(handler2);
block = handler2.get_Block();
reference = null;
}
this.compound_or_single_stmt(block);
}
if ((this.LA(1) != 0x11) || !tokenSet_2_.member(this.LA(2)))
{
if (!tokenSet_15_.member(this.LA(1)) || !tokenSet_20_.member(this.LA(2)))
{
throw new NoViableAltException(this.LT(1), this.getFilename());
}
}
else
{
this.finally_block(statement);
}
}
catch (RecognitionException exception)
{
if (base.inputState.guessing != 0)
{
throw;
}
this.reportError(exception);
this.recover(exception, tokenSet_15_);
}
}