use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method unary_expr.
public final void unary_expr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST unary_expr_AST = null;
try {
// for error handling
switch(LA(1)) {
case PLUS:
case MINUS:
case TILDE:
{
{
switch(LA(1)) {
case MINUS:
{
AST tmp102_AST = null;
tmp102_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp102_AST);
match(MINUS);
break;
}
case PLUS:
{
AST tmp103_AST = null;
tmp103_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp103_AST);
match(PLUS);
break;
}
case TILDE:
{
AST tmp104_AST = null;
tmp104_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp104_AST);
match(TILDE);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
primary_expr();
astFactory.addASTChild(currentAST, returnAST);
unary_expr_AST = (AST) currentAST.root;
break;
}
case SCOPEOP:
case IDENT:
case LPAREN:
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:
{
primary_expr();
astFactory.addASTChild(currentAST, returnAST);
unary_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 = unary_expr_AST;
}
use of antlr.RecognitionException 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.RecognitionException in project cxf by apache.
the class IDLParser method interface_body.
public final void interface_body() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST interface_body_AST = null;
try {
// for error handling
{
_loop31: do {
if ((_tokenSet_17.member(LA(1)))) {
export();
astFactory.addASTChild(currentAST, returnAST);
} else {
break _loop31;
}
} while (true);
}
interface_body_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_15);
} else {
throw ex;
}
}
returnAST = interface_body_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method init_dcl.
public final void init_dcl() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST init_dcl_AST = null;
try {
// for error handling
AST tmp67_AST = null;
tmp67_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp67_AST);
match(LITERAL_factory);
identifier();
astFactory.addASTChild(currentAST, returnAST);
match(LPAREN);
{
switch(LA(1)) {
case LITERAL_in:
{
init_param_decls();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RPAREN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
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());
}
}
}
match(SEMI);
init_dcl_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_24);
} else {
throw ex;
}
}
returnAST = init_dcl_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method wide_character_literal.
public final void wide_character_literal() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST wide_character_literal_AST = null;
try {
// for error handling
AST tmp113_AST = null;
tmp113_AST = astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp113_AST);
match(WIDE_CHAR_LITERAL);
wide_character_literal_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_42);
} else {
throw ex;
}
}
returnAST = wide_character_literal_AST;
}
Aggregations