/* Production 94, chapter 3.4, corba 2.3.1 */ public void context_expr() { /*@bgen(jjtree) context_expr */ ASTcontext_expr jjtn000 = new ASTcontext_expr(this, IDLParserTreeConstants.JJTCONTEXT_EXPR); bool jjtc000 = true; jjtree.openNodeScope(jjtn000);String contElem = ""; try { jj_consume_token(82); jj_consume_token(29); contElem = string_literal(); jjtn000.AddContextElement(contElem); while (true) { switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) { case 20: ; break; default: jj_la1[83] = jj_gen; goto label_27; break; } jj_consume_token(20); contElem = string_literal(); jjtn000.AddContextElement(contElem); } label_27: ; jj_consume_token(30); } 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(ASTcontext_expr, Object) */ public Object visit(ASTcontext_expr node, Object data) { ArrayList result = new ArrayList(); foreach (string element in node.GetContextElements()) { if (!element.EndsWith("*")) { result.Add(element); } else { Console.WriteLine("warning: context element with * at the end not supported by IIOP.NET; ignoring"); } } return (string[])result.ToArray(ReflectionHelper.StringType); }