use of antlr.RecognitionException 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.RecognitionException in project cxf by apache.
the class IDLParser method struct_type.
public final void struct_type() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST struct_type_AST = null;
try {
// for error handling
AST tmp117_AST = null;
tmp117_AST = astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp117_AST);
match(LITERAL_struct);
identifier();
astFactory.addASTChild(currentAST, returnAST);
match(LCURLY);
member_list();
astFactory.addASTChild(currentAST, returnAST);
match(RCURLY);
struct_type_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_23);
} else {
throw ex;
}
}
returnAST = struct_type_AST;
}
use of antlr.RecognitionException in project cxf by apache.
the class IDLParser method export.
public final void export() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST export_AST = null;
try {
// for error handling
{
switch(LA(1)) {
case LITERAL_typedef:
case LITERAL_native:
case LITERAL_struct:
case LITERAL_union:
case LITERAL_enum:
{
type_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_const:
{
const_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_exception:
{
except_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_readonly:
case LITERAL_attribute:
{
attr_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
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_oneway:
case LITERAL_void:
case LITERAL_ValueBase:
{
op_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_typeid:
{
type_id_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
case LITERAL_typeprefix:
{
type_prefix_dcl();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
export_AST = (AST) currentAST.root;
} catch (RecognitionException ex) {
if (inputState.guessing == 0) {
reportError(ex);
consume();
consumeUntil(_tokenSet_18);
} else {
throw ex;
}
}
returnAST = export_AST;
}
use of antlr.RecognitionException 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.RecognitionException in project cxf by apache.
the class IDLParser method literal.
public final void literal() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST literal_AST = null;
try {
// for error handling
switch(LA(1)) {
case INT:
case OCTAL:
case HEX:
{
integer_literal();
astFactory.addASTChild(currentAST, returnAST);
literal_AST = (AST) currentAST.root;
break;
}
case STRING_LITERAL:
{
string_literal();
astFactory.addASTChild(currentAST, returnAST);
literal_AST = (AST) currentAST.root;
break;
}
case WIDE_STRING_LITERAL:
{
wide_string_literal();
astFactory.addASTChild(currentAST, returnAST);
literal_AST = (AST) currentAST.root;
break;
}
case CHAR_LITERAL:
{
character_literal();
astFactory.addASTChild(currentAST, returnAST);
literal_AST = (AST) currentAST.root;
break;
}
case WIDE_CHAR_LITERAL:
{
wide_character_literal();
astFactory.addASTChild(currentAST, returnAST);
literal_AST = (AST) currentAST.root;
break;
}
case FIXED:
{
fixed_pt_literal();
astFactory.addASTChild(currentAST, returnAST);
literal_AST = (AST) currentAST.root;
break;
}
case FLOAT:
{
floating_pt_literal();
astFactory.addASTChild(currentAST, returnAST);
literal_AST = (AST) currentAST.root;
break;
}
case LITERAL_TRUE:
case LITERAL_FALSE:
{
boolean_literal();
astFactory.addASTChild(currentAST, returnAST);
literal_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 = literal_AST;
}
Aggregations