+ /**
+ * Parse given context and return yin value.
+ *
+ * @param ctx
+ * context to parse
+ * @return true if value is 'true', false otherwise
+ */
+ public static boolean parseYinValue(Argument_stmtContext ctx) {
+ boolean yinValue = false;
+ outer: for (int j = 0; j < ctx.getChildCount(); j++) {
+ ParseTree yin = ctx.getChild(j);
+ if (yin instanceof Yin_element_stmtContext) {
+ for (int k = 0; k < yin.getChildCount(); k++) {
+ ParseTree yinArg = yin.getChild(k);
+ if (yinArg instanceof Yin_element_argContext) {
+ String yinString = stringFromNode(yinArg);
+ if ("true".equals(yinString)) {
+ yinValue = true;
+ break outer;
+ }
+ }
+ }
+ }
+ }
+ return yinValue;
+ }
+