javacc-7.0.1.test.tmp.CORBA-IDL.IDLParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javacc Show documentation
Show all versions of javacc Show documentation
JavaCC is a parser/scanner generator for Java.
/* IDLParser.java */
/* Generated By:JavaCC: Do not edit this line. IDLParser.java */
public class IDLParser implements IDLParserConstants {
public static void main(String args[]) {
IDLParser parser;
if (args.length == 0) {
System.out.println("IDL Parser Version 0.1: Reading from standard input . . .");
parser = new IDLParser(System.in);
} else if (args.length == 1) {
System.out.println("IDL Parser Version 0.1: Reading from file " + args[0] + " . . .");
try {
parser = new IDLParser(new java.io.FileInputStream(args[0]));
} catch (java.io.FileNotFoundException e) {
System.out.println("IDL Parser Version 0.1: File " + args[0] + " not found.");
return;
}
} else {
System.out.println("IDL Parser Version 0.1: Usage is one of:");
System.out.println(" java IDLParser < inputfile");
System.out.println("OR");
System.out.println(" java IDLParser inputfile");
return;
}
try {
parser.specification();
System.out.println("IDL Parser Version 0.1: IDL file parsed successfully.");
} catch (ParseException e) {
System.out.println("IDL Parser Version 0.1: Encountered errors during parse.");
}
}
/* Production 1 */
static final public
void specification() throws ParseException {
label_1:
while (true) {
definition();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 9:
case 12:
case 16:
case 33:
case 43:
case 44:
case 48:
case 57:{
;
break;
}
default:
jj_la1[0] = jj_gen;
break label_1;
}
}
}
/* Production 2 */
static final public
void definition() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 33:
case 43:
case 44:
case 48:{
type_dcl();
jj_consume_token(8);
break;
}
case 16:{
const_dcl();
jj_consume_token(8);
break;
}
case 57:{
except_dcl();
jj_consume_token(8);
break;
}
case 12:{
interfacex();
jj_consume_token(8);
break;
}
case 9:{
module();
jj_consume_token(8);
break;
}
default:
jj_la1[1] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 3 */
static final public
void module() throws ParseException {
jj_consume_token(9);
identifier();
jj_consume_token(10);
label_2:
while (true) {
definition();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 9:
case 12:
case 16:
case 33:
case 43:
case 44:
case 48:
case 57:{
;
break;
}
default:
jj_la1[2] = jj_gen;
break label_2;
}
}
jj_consume_token(11);
}
/* Production 4 */
static final public
void interfacex() throws ParseException {
if (jj_2_1(3)) {
interface_dcl();
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 12:{
forward_dcl();
break;
}
default:
jj_la1[3] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
/* Production 5 */
static final public
void interface_dcl() throws ParseException {
interface_header();
jj_consume_token(10);
interface_body();
jj_consume_token(11);
}
/* Production 6 */
static final public
void forward_dcl() throws ParseException {
jj_consume_token(12);
identifier();
}
/* Production 7 */
static final public
void interface_header() throws ParseException {
jj_consume_token(12);
identifier();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 13:{
inheritance_spec();
break;
}
default:
jj_la1[4] = jj_gen;
;
}
}
/* Production 8 */
static final public
void interface_body() throws ParseException {
label_3:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 15:
case 16:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
case 48:
case 52:
case 55:
case 56:
case 57:
case 58:
case 59:
case ID:{
;
break;
}
default:
jj_la1[5] = jj_gen;
break label_3;
}
export();
}
}
/* Production 9 */
static final public
void export() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 33:
case 43:
case 44:
case 48:{
type_dcl();
jj_consume_token(8);
break;
}
case 16:{
const_dcl();
jj_consume_token(8);
break;
}
case 57:{
except_dcl();
jj_consume_token(8);
break;
}
case 55:
case 56:{
attr_dcl();
jj_consume_token(8);
break;
}
case 15:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 52:
case 58:
case 59:
case ID:{
op_dcl();
jj_consume_token(8);
break;
}
default:
jj_la1[6] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 10 */
static final public
void inheritance_spec() throws ParseException {
jj_consume_token(13);
scoped_name();
label_4:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 14:{
;
break;
}
default:
jj_la1[7] = jj_gen;
break label_4;
}
jj_consume_token(14);
scoped_name();
}
}
/* Production 11 */
static final public
void scoped_name() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 15:{
jj_consume_token(15);
break;
}
default:
jj_la1[8] = jj_gen;
;
}
identifier();
label_5:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 15:{
;
break;
}
default:
jj_la1[9] = jj_gen;
break label_5;
}
jj_consume_token(15);
identifier();
}
}
/* Production 12 */
static final public
void const_dcl() throws ParseException {
jj_consume_token(16);
const_type();
identifier();
jj_consume_token(17);
const_exp();
}
/* Production 13 */
static final public
void const_type() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 36:
case 37:
case 38:{
integer_type();
break;
}
case 39:{
char_type();
break;
}
case 40:{
boolean_type();
break;
}
case 34:
case 35:{
floating_pt_type();
break;
}
case 52:{
string_type();
break;
}
case 15:
case ID:{
scoped_name();
break;
}
default:
jj_la1[10] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 14 */
static final public
void const_exp() throws ParseException {
or_expr();
}
/* Production 15 */
static final public
void or_expr() throws ParseException {
xor_expr();
label_6:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 18:{
;
break;
}
default:
jj_la1[11] = jj_gen;
break label_6;
}
jj_consume_token(18);
xor_expr();
}
}
/* Production 16 */
static final public
void xor_expr() throws ParseException {
and_expr();
label_7:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 19:{
;
break;
}
default:
jj_la1[12] = jj_gen;
break label_7;
}
jj_consume_token(19);
and_expr();
}
}
/* Production 17 */
static final public
void and_expr() throws ParseException {
shift_expr();
label_8:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 20:{
;
break;
}
default:
jj_la1[13] = jj_gen;
break label_8;
}
jj_consume_token(20);
shift_expr();
}
}
/* Production 18 */
static final public
void shift_expr() throws ParseException {
add_expr();
label_9:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 21:
case 22:{
;
break;
}
default:
jj_la1[14] = jj_gen;
break label_9;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 21:{
jj_consume_token(21);
break;
}
case 22:{
jj_consume_token(22);
break;
}
default:
jj_la1[15] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
add_expr();
}
}
/* Production 19 */
static final public
void add_expr() throws ParseException {
mult_expr();
label_10:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 23:
case 24:{
;
break;
}
default:
jj_la1[16] = jj_gen;
break label_10;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 23:{
jj_consume_token(23);
break;
}
case 24:{
jj_consume_token(24);
break;
}
default:
jj_la1[17] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
mult_expr();
}
}
/* Production 20 */
static final public
void mult_expr() throws ParseException {
unary_expr();
label_11:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 25:
case 26:
case 27:{
;
break;
}
default:
jj_la1[18] = jj_gen;
break label_11;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 25:{
jj_consume_token(25);
break;
}
case 26:{
jj_consume_token(26);
break;
}
case 27:{
jj_consume_token(27);
break;
}
default:
jj_la1[19] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
unary_expr();
}
}
/* Production 21 */
static final public
void unary_expr() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 23:
case 24:
case 28:{
unary_operator();
break;
}
default:
jj_la1[20] = jj_gen;
;
}
primary_expr();
}
/* Production 22 */
static final public void unary_operator() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 24:{
jj_consume_token(24);
break;
}
case 23:{
jj_consume_token(23);
break;
}
case 28:{
jj_consume_token(28);
break;
}
default:
jj_la1[21] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 23 */
static final public
void primary_expr() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 15:
case ID:{
scoped_name();
break;
}
case 31:
case 32:
case OCTALINT:
case DECIMALINT:
case HEXADECIMALINT:
case FLOATONE:
case FLOATTWO:
case CHARACTER:
case STRING:{
literal();
break;
}
case 29:{
jj_consume_token(29);
const_exp();
jj_consume_token(30);
break;
}
default:
jj_la1[22] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 24 */
static final public
void literal() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case OCTALINT:
case DECIMALINT:
case HEXADECIMALINT:{
integer_literal();
break;
}
case STRING:{
string_literal();
break;
}
case CHARACTER:{
character_literal();
break;
}
case FLOATONE:
case FLOATTWO:{
floating_pt_literal();
break;
}
case 31:
case 32:{
boolean_literal();
break;
}
default:
jj_la1[23] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 25 */
static final public
void boolean_literal() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 31:{
jj_consume_token(31);
break;
}
case 32:{
jj_consume_token(32);
break;
}
default:
jj_la1[24] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 26 */
static final public
void positive_int_const() throws ParseException {
const_exp();
}
/* Production 27 */
static final public
void type_dcl() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 33:{
jj_consume_token(33);
type_declarator();
break;
}
case 43:{
struct_type();
break;
}
case 44:{
union_type();
break;
}
case 48:{
enum_type();
break;
}
default:
jj_la1[25] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 28 */
static final public
void type_declarator() throws ParseException {
type_spec();
declarators();
}
/* Production 29 */
static final public
void type_spec() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 15:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 49:
case 52:
case ID:{
simple_type_spec();
break;
}
case 43:
case 44:
case 48:{
constr_type_spec();
break;
}
default:
jj_la1[26] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 30 */
static final public
void simple_type_spec() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:{
base_type_spec();
break;
}
case 49:
case 52:{
template_type_spec();
break;
}
case 15:
case ID:{
scoped_name();
break;
}
default:
jj_la1[27] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 31 */
static final public
void base_type_spec() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 34:
case 35:{
floating_pt_type();
break;
}
case 36:
case 37:
case 38:{
integer_type();
break;
}
case 39:{
char_type();
break;
}
case 40:{
boolean_type();
break;
}
case 41:{
octet_type();
break;
}
case 42:{
any_type();
break;
}
default:
jj_la1[28] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 32 */
static final public
void template_type_spec() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 49:{
sequence_type();
break;
}
case 52:{
string_type();
break;
}
default:
jj_la1[29] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 33 */
static final public
void constr_type_spec() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 43:{
struct_type();
break;
}
case 44:{
union_type();
break;
}
case 48:{
enum_type();
break;
}
default:
jj_la1[30] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 34 */
static final public
void declarators() throws ParseException {
declarator();
label_12:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 14:{
;
break;
}
default:
jj_la1[31] = jj_gen;
break label_12;
}
jj_consume_token(14);
declarator();
}
}
/* Production 35 */
static final public
void declarator() throws ParseException {
if (jj_2_2(2)) {
complex_declarator();
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ID:{
simple_declarator();
break;
}
default:
jj_la1[32] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
/* Production 36 */
static final public
void simple_declarator() throws ParseException {
identifier();
}
/* Production 37 */
static final public
void complex_declarator() throws ParseException {
array_declarator();
}
/* Production 38 */
static final public
void floating_pt_type() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 34:{
jj_consume_token(34);
break;
}
case 35:{
jj_consume_token(35);
break;
}
default:
jj_la1[33] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 39 */
static final public
void integer_type() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 36:
case 37:{
signed_int();
break;
}
case 38:{
unsigned_int();
break;
}
default:
jj_la1[34] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 40 */
static final public
void signed_int() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 36:{
signed_long_int();
break;
}
case 37:{
signed_short_int();
break;
}
default:
jj_la1[35] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 41 */
static final public
void signed_long_int() throws ParseException {
jj_consume_token(36);
}
/* Production 42 */
static final public
void signed_short_int() throws ParseException {
jj_consume_token(37);
}
/* Production 43 */
static final public
void unsigned_int() throws ParseException {
if (jj_2_3(2)) {
unsigned_long_int();
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 38:{
unsigned_short_int();
break;
}
default:
jj_la1[36] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
/* Production 44 */
static final public
void unsigned_long_int() throws ParseException {
jj_consume_token(38);
jj_consume_token(36);
}
/* Production 45 */
static final public
void unsigned_short_int() throws ParseException {
jj_consume_token(38);
jj_consume_token(37);
}
/* Production 46 */
static final public
void char_type() throws ParseException {
jj_consume_token(39);
}
/* Production 47 */
static final public
void boolean_type() throws ParseException {
jj_consume_token(40);
}
/* Production 48 */
static final public
void octet_type() throws ParseException {
jj_consume_token(41);
}
/* Production 49 */
static final public
void any_type() throws ParseException {
jj_consume_token(42);
}
/* Production 50 */
static final public
void struct_type() throws ParseException {
jj_consume_token(43);
identifier();
jj_consume_token(10);
member_list();
jj_consume_token(11);
}
/* Production 51 */
static final public
void member_list() throws ParseException {
label_13:
while (true) {
member();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 15:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
case 48:
case 49:
case 52:
case ID:{
;
break;
}
default:
jj_la1[37] = jj_gen;
break label_13;
}
}
}
/* Production 52 */
static final public
void member() throws ParseException {
type_spec();
declarators();
jj_consume_token(8);
}
/* Production 53 */
static final public
void union_type() throws ParseException {
jj_consume_token(44);
identifier();
jj_consume_token(45);
jj_consume_token(29);
switch_type_spec();
jj_consume_token(30);
jj_consume_token(10);
switch_body();
jj_consume_token(11);
}
/* Production 54 */
static final public
void switch_type_spec() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 36:
case 37:
case 38:{
integer_type();
break;
}
case 39:{
char_type();
break;
}
case 40:{
boolean_type();
break;
}
case 48:{
enum_type();
break;
}
case 15:
case ID:{
scoped_name();
break;
}
default:
jj_la1[38] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 55 */
static final public
void switch_body() throws ParseException {
label_14:
while (true) {
casex();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 46:
case 47:{
;
break;
}
default:
jj_la1[39] = jj_gen;
break label_14;
}
}
}
/* Production 56 */
static final public
void casex() throws ParseException {
label_15:
while (true) {
case_label();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 46:
case 47:{
;
break;
}
default:
jj_la1[40] = jj_gen;
break label_15;
}
}
element_spec();
jj_consume_token(8);
}
/* Production 57 */
static final public
void case_label() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 46:{
jj_consume_token(46);
const_exp();
jj_consume_token(13);
break;
}
case 47:{
jj_consume_token(47);
jj_consume_token(13);
break;
}
default:
jj_la1[41] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 58 */
static final public
void element_spec() throws ParseException {
type_spec();
declarator();
}
/* Production 59 */
static final public
void enum_type() throws ParseException {
jj_consume_token(48);
identifier();
jj_consume_token(10);
enumerator();
label_16:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 14:{
;
break;
}
default:
jj_la1[42] = jj_gen;
break label_16;
}
jj_consume_token(14);
enumerator();
}
jj_consume_token(11);
}
/* Production 60 */
static final public
void enumerator() throws ParseException {
identifier();
}
/* Production 61 */
static final public
void sequence_type() throws ParseException {
jj_consume_token(49);
jj_consume_token(50);
simple_type_spec();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 14:{
jj_consume_token(14);
positive_int_const();
break;
}
default:
jj_la1[43] = jj_gen;
;
}
jj_consume_token(51);
}
/* Production 62 */
static final public
void string_type() throws ParseException {
jj_consume_token(52);
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 50:{
jj_consume_token(50);
positive_int_const();
jj_consume_token(51);
break;
}
default:
jj_la1[44] = jj_gen;
;
}
}
/* Production 63 */
static final public
void array_declarator() throws ParseException {
identifier();
label_17:
while (true) {
fixed_array_size();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 53:{
;
break;
}
default:
jj_la1[45] = jj_gen;
break label_17;
}
}
}
/* Production 64 */
static final public
void fixed_array_size() throws ParseException {
jj_consume_token(53);
positive_int_const();
jj_consume_token(54);
}
/* Production 65 */
static final public
void attr_dcl() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 55:{
jj_consume_token(55);
break;
}
default:
jj_la1[46] = jj_gen;
;
}
jj_consume_token(56);
param_type_spec();
simple_declarator();
label_18:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 14:{
;
break;
}
default:
jj_la1[47] = jj_gen;
break label_18;
}
jj_consume_token(14);
simple_declarator();
}
}
/* Production 66 */
static final public
void except_dcl() throws ParseException {
jj_consume_token(57);
identifier();
jj_consume_token(10);
label_19:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 15:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
case 48:
case 49:
case 52:
case ID:{
;
break;
}
default:
jj_la1[48] = jj_gen;
break label_19;
}
member();
}
jj_consume_token(11);
}
/* Production 67 */
static final public
void op_dcl() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 58:{
op_attribute();
break;
}
default:
jj_la1[49] = jj_gen;
;
}
op_type_spec();
identifier();
parameter_dcls();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 63:{
raises_expr();
break;
}
default:
jj_la1[50] = jj_gen;
;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 64:{
context_expr();
break;
}
default:
jj_la1[51] = jj_gen;
;
}
}
/* Production 68 */
static final public
void op_attribute() throws ParseException {
jj_consume_token(58);
}
/* Production 69 */
static final public
void op_type_spec() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 15:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 52:
case ID:{
param_type_spec();
break;
}
case 59:{
jj_consume_token(59);
break;
}
default:
jj_la1[52] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 70 */
static final public
void parameter_dcls() throws ParseException {
jj_consume_token(29);
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 60:
case 61:
case 62:{
param_dcl();
label_20:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 14:{
;
break;
}
default:
jj_la1[53] = jj_gen;
break label_20;
}
jj_consume_token(14);
param_dcl();
}
break;
}
default:
jj_la1[54] = jj_gen;
;
}
jj_consume_token(30);
}
/* Production 71 */
static final public
void param_dcl() throws ParseException {
param_attribute();
param_type_spec();
simple_declarator();
}
/* Production 72 */
static final public
void param_attribute() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 60:{
jj_consume_token(60);
break;
}
case 61:{
jj_consume_token(61);
break;
}
case 62:{
jj_consume_token(62);
break;
}
default:
jj_la1[55] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Production 73 */
static final public
void raises_expr() throws ParseException {
jj_consume_token(63);
jj_consume_token(29);
scoped_name();
label_21:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 14:{
;
break;
}
default:
jj_la1[56] = jj_gen;
break label_21;
}
jj_consume_token(14);
scoped_name();
}
jj_consume_token(30);
}
/* Production 74 */
static final public
void context_expr() throws ParseException {
jj_consume_token(64);
jj_consume_token(29);
string_literal();
label_22:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 14:{
;
break;
}
default:
jj_la1[57] = jj_gen;
break label_22;
}
jj_consume_token(14);
string_literal();
}
jj_consume_token(30);
}
/* Production 75 */
static final public
void param_type_spec() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:{
base_type_spec();
break;
}
case 52:{
string_type();
break;
}
case 15:
case ID:{
scoped_name();
break;
}
default:
jj_la1[58] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/* Definitions of complex regular expressions follow */
static final public
void identifier() throws ParseException {
jj_consume_token(ID);
}
static final public void integer_literal() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case OCTALINT:{
jj_consume_token(OCTALINT);
break;
}
case DECIMALINT:{
jj_consume_token(DECIMALINT);
break;
}
case HEXADECIMALINT:{
jj_consume_token(HEXADECIMALINT);
break;
}
default:
jj_la1[59] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
static final public void string_literal() throws ParseException {
jj_consume_token(STRING);
}
static final public void character_literal() throws ParseException {
jj_consume_token(CHARACTER);
}
static final public void floating_pt_literal() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FLOATONE:{
jj_consume_token(FLOATONE);
break;
}
case FLOATTWO:{
jj_consume_token(FLOATTWO);
break;
}
default:
jj_la1[60] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
static private boolean jj_2_1(int xla)
{
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return (!jj_3_1()); }
catch(LookaheadSuccess ls) { return true; }
finally { jj_save(0, xla); }
}
static private boolean jj_2_2(int xla)
{
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return (!jj_3_2()); }
catch(LookaheadSuccess ls) { return true; }
finally { jj_save(1, xla); }
}
static private boolean jj_2_3(int xla)
{
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return (!jj_3_3()); }
catch(LookaheadSuccess ls) { return true; }
finally { jj_save(2, xla); }
}
static private boolean jj_3R_30()
{
if (jj_scan_token(13)) return true;
return false;
}
static private boolean jj_3R_23()
{
if (jj_3R_26()) return true;
if (jj_scan_token(10)) return true;
return false;
}
static private boolean jj_3R_24()
{
if (jj_3R_27()) return true;
return false;
}
static private boolean jj_3R_28()
{
if (jj_3R_30()) return true;
return false;
}
static private boolean jj_3R_27()
{
if (jj_scan_token(65)) return true;
Token xsp;
if (jj_3R_29()) return true;
while (true) {
xsp = jj_scanpos;
if (jj_3R_29()) { jj_scanpos = xsp; break; }
}
return false;
}
static private boolean jj_3R_25()
{
if (jj_scan_token(38)) return true;
if (jj_scan_token(36)) return true;
return false;
}
static private boolean jj_3R_26()
{
if (jj_scan_token(12)) return true;
if (jj_scan_token(65)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_28()) jj_scanpos = xsp;
return false;
}
static private boolean jj_3R_29()
{
if (jj_3R_31()) return true;
return false;
}
static private boolean jj_3_1()
{
if (jj_3R_23()) return true;
return false;
}
static private boolean jj_3_3()
{
if (jj_3R_25()) return true;
return false;
}
static private boolean jj_3R_31()
{
if (jj_scan_token(53)) return true;
return false;
}
static private boolean jj_3_2()
{
if (jj_3R_24()) return true;
return false;
}
static private boolean jj_initialized_once = false;
/** Generated Token Manager. */
static public IDLParserTokenManager token_source;
static SimpleCharStream jj_input_stream;
/** Current token. */
static public Token token;
/** Next token. */
static public Token jj_nt;
static private int jj_ntk;
static private Token jj_scanpos, jj_lastpos;
static private int jj_la;
static private int jj_gen;
static final private int[] jj_la1 = new int[61];
static private int[] jj_la1_0;
static private int[] jj_la1_1;
static private int[] jj_la1_2;
static {
jj_la1_init_0();
jj_la1_init_1();
jj_la1_init_2();
}
private static void jj_la1_init_0() {
jj_la1_0 = new int[] {0x11200,0x11200,0x11200,0x1000,0x2000,0x18000,0x18000,0x4000,0x8000,0x8000,0x8000,0x40000,0x80000,0x100000,0x600000,0x600000,0x1800000,0x1800000,0xe000000,0xe000000,0x11800000,0x11800000,0xa0008000,0x80000000,0x80000000,0x0,0x8000,0x8000,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x8000,0x8000,0x0,0x0,0x0,0x4000,0x4000,0x0,0x0,0x0,0x4000,0x8000,0x0,0x0,0x0,0x8000,0x4000,0x0,0x0,0x4000,0x4000,0x8000,0x0,0x0,};
}
private static void jj_la1_init_1() {
jj_la1_1 = new int[] {0x2011802,0x2011802,0x2011802,0x0,0x0,0xf911ffe,0xf911ffe,0x0,0x0,0x0,0x1001fc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x1,0x11802,0x131ffc,0x1207fc,0x7fc,0x120000,0x11800,0x0,0x0,0xc,0x70,0x30,0x40,0x131ffc,0x101f0,0xc000,0xc000,0xc000,0x0,0x0,0x40000,0x200000,0x800000,0x0,0x131ffc,0x4000000,0x80000000,0x0,0x81007fc,0x0,0x70000000,0x70000000,0x0,0x0,0x1007fc,0x0,0x0,};
}
private static void jj_la1_init_2() {
jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fe,0x1fc,0x0,0x0,0x2,0x2,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x2,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x1,0x2,0x0,0x0,0x0,0x0,0x0,0x2,0x1c,0x60,};
}
static final private JJCalls[] jj_2_rtns = new JJCalls[3];
static private boolean jj_rescan = false;
static private int jj_gc = 0;
/** Constructor with InputStream. */
public IDLParser(java.io.InputStream stream) {
this(stream, null);
}
/** Constructor with InputStream and supplied encoding */
public IDLParser(java.io.InputStream stream, String encoding) {
if (jj_initialized_once) {
System.out.println("ERROR: Second call to constructor of static parser. ");
System.out.println(" You must either use ReInit() or set the JavaCC option STATIC to false");
System.out.println(" during parser generation.");
throw new Error();
}
jj_initialized_once = true;
try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
token_source = new IDLParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 61; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Reinitialise. */
static public void ReInit(java.io.InputStream stream) {
ReInit(stream, null);
}
/** Reinitialise. */
static public void ReInit(java.io.InputStream stream, String encoding) {
try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
token_source.ReInit(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 61; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Constructor. */
public IDLParser(java.io.Reader stream) {
if (jj_initialized_once) {
System.out.println("ERROR: Second call to constructor of static parser. ");
System.out.println(" You must either use ReInit() or set the JavaCC option STATIC to false");
System.out.println(" during parser generation.");
throw new Error();
}
jj_initialized_once = true;
jj_input_stream = new SimpleCharStream(stream, 1, 1);
token_source = new IDLParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 61; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Reinitialise. */
static public void ReInit(java.io.Reader stream) {
if (jj_input_stream == null) {
jj_input_stream = new SimpleCharStream(stream, 1, 1);
} else {
jj_input_stream.ReInit(stream, 1, 1);
}
if (token_source == null) {
token_source = new IDLParserTokenManager(jj_input_stream);
}
token_source.ReInit(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 61; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Constructor with generated Token Manager. */
public IDLParser(IDLParserTokenManager tm) {
if (jj_initialized_once) {
System.out.println("ERROR: Second call to constructor of static parser. ");
System.out.println(" You must either use ReInit() or set the JavaCC option STATIC to false");
System.out.println(" during parser generation.");
throw new Error();
}
jj_initialized_once = true;
token_source = tm;
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 61; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Reinitialise. */
public void ReInit(IDLParserTokenManager tm) {
token_source = tm;
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 61; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
static private Token jj_consume_token(int kind) throws ParseException {
Token oldToken;
if ((oldToken = token).next != null) token = token.next;
else token = token.next = token_source.getNextToken();
jj_ntk = -1;
if (token.kind == kind) {
jj_gen++;
if (++jj_gc > 100) {
jj_gc = 0;
for (int i = 0; i < jj_2_rtns.length; i++) {
JJCalls c = jj_2_rtns[i];
while (c != null) {
if (c.gen < jj_gen) c.first = null;
c = c.next;
}
}
}
return token;
}
token = oldToken;
jj_kind = kind;
throw generateParseException();
}
@SuppressWarnings("serial")
static private final class LookaheadSuccess extends java.lang.Error { }
static final private LookaheadSuccess jj_ls = new LookaheadSuccess();
static private boolean jj_scan_token(int kind) {
if (jj_scanpos == jj_lastpos) {
jj_la--;
if (jj_scanpos.next == null) {
jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
} else {
jj_lastpos = jj_scanpos = jj_scanpos.next;
}
} else {
jj_scanpos = jj_scanpos.next;
}
if (jj_rescan) {
int i = 0; Token tok = token;
while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
if (tok != null) jj_add_error_token(kind, i);
}
if (jj_scanpos.kind != kind) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
return false;
}
/** Get the next Token. */
static final public Token getNextToken() {
if (token.next != null) token = token.next;
else token = token.next = token_source.getNextToken();
jj_ntk = -1;
jj_gen++;
return token;
}
/** Get the specific Token. */
static final public Token getToken(int index) {
Token t = token;
for (int i = 0; i < index; i++) {
if (t.next != null) t = t.next;
else t = t.next = token_source.getNextToken();
}
return t;
}
static private int jj_ntk_f() {
if ((jj_nt=token.next) == null)
return (jj_ntk = (token.next=token_source.getNextToken()).kind);
else
return (jj_ntk = jj_nt.kind);
}
static private java.util.List jj_expentries = new java.util.ArrayList();
static private int[] jj_expentry;
static private int jj_kind = -1;
static private int[] jj_lasttokens = new int[100];
static private int jj_endpos;
static private void jj_add_error_token(int kind, int pos) {
if (pos >= 100) {
return;
}
if (pos == jj_endpos + 1) {
jj_lasttokens[jj_endpos++] = kind;
} else if (jj_endpos != 0) {
jj_expentry = new int[jj_endpos];
for (int i = 0; i < jj_endpos; i++) {
jj_expentry[i] = jj_lasttokens[i];
}
for (int[] oldentry : jj_expentries) {
if (oldentry.length == jj_expentry.length) {
boolean isMatched = true;
for (int i = 0; i < jj_expentry.length; i++) {
if (oldentry[i] != jj_expentry[i]) {
isMatched = false;
break;
}
}
if (isMatched) {
jj_expentries.add(jj_expentry);
break;
}
}
}
if (pos != 0) {
jj_lasttokens[(jj_endpos = pos) - 1] = kind;
}
}
}
/** Generate ParseException. */
static public ParseException generateParseException() {
jj_expentries.clear();
boolean[] la1tokens = new boolean[73];
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
}
for (int i = 0; i < 61; i++) {
if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1< jj_gen) {
jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
switch (i) {
case 0: jj_3_1(); break;
case 1: jj_3_2(); break;
case 2: jj_3_3(); break;
}
}
p = p.next;
} while (p != null);
} catch(LookaheadSuccess ls) { }
}
jj_rescan = false;
}
static private void jj_save(int index, int xla) {
JJCalls p = jj_2_rtns[index];
while (p.gen > jj_gen) {
if (p.next == null) { p = p.next = new JJCalls(); break; }
p = p.next;
}
p.gen = jj_gen + xla - jj_la;
p.first = token;
p.arg = xla;
}
static final class JJCalls {
int gen;
Token first;
int arg;
JJCalls next;
}
}