/* Production 83, chapter 3.4, corba 2.3.1 */ public void array_declarator() { /*@bgen(jjtree) array_declarator */ ASTarray_declarator jjtn000 = new ASTarray_declarator(this, IDLParserTreeConstants.JJTARRAY_DECLARATOR); bool jjtc000 = true; jjtree.openNodeScope(jjtn000);String ident = ""; try { ident = identifier(); while (true) { fixed_array_size(); switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) { case 72: ; break; default: jj_la1[71] = jj_gen; goto label_22; break; } } label_22: ; jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setIdent(ident); } catch (Exception jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } {if (true) throw ;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
/** * @see parser.IDLParserVisitor#visit(ASTarray_declarator, Object) */ public Object visit(ASTarray_declarator node, Object data) { int[] dimensions = new int[node.jjtGetNumChildren()]; for (int i = 0; i < node.jjtGetNumChildren(); i++) { long dimension = (long)node.jjtGetChild(i).jjtAccept(this, data); dimensions[i] = (int)dimension; } return dimensions; }