use of antlr.NoViableAltException 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;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method interface_dcl.
public final void interface_dcl() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST interface_dcl_AST = null;
try {
// for error handling
{
{
switch(LA(1)) {
case LITERAL_abstract:
{
AST tmp28_AST = null;
tmp28_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp28_AST);
match(LITERAL_abstract);
break;
}
case LITERAL_local:
{
AST tmp29_AST = null;
tmp29_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp29_AST);
match(LITERAL_local);
break;
}
case LITERAL_interface:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
AST tmp30_AST = null;
tmp30_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp30_AST);
match(LITERAL_interface);
identifier();
astFactory.addASTChild(currentAST, returnAST);
{
switch(LA(1)) {
case COLON:
{
interface_inheritance_spec();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LCURLY:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
AST tmp31_AST = null;
tmp31_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp31_AST);
match(LCURLY);
interface_body();
astFactory.addASTChild(currentAST, returnAST);
AST tmp32_AST = null;
tmp32_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp32_AST);
match(RCURLY);
}
interface_dcl_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = interface_dcl_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method forward_dcl.
public final void forward_dcl() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST forward_dcl_AST = null;
try {
// for error handling
{
switch(LA(1)) {
case LITERAL_abstract:
{
AST tmp33_AST = null;
tmp33_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp33_AST);
match(LITERAL_abstract);
break;
}
case LITERAL_local:
{
AST tmp34_AST = null;
tmp34_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp34_AST);
match(LITERAL_local);
break;
}
case LITERAL_interface:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
AST tmp35_AST = null;
tmp35_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp35_AST);
match(LITERAL_interface);
identifier();
astFactory.addASTChild(currentAST, returnAST);
forward_dcl_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = forward_dcl_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method primary_expr.
public final void primary_expr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST primary_expr_AST = null;
try {
// for error handling
switch(LA(1)) {
case SCOPEOP:
case IDENT:
{
scoped_name();
astFactory.addASTChild(currentAST, returnAST);
primary_expr_AST = (AST) currentAST.root;
break;
}
case LITERAL_TRUE:
case LITERAL_FALSE:
case INT:
case OCTAL:
case HEX:
case STRING_LITERAL:
case WIDE_STRING_LITERAL:
case CHAR_LITERAL:
case WIDE_CHAR_LITERAL:
case FIXED:
case FLOAT:
{
literal();
astFactory.addASTChild(currentAST, returnAST);
primary_expr_AST = (AST) currentAST.root;
break;
}
case LPAREN:
{
AST tmp105_AST = null;
tmp105_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp105_AST);
match(LPAREN);
const_exp();
astFactory.addASTChild(currentAST, returnAST);
AST tmp106_AST = null;
tmp106_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp106_AST);
match(RPAREN);
primary_expr_AST = (AST) currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_42);
} else {
throw ex;
}
}
returnAST = primary_expr_AST;
}
use of antlr.NoViableAltException in project cxf by apache.
the class IDLParser method attr_dcl.
public final void attr_dcl() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST attr_dcl_AST = null;
try {
// for error handling
switch(LA(1)) {
case LITERAL_readonly:
{
readonly_attr_spec();
astFactory.addASTChild(currentAST, returnAST);
attr_dcl_AST = (AST) currentAST.root;
break;
}
case LITERAL_attribute:
{
attr_spec();
astFactory.addASTChild(currentAST, returnAST);
attr_dcl_AST = (AST) currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = attr_dcl_AST;
}
Aggregations