use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method value.
public final void value() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST value_AST = null;
try {
// for error handling
{
switch(LA(1)) {
case LITERAL_abstract:
{
value_abs_dcl();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LITERAL_custom:
{
value_custom_dcl();
astFactory.addASTChild(currentAST, returnAST);
break;
}
default:
if ((LA(1) == LITERAL_valuetype) && (LA(2) == IDENT) && (LA(3) == LCURLY || LA(3) == COLON || LA(3) == LITERAL_supports)) {
value_dcl();
astFactory.addASTChild(currentAST, returnAST);
} else if ((LA(1) == LITERAL_valuetype) && (LA(2) == IDENT) && (_tokenSet_13.member(LA(3)))) {
value_box_dcl();
astFactory.addASTChild(currentAST, returnAST);
} else if ((LA(1) == LITERAL_valuetype) && (LA(2) == IDENT) && (LA(3) == SEMI)) {
value_forward_dcl();
astFactory.addASTChild(currentAST, returnAST);
} else {
throw new NoViableAltException(LT(1), getFilename());
}
}
}
value_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = value_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method add_expr.
public final void add_expr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST add_expr_AST = null;
try {
// for error handling
mult_expr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop101: do {
if ((LA(1) == PLUS || LA(1) == MINUS)) {
{
switch(LA(1)) {
case PLUS:
{
AST tmp97_AST = null;
tmp97_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp97_AST);
match(PLUS);
break;
}
case MINUS:
{
AST tmp98_AST = null;
tmp98_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp98_AST);
match(MINUS);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
mult_expr();
astFactory.addASTChild(currentAST, returnAST);
} else {
break _loop101;
}
} while (true);
}
add_expr_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_40);
} else {
throw ex;
}
}
returnAST = add_expr_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method integer_type.
public final void integer_type() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST integer_type_AST = null;
try {
// for error handling
switch(LA(1)) {
case LITERAL_long:
case LITERAL_short:
{
signed_int();
astFactory.addASTChild(currentAST, returnAST);
integer_type_AST = (AST) currentAST.root;
break;
}
case LITERAL_unsigned:
{
unsigned_int();
astFactory.addASTChild(currentAST, returnAST);
integer_type_AST = (AST) currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_35);
} else {
throw ex;
}
}
returnAST = integer_type_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method component_dcl.
public final void component_dcl() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST component_dcl_AST = null;
try {
// for error handling
{
switch(LA(1)) {
case COLON:
{
component_inheritance_spec();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LCURLY:
case LITERAL_supports:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
{
switch(LA(1)) {
case LITERAL_supports:
{
supported_interface_spec();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LCURLY:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
match(LCURLY);
component_body();
astFactory.addASTChild(currentAST, returnAST);
match(RCURLY);
component_dcl_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = component_dcl_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method opt_pos_int.
public final void opt_pos_int() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST opt_pos_int_AST = null;
try {
// for error handling
{
switch(LA(1)) {
case COMMA:
{
match(COMMA);
positive_int_const();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case GT:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
opt_pos_int_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_54);
} else {
throw ex;
}
}
returnAST = opt_pos_int_AST;
}
Aggregations