Class PipelineRuleParser

java.lang.Object
org.graylog.plugins.pipelineprocessor.parser.PipelineRuleParser

public class PipelineRuleParser extends Object
  • Field Details

    • WALKER

      public static final org.antlr.v4.runtime.tree.ParseTreeWalker WALKER
  • Constructor Details

    • PipelineRuleParser

      @Inject public PipelineRuleParser(FunctionRegistry functionRegistry)
  • Method Details

    • parseRule

      public Rule parseRule(String rule, boolean silent) throws ParseException
      Throws:
      ParseException
    • parseRule

      public Rule parseRule(String id, String rule, boolean silent) throws ParseException
      Parses the given rule source and optionally generates a Java class for it if the classloader is not null.
      Parameters:
      id - the id of the rule, necessary to generate code
      rule - rule source code
      silent - don't emit status messages during parsing
      Returns:
      the parse rule
      Throws:
      ParseException - if a one or more parse errors occur
    • parsePipelines

      public List<Pipeline> parsePipelines(String pipelines) throws ParseException
      Throws:
      ParseException
    • parsePipeline

      public Pipeline parsePipeline(String id, String source)
    • unquote

      public static String unquote(String string, char quoteChar)
    • unescape

      public static String unescape(String string)