use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method interface_type.
public final void interface_type() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST interface_type_AST = null;
try {
// for error handling
{
switch(LA(1)) {
case SCOPEOP:
case IDENT:
{
scoped_name();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LITERAL_Object:
{
AST tmp202_AST = null;
tmp202_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp202_AST);
match(LITERAL_Object);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
interface_type_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_31);
} else {
throw ex;
}
}
returnAST = interface_type_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method const_type.
public final void const_type() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST const_type_AST = null;
try {
// for error handling
switch(LA(1)) {
case LITERAL_char:
{
char_type();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
break;
}
case LITERAL_wchar:
{
wide_char_type();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
break;
}
case LITERAL_boolean:
{
boolean_type();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
break;
}
case LITERAL_string:
{
string_type();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
break;
}
case LITERAL_wstring:
{
wide_string_type();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
break;
}
case LITERAL_fixed:
{
fixed_pt_const_type();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
break;
}
case SCOPEOP:
case IDENT:
{
scoped_name();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
break;
}
case LITERAL_octet:
{
octet_type();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
break;
}
default:
boolean synPredMatched83 = false;
if ((((LA(1) >= LITERAL_long && LA(1) <= LITERAL_unsigned)) && (LA(2) == IDENT || LA(2) == LITERAL_long || LA(2) == LITERAL_short) && (LA(3) == IDENT || LA(3) == ASSIGN || LA(3) == LITERAL_long) && (_tokenSet_33.member(LA(4))))) {
int _m83 = mark();
synPredMatched83 = true;
inputState.guessing++;
try {
{
integer_type();
}
} catch (RecognitionException pe) {
synPredMatched83 = false;
}
rewind(_m83);
inputState.guessing--;
}
if (synPredMatched83) {
integer_type();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
} else if (((LA(1) >= LITERAL_float && LA(1) <= LITERAL_long)) && (LA(2) == IDENT || LA(2) == LITERAL_double) && (LA(3) == IDENT || LA(3) == ASSIGN) && (_tokenSet_33.member(LA(4)))) {
floating_pt_type();
astFactory.addASTChild(currentAST, returnAST);
const_type_AST = (AST) currentAST.root;
} else {
throw new NoViableAltException(LT(1), getFilename());
}
}
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_31);
} else {
throw ex;
}
}
returnAST = const_type_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method op_dcl.
public final void op_dcl() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST op_dcl_AST = null;
try {
// for error handling
{
switch(LA(1)) {
case LITERAL_oneway:
{
op_attribute();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SCOPEOP:
case IDENT:
case LITERAL_float:
case LITERAL_double:
case LITERAL_long:
case LITERAL_short:
case LITERAL_unsigned:
case LITERAL_char:
case LITERAL_wchar:
case LITERAL_boolean:
case LITERAL_octet:
case LITERAL_any:
case LITERAL_Object:
case LITERAL_string:
case LITERAL_wstring:
case LITERAL_void:
case LITERAL_ValueBase:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
op_type_spec();
astFactory.addASTChild(currentAST, returnAST);
AST tmp44_AST = null;
tmp44_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp44_AST);
match(IDENT);
parameter_dcls();
astFactory.addASTChild(currentAST, returnAST);
{
switch(LA(1)) {
case LITERAL_raises:
{
raises_expr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SEMI:
case LITERAL_context:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
{
switch(LA(1)) {
case LITERAL_context:
{
context_expr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SEMI:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
op_dcl_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = op_dcl_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method attr_raises_expr.
public final void attr_raises_expr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST attr_raises_expr_AST = null;
try {
// for error handling
{
switch(LA(1)) {
case LITERAL_getraises:
{
get_excep_expr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SEMI:
case LITERAL_setraises:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
{
switch(LA(1)) {
case LITERAL_setraises:
{
set_excep_expr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SEMI:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
attr_raises_expr_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = attr_raises_expr_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method factory_dcl.
public final void factory_dcl() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST factory_dcl_AST = null;
try {
// for error handling
AST tmp211_AST = null;
tmp211_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp211_AST);
match(LITERAL_factory);
identifier();
astFactory.addASTChild(currentAST, returnAST);
match(LPAREN);
init_param_decls();
astFactory.addASTChild(currentAST, returnAST);
match(RPAREN);
{
switch(LA(1)) {
case LITERAL_raises:
{
raises_expr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SEMI:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
factory_dcl_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = factory_dcl_AST;
}
Aggregations