in modules/corba/src/org/apache/axis2/corba/idl/parser/IDLParser.java [163:380]
public final void definition() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST definition_AST = null;
try { // for error handling
{
switch ( LA(1)) {
case LITERAL_typedef:
case LITERAL_native:
case LITERAL_struct:
case LITERAL_union:
case LITERAL_enum:
{
type_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_const:
{
const_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_exception:
{
except_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_module:
{
module();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_typeid:
{
type_id_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_typeprefix:
{
type_prefix_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_component:
{
component();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_home:
{
home_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
default:
boolean synPredMatched10 = false;
if ((((LA(1) >= LITERAL_abstract && LA(1) <= LITERAL_interface)) && (LA(2)==LITERAL_interface||LA(2)==IDENT) && (_tokenSet_3.member(LA(3))) && (_tokenSet_4.member(LA(4))))) {
int _m10 = mark();
synPredMatched10 = true;
inputState.guessing++;
try {
{
{
switch ( LA(1)) {
case LITERAL_abstract:
{
match(LITERAL_abstract);
break;
}
case LITERAL_local:
{
match(LITERAL_local);
break;
}
case LITERAL_interface:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
match(LITERAL_interface);
}
}
catch (RecognitionException pe) {
synPredMatched10 = false;
}
rewind(_m10);
inputState.guessing--;
}
if ( synPredMatched10 ) {
interf();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
}
else {
boolean synPredMatched13 = false;
if (((LA(1)==LITERAL_abstract||LA(1)==LITERAL_custom||LA(1)==LITERAL_valuetype) && (LA(2)==LITERAL_valuetype||LA(2)==IDENT) && (_tokenSet_5.member(LA(3))) && (_tokenSet_6.member(LA(4))))) {
int _m13 = mark();
synPredMatched13 = true;
inputState.guessing++;
try {
{
{
switch ( LA(1)) {
case LITERAL_abstract:
{
match(LITERAL_abstract);
break;
}
case LITERAL_custom:
{
match(LITERAL_custom);
break;
}
case LITERAL_valuetype:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
match(LITERAL_valuetype);
}
}
catch (RecognitionException pe) {
synPredMatched13 = false;
}
rewind(_m13);
inputState.guessing--;
}
if ( synPredMatched13 ) {
value();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
}
else {
boolean synPredMatched16 = false;
if (((LA(1)==LITERAL_abstract||LA(1)==LITERAL_custom||LA(1)==LITERAL_eventtype) && (LA(2)==LITERAL_eventtype||LA(2)==IDENT) && (_tokenSet_7.member(LA(3))) && (_tokenSet_8.member(LA(4))))) {
int _m16 = mark();
synPredMatched16 = true;
inputState.guessing++;
try {
{
{
switch ( LA(1)) {
case LITERAL_abstract:
{
match(LITERAL_abstract);
break;
}
case LITERAL_custom:
{
match(LITERAL_custom);
break;
}
case LITERAL_eventtype:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
match(LITERAL_eventtype);
}
}
catch (RecognitionException pe) {
synPredMatched16 = false;
}
rewind(_m16);
inputState.guessing--;
}
if ( synPredMatched16 ) {
event();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}}}
}
definition_AST = (AST)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_9);
} else {
throw ex;
}
}
returnAST = definition_AST;
}