use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method fixed_pt_type.
public final void fixed_pt_type() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST fixed_pt_type_AST = null;
try {
// for error handling
AST tmp137_AST = null;
tmp137_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp137_AST);
match(LITERAL_fixed);
match(LT);
positive_int_const();
astFactory.addASTChild(currentAST, returnAST);
match(COMMA);
positive_int_const();
astFactory.addASTChild(currentAST, returnAST);
match(GT);
fixed_pt_type_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_36);
} else {
throw ex;
}
}
returnAST = fixed_pt_type_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method readonly_attr_spec.
public final void readonly_attr_spec() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST readonly_attr_spec_AST = null;
try {
// for error handling
AST tmp163_AST = null;
tmp163_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp163_AST);
match(LITERAL_readonly);
AST tmp164_AST = null;
tmp164_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp164_AST);
match(LITERAL_attribute);
param_type_spec();
astFactory.addASTChild(currentAST, returnAST);
readonly_attr_declarator();
astFactory.addASTChild(currentAST, returnAST);
readonly_attr_spec_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = readonly_attr_spec_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method case_stmt.
public final void case_stmt() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST case_stmt_AST = null;
try {
// for error handling
{
int _cnt160 = 0;
_loop160: do {
switch(LA(1)) {
case LITERAL_case:
{
AST tmp154_AST = null;
tmp154_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp154_AST);
match(LITERAL_case);
const_exp();
astFactory.addASTChild(currentAST, returnAST);
match(COLON);
break;
}
case LITERAL_default:
{
AST tmp156_AST = null;
tmp156_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp156_AST);
match(LITERAL_default);
match(COLON);
break;
}
default:
{
if (_cnt160 >= 1) {
break _loop160;
} else {
throw new NoViableAltException(LT(1), getFilename());
}
}
}
_cnt160++;
} while (true);
}
element_spec();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
case_stmt_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_52);
} else {
throw ex;
}
}
returnAST = case_stmt_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method xor_expr.
public final void xor_expr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST xor_expr_AST = null;
try {
// for error handling
and_expr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop90: do {
if ((LA(1) == XOR)) {
AST tmp93_AST = null;
tmp93_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp93_AST);
match(XOR);
and_expr();
astFactory.addASTChild(currentAST, returnAST);
} else {
break _loop90;
}
} while (true);
}
xor_expr_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_37);
} else {
throw ex;
}
}
returnAST = xor_expr_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method declarator.
public final void declarator() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST declarator_AST = null;
try {
// for error handling
if ((LA(1) == IDENT) && (LA(2) == SEMI || LA(2) == COMMA)) {
simple_declarator();
astFactory.addASTChild(currentAST, returnAST);
declarator_AST = (AST) currentAST.root;
} else if ((LA(1) == IDENT) && (LA(2) == LBRACK)) {
complex_declarator();
astFactory.addASTChild(currentAST, returnAST);
declarator_AST = (AST) currentAST.root;
} else {
throw new NoViableAltException(LT(1), getFilename());
}
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_50);
} else {
throw ex;
}
}
returnAST = declarator_AST;
}
Aggregations