use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method definition.
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);
consume();
consumeUntil(_tokenSet_9);
} else {
throw ex;
}
}
returnAST = definition_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method complex_declarator.
public final void complex_declarator() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST complex_declarator_AST = null;
try {
// for error handling
array_declarator();
astFactory.addASTChild(currentAST, returnAST);
complex_declarator_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_50);
} else {
throw ex;
}
}
returnAST = complex_declarator_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method signed_int.
public final void signed_int() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST signed_int_AST = null;
try {
// for error handling
if ((LA(1) == LITERAL_short)) {
signed_short_int();
astFactory.addASTChild(currentAST, returnAST);
signed_int_AST = (AST) currentAST.root;
} else if ((LA(1) == LITERAL_long) && (_tokenSet_35.member(LA(2)))) {
signed_long_int();
astFactory.addASTChild(currentAST, returnAST);
signed_int_AST = (AST) currentAST.root;
} else if ((LA(1) == LITERAL_long) && (LA(2) == LITERAL_long)) {
signed_longlong_int();
astFactory.addASTChild(currentAST, returnAST);
signed_int_AST = (AST) currentAST.root;
} else {
throw new NoViableAltException(LT(1), getFilename());
}
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_35);
} else {
throw ex;
}
}
returnAST = signed_int_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method get_excep_expr.
public final void get_excep_expr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST get_excep_expr_AST = null;
try {
// for error handling
AST tmp180_AST = null;
tmp180_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp180_AST);
match(LITERAL_getraises);
exception_list();
astFactory.addASTChild(currentAST, returnAST);
get_excep_expr_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_64);
} else {
throw ex;
}
}
returnAST = get_excep_expr_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method type_declarator.
public final void type_declarator() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST type_declarator_AST = null;
try {
// for error handling
type_spec();
astFactory.addASTChild(currentAST, returnAST);
declarators();
astFactory.addASTChild(currentAST, returnAST);
type_declarator_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = type_declarator_AST;
}
Aggregations