Traverse an Operator tree handling special character substitution.

@param opImpl
@throws InvalidXPathSyntaxException
342163
private void postProcessOperands(OperatorImpl opImpl, String fullPath)
    throws InvalidXPathSyntaxException  
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(cclass,
               "postProcessOperands",
               "opImpl: " + opImpl + ", fullPath: " + fullPath);        
    // Check for Identifiers with ampersand strings
    for(int i = 0; i< opImpl.operands.length; i++)
    {
      Selector sel = opImpl.operands[i];
      postProcessSelectorTree(sel, fullPath);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "postProcessOperands");      
  }
356848
public final void ruleOpPostfix() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:621:2: ( ( ( rule__OpPostfix__Alternatives ) ) )
            // InternalXbase.g:622:2: ( ( rule__OpPostfix__Alternatives ) )
            {
            // InternalXbase.g:622:2: ( ( rule__OpPostfix__Alternatives ) )
            // InternalXbase.g:623:3: ( rule__OpPostfix__Alternatives )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getOpPostfixAccess().getAlternatives()); 
            }
            // InternalXbase.g:624:3: ( rule__OpPostfix__Alternatives )
            // InternalXbase.g:624:4: rule__OpPostfix__Alternatives
            {
            pushFollow(FOLLOW_2);
            rule__OpPostfix__Alternatives();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getOpPostfixAccess().getAlternatives()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
945761
public void runDocLint(TreePath path) {
        CompilationUnitTree unit = path.getCompilationUnit();
        if (doclint != null && shouldCheck.computeIfAbsent(unit, doclint::shouldCheck)) {
            doclint.scan(path);
        }
    }
1215105
private void insanityCheck(Element element, Meta meta, Opcode.Type type) {
		if (meta != null) {
			throw new TemplateException("Invalid operators list on element |%s|. Only one %s operator is allowed.", element, type);
		}
	}
284975
private void setXPathCharacteristics(IdentifierImpl identifier)
    throws InvalidXPathSyntaxException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(cclass,
               "setXPathCharacteristics",
               "identifier: " + identifier);
    
    // Need to set the domain to XPATH1.0
    identifier.setSelectorDomain(2);

    // Set the locationStep also
    identifier.setStep(locationStep);
    
    // Call XPath to compile the XPath1.0 expression and store the
    // resultant XPathExpression in the Identifier.
    XPathExpression xpexp = null;
    
    try
    {
      // Parse an expression up-front
      Node node = null;
      NodeList ns = null;
      XPath xpath0 = XPathFactory.newInstance().newXPath();
      
      // If a namespace context has been set then set it into the XPath env
      if(namespaceContext != null)
        xpath0.setNamespaceContext(namespaceContext);
      
      xpexp = xpath0.compile(identifier.getName());
    }
    catch (Exception ex)
    {
      // No FFDC Code Needed.
      // We don't FFDC because we'll catch this exception and then attempt
      // to parse the entire expression. If that fails, then we FFDC.
 
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        tc.exit(this,cclass, "setXPathCharacteristics", ex);   
     
      throw new InvalidXPathSyntaxException(identifier.getName());
    }

    // Store xpexp in the Identifier    
    identifier.setCompiledExpression(xpexp);
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "setXPathCharacteristics");     
  }
25627
function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters, $placement )
		{
				$firstParam = $namedParameters['first_param'];
				$secondParam = $namedParameters['second_param'];
				// Example code. This code must be modified to do what the operator should do. Currently it only trims text.
				switch ( $operatorName )
				{
						case 'ngpush_xml_clean':
						{
								//trim( $operatorValue );
								$operatorValue = strip_tags($operatorValue, "<p>");
								$operatorValue = preg_replace("/(?:&nbsp;)+/", " ", $operatorValue);
								$operatorValue = preg_replace("/[ \s]+/", " ", $operatorValue);
								$operatorValue = str_replace("</p>", "", $operatorValue);
								$operatorValue = preg_replace("/<p.*?>/", "\n", $operatorValue);
								$operatorValue = preg_replace("/(?: \n)+/", "\n", $operatorValue);
								$operatorValue = preg_replace("/(?:\n )+/", "\n", $operatorValue);
								$operatorValue = trim($operatorValue);
						} break;
				}
		}
616554
function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters, $placement )
    {
        $operatorValue = str_replace( "\n",
                                      "<br />",
                                      $operatorValue );
    }
495494
private static String guessParameterType(Database db, VoltXMLElement elm) {
        if (! isParameterized(elm) || ! elm.name.equals("operation")) {
            return "";
        } else {
            final ExpressionType op = mapOfVoltXMLOpType.get(elm.attributes.get("optype"));
            assert op != null;
            switch (op) {
                case CONJUNCTION_OR:
                case CONJUNCTION_AND:
                case OPERATOR_NOT:
                    return "boolean";
                case COMPARE_GREATERTHAN: // For these 2 operator-ops, the type is what the non-parameterized part gets set to.
                case COMPARE_LESSTHAN:
                case COMPARE_EQUAL:
                case COMPARE_NOTEQUAL:
                case COMPARE_GREATERTHANOREQUALTO:
                case COMPARE_LESSTHANOREQUALTO:
                case OPERATOR_PLUS:
                case OPERATOR_MINUS:
                case OPERATOR_MULTIPLY:
                case OPERATOR_DIVIDE:
                case OPERATOR_CONCAT:
                case OPERATOR_MOD:
                case COMPARE_IN:
                    final VoltXMLElement left = elm.children.get(0), right = elm.children.get(1);
                    return isParameterized(left) ? getType(db, right) : getType(db, left);
                case OPERATOR_UNARY_MINUS:
                    return "integer";
                case OPERATOR_IS_NULL:
                case OPERATOR_EXISTS:
                    return "";
                default:
                    assert false;
                    return "";
            }
        }
    }
938107
public static void checkOperatorIsValid(int operatorCode) {
        switch (operatorCode) {
            case OPERATOR_LT:
            case OPERATOR_LE:
            case OPERATOR_EQ:
            case OPERATOR_NE:
            case OPERATOR_GE:
            case OPERATOR_GT:
            case OPERATOR_UNKNOWN:
                return;
            default:
                throw new IllegalStateException(String.format(Locale.US, ERROR_INVALID_CODE, operatorCode));
        }
    }
425071
@Nullable
  private static Symbol tryGetSymbol(Tree tree) {
    if (tree instanceof JCIdent) {
      return ((JCIdent) tree).sym;
    }
    if (tree instanceof JCFieldAccess) {
      return ((JCFieldAccess) tree).sym;
    }
    if (tree instanceof JCVariableDecl) {
      return ((JCVariableDecl) tree).sym;
    }
    return null;
  }
1202440
private final void assertIsLocPathIterator(Expression expr1, ExpressionOwner eo) 
    throws RuntimeException 
  {
		if(!(expr1 instanceof LocPathIterator))
		{
			String errMsg;
			if(expr1 instanceof Variable)
			{
				errMsg = "Programmer's assertion: expr1 not an iterator: "+
				          ((Variable)expr1).getQName();
			}
			else
			{
				errMsg = "Programmer's assertion: expr1 not an iterator: "+
				          expr1.getClass().getName();
			}
			throw new RuntimeException(errMsg + ", "+
				          eo.getClass().getName()+" "+
				          expr1.exprGetParent());
		}
  }
1251764
private String doQueryStringConversions(TermPath termPath, String queryStr) throws InvalidQueryException {
        String hierarchyPathProp = "hierarchy/path";
        // replace "."
        if (queryStr != null && queryStr.contains(String.format("%s:.", hierarchyPathProp))) {
            //todo: regular expression replacement
            queryStr = queryStr.replaceAll(String.format("%s:.", hierarchyPathProp),
                    String.format("%s:%s", hierarchyPathProp, termPath.getPath()));
        }
        return queryStr;
    }
213058
public List<String> findStringValues(JvmAnnotationTarget op, Class<? extends Annotation> annotationType) {
		final JvmAnnotationReference reference = this.lookup.findAnnotation(op, annotationType);
		if (reference != null) {
			return findStringValues(reference);
		}
		return null;
	}
1282211
@Override
  public void exitSemantic_range(VersionParser.Semantic_rangeContext ctx) {
    String operator = ctx.getChild(0).getText();
    Object o = stack.pop();
    if (o instanceof SemanticVersion) {
      switch (operator) {
        case "^":
          SemanticVersion sv = (SemanticVersion) o;
          VersionRange from = new VersionRange(">=", sv);
          VersionRange to = new VersionRange("<", sv.getNextCaretVersion());
          range = new AndRange(from, to);
          break;
      }
      stack.push(range);
    }
    else {
      throw new InvalidRangeRuntimeException("Expected a semantic version, got a " + o.getClass().getSimpleName());
    }
  }
1221694
function buildForXStatement(op) {
  return function (node, print) {
    this.keyword("for");
    this.push("(");
    print.plain(node.left);
    this.push(" " + op + " ");
    print.plain(node.right);
    this.push(")");
    print.block(node.body);
  };
}
1235090
def _translate_src_oprnd(self, operand):
        
        if isinstance(operand, ReilRegisterOperand):
            return self._translate_src_register_oprnd(operand)
        elif isinstance(operand, ReilImmediateOperand):
            return smtsymbol.Constant(operand.size, operand.immediate)
        else:
            raise Exception("Invalid operand type")
135796
boolean isPrefixOf(BasePath<B> path) {
    ImmutableList<String> prefixSegments = getSegments();
    ImmutableList<String> childSegments = path.getSegments();
    if (prefixSegments.size() > path.getSegments().size()) {
      return false;
    }
    for (int i = 0; i < prefixSegments.size(); i++) {
      if (!prefixSegments.get(i).equals(childSegments.get(i))) {
        return false;
      }
    }
    return true;
  }