Class Machine

  • All Implemented Interfaces:
    CharSequence

    public class Machine
    extends Object
    implements CharSequence
    Duplicates corresponding class from SSLR to improve:
    • Performance in case of parsing list of tokens multiple times, but with different starting positions. Hot spot for original class in such case - is a conversion from list to array.
    • Error reporting (see COBOL-873, COBOL-435).
    • Method Detail

      • getAddress

        public int getAddress()
      • setAddress

        public void setAddress​(int address)
      • jump

        public void jump​(int offset)
      • popReturn

        public void popReturn()
      • pushReturn

        public void pushReturn​(int returnOffset,
                               Matcher matcher,
                               int callOffset)
      • pushBacktrack

        public void pushBacktrack​(int offset)
      • pop

        public void pop()
      • setIgnoreErrors

        public void setIgnoreErrors​(boolean ignoreErrors)
      • backtrack

        public void backtrack()
      • createNode

        public void createNode()
      • createLeafNode

        public void createLeafNode​(Matcher matcher,
                                   int offset)
      • getIndex

        public int getIndex()
      • setIndex

        public void setIndex​(int index)
      • advanceIndex

        public void advanceIndex​(int offset)
      • charAt

        public char charAt​(int offset)
        Specified by:
        charAt in interface CharSequence
      • tokenAt

        public Token tokenAt​(int offset)