use of antlr.NoViableAltException 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.NoViableAltException in project cxf by apache.
the class IDLParser method array_declarator.
public final void array_declarator() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST array_declarator_AST = null;
try {
// for error handling
AST tmp141_AST = null;
tmp141_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp141_AST);
match(IDENT);
{
int _cnt176 = 0;
_loop176: do {
if ((LA(1) == LBRACK)) {
fixed_array_size();
astFactory.addASTChild(currentAST, returnAST);
} else {
if (_cnt176 >= 1) {
break _loop176;
} else {
throw new NoViableAltException(LT(1), getFilename());
}
}
_cnt176++;
} while (true);
}
array_declarator_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_50);
} else {
throw ex;
}
}
returnAST = array_declarator_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method floating_pt_type.
public final void floating_pt_type() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST floating_pt_type_AST = null;
try {
// for error handling
switch(LA(1)) {
case LITERAL_float:
{
AST tmp80_AST = null;
tmp80_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp80_AST);
match(LITERAL_float);
floating_pt_type_AST = (AST) currentAST.root;
break;
}
case LITERAL_double:
{
AST tmp81_AST = null;
tmp81_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp81_AST);
match(LITERAL_double);
floating_pt_type_AST = (AST) currentAST.root;
break;
}
case LITERAL_long:
{
AST tmp82_AST = null;
tmp82_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp82_AST);
match(LITERAL_long);
AST tmp83_AST = null;
tmp83_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp83_AST);
match(LITERAL_double);
floating_pt_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_36);
} else {
throw ex;
}
}
returnAST = floating_pt_type_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method string_literal.
public final void string_literal() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST string_literal_AST = null;
try {
// for error handling
{
int _cnt285 = 0;
_loop285: do {
if ((LA(1) == STRING_LITERAL)) {
AST tmp110_AST = null;
tmp110_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp110_AST);
match(STRING_LITERAL);
} else {
if (_cnt285 >= 1) {
break _loop285;
} else {
throw new NoViableAltException(LT(1), getFilename());
}
}
_cnt285++;
} while (true);
}
string_literal_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_42);
} else {
throw ex;
}
}
returnAST = string_literal_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method wide_string_type.
public final void wide_string_type() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST wide_string_type_AST = null;
try {
// for error handling
AST tmp87_AST = null;
tmp87_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp87_AST);
match(LITERAL_wstring);
{
switch(LA(1)) {
case LT:
{
match(LT);
positive_int_const();
astFactory.addASTChild(currentAST, returnAST);
match(GT);
break;
}
case SEMI:
case COMMA:
case IDENT:
case GT:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
wide_string_type_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_36);
} else {
throw ex;
}
}
returnAST = wide_string_type_AST;
}
Aggregations