Interface ParserStage


  • public interface ParserStage
    An individual stage of the token parser. A parser is composed of a sequence of ParserStage objects.
    • Method Detail

      • setOptional

        void setOptional​(boolean optional)
        Mark the stage as optional.
        Parameters:
        optional -
      • setTerminal

        void setTerminal​(boolean terminal)
        Mark the stage as terminal, ie. it handles a buffer underflow as successful completion instead of failure.
        Parameters:
        terminal -
      • apply

        ParserState apply​(ParserState state)
        Process the state for this stage and return it so that the next stage can continue processing.