Class Step

    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
      • logprefix

        protected String logprefix
      • verbose

        protected boolean verbose
    • Constructor Detail

      • Step

        public Step()
    • Method Detail

      • setVerbose

        public void setVerbose​(boolean newVerbose)
      • destroy

        public void destroy()
      • setNextStep

        public final void setNextStep​(int newStepNr,
                                      Step newNextStep)
      • walkNextStep

        protected final WalkList.WalkResult walkNextStep​(org.antlr.v4.runtime.tree.ParseTree tree,
                                                         String value)
      • up

        protected final org.antlr.v4.runtime.tree.ParseTree up​(org.antlr.v4.runtime.tree.ParseTree tree)
      • treeIsSeparator

        public static boolean treeIsSeparator​(org.antlr.v4.runtime.tree.ParseTree tree)
      • getActualValue

        protected String getActualValue​(org.antlr.v4.runtime.tree.ParseTree tree,
                                        String value)
      • walk

        public abstract WalkList.WalkResult walk​(org.antlr.v4.runtime.tree.ParseTree tree,
                                                 String value)
        This will walk into the tree and recurse through all the remaining steps. This must iterate of all possibilities and return the first matching result.
        Parameters:
        tree - The tree to walk into.
        value - The string representation of the previous step (needed for compare and lookup operations). The null value means to use the implicit 'full' value (i.e. getSourceText(tree) )
        Returns:
        Either null or the actual value that was found.
      • canFail

        public boolean canFail()
        Some steps cannot fail. For a require rule if the last step cannot fail then this can be removed from the require list to improve performance at run time.
        Returns:
        If this specific step can or cannot fail.
      • mustHaveInput

        public boolean mustHaveInput()
        Some steps can even pass if there is no input provided.
        Returns:
        If this specific step needs input to pass.
      • getNextStep

        public Step getNextStep()