use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method positive_int_const.
public final void positive_int_const() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST positive_int_const_AST = null;
try {
// for error handling
const_exp();
astFactory.addASTChild(currentAST, returnAST);
positive_int_const_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_43);
} else {
throw ex;
}
}
returnAST = positive_int_const_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method simple_declarator.
public final void simple_declarator() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST simple_declarator_AST = null;
try {
// for error handling
identifier();
astFactory.addASTChild(currentAST, returnAST);
simple_declarator_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_32);
} else {
throw ex;
}
}
returnAST = simple_declarator_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method shift_expr.
public final void shift_expr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST shift_expr_AST = null;
try {
// for error handling
add_expr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop97: do {
if ((LA(1) == LSHIFT || LA(1) == RSHIFT)) {
{
switch(LA(1)) {
case LSHIFT:
{
AST tmp95_AST = null;
tmp95_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp95_AST);
match(LSHIFT);
break;
}
case RSHIFT:
{
AST tmp96_AST = null;
tmp96_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp96_AST);
match(RSHIFT);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
add_expr();
astFactory.addASTChild(currentAST, returnAST);
} else {
break _loop97;
}
} while (true);
}
shift_expr_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_39);
} else {
throw ex;
}
}
returnAST = shift_expr_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method param_type_spec.
public final void param_type_spec() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST param_type_spec_AST = null;
try {
// for error handling
switch(LA(1)) {
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_ValueBase:
{
base_type_spec();
astFactory.addASTChild(currentAST, returnAST);
param_type_spec_AST = (AST) currentAST.root;
break;
}
case LITERAL_string:
{
string_type();
astFactory.addASTChild(currentAST, returnAST);
param_type_spec_AST = (AST) currentAST.root;
break;
}
case LITERAL_wstring:
{
wide_string_type();
astFactory.addASTChild(currentAST, returnAST);
param_type_spec_AST = (AST) currentAST.root;
break;
}
case SCOPEOP:
case IDENT:
{
scoped_name();
astFactory.addASTChild(currentAST, returnAST);
param_type_spec_AST = (AST) currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_31);
} else {
throw ex;
}
}
returnAST = param_type_spec_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method provides_dcl.
public final void provides_dcl() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST provides_dcl_AST = null;
try {
// for error handling
AST tmp196_AST = null;
tmp196_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp196_AST);
match(LITERAL_provides);
interface_type();
astFactory.addASTChild(currentAST, returnAST);
identifier();
astFactory.addASTChild(currentAST, returnAST);
provides_dcl_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_10);
} else {
throw ex;
}
}
returnAST = provides_dcl_AST;
}
Aggregations