Class TreeExpressionEvaluator

java.lang.Object
nl.basjes.parse.useragent.analyze.treewalker.TreeExpressionEvaluator
All Implemented Interfaces:
Serializable

public class TreeExpressionEvaluator extends Object implements Serializable
This class gets the symbol table (1 value) uses that to evaluate the expression against the parsed user agent
See Also:
  • Constructor Details

    • TreeExpressionEvaluator

      public TreeExpressionEvaluator(org.antlr.v4.runtime.ParserRuleContext requiredPattern, Matcher matcher, boolean verbose)
  • Method Details

    • isEmpty

      public boolean isEmpty()
    • destroy

      public void destroy()
    • getFixedValue

      public String getFixedValue()
      Returns:
      The fixed value in case of a fixed value. NULL if a dynamic value
    • evaluate

      public WalkList.WalkResult evaluate(org.antlr.v4.runtime.tree.ParseTree tree, String key, String value)
    • mustHaveMatches

      public boolean mustHaveMatches()
    • getWalkListForUnitTesting

      public WalkList getWalkListForUnitTesting()
    • pruneTrailingStepsThatCannotFail

      public long pruneTrailingStepsThatCannotFail()