Interface NexusBlockParser

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  NexusBlockParser.Abstract
      All block parsers should derive from this abstract parser.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String UNKNOWN_BLOCK
      The name for an unknown block parser.
    • Method Detail

      • startBlock

        void startBlock​(java.lang.String blockName)
        Notifies the parser that a new block is starting.
        Parameters:
        blockName - the name of the block.
      • endBlock

        void endBlock()
        Notifies the parser that a block is ending.
      • parseToken

        void parseToken​(java.lang.String token)
                 throws ParseException
        Notifies the parser of the next token. Comment tokens will already have been parsed out and sent separately to the text() method of the listener. Quoted strings will have been parsed and underscores converted. What this token contains is the full string, after removal of quotes if necessary. The token will never be only whitespace.
        Parameters:
        token - the token to parse.
        Throws:
        ParseException - if the token is unparseable.
      • endComment

        void endComment()
        Closing a comment tag.
      • endTokenGroup

        void endTokenGroup()
        Closing a line (semi-colon encountered). This indicates that anything received after it is on the next logical line of the block.
      • commentText

        void commentText​(java.lang.String comment)
                  throws ParseException
        Receiving free text inside a comment tag.
        Parameters:
        comment - the text of the comment.
        Throws:
        ParseException
      • wantsBracketsAndBraces

        boolean wantsBracketsAndBraces()
        Does the listener want to know about brackets and braces as separate tokens?
        Returns:
        true if it does.