Interface TokenControl


public interface TokenControl
Offers methods to control the parsing process by the handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disable the handling of all types of comments.
    void
    disableComments(int type)
    Disable the handling of comments of the given type.
    void
    Enable the handling of all types of comments.
    void
    enableComments(int type)
    Enable the handling of comments of the given type.
    void
    setAcceptEofEndingQuoted(boolean accept)
    If set, quoted strings ending with an EOF (End Of File). are processed through the relevant quoted method, albeit an error is reported in any case.
    void
    If set, quoted strings ending with an unescaped newline (instead of the closing quote) are processed through the relevant quoted method, albeit an error is reported in any case.
  • Method Details

    • enableAllComments

      void enableAllComments()
      Enable the handling of all types of comments.
    • setAcceptNewlineEndingQuote

      void setAcceptNewlineEndingQuote(boolean accept)
      If set, quoted strings ending with an unescaped newline (instead of the closing quote) are processed through the relevant quoted method, albeit an error is reported in any case. Otherwise, only the error is reported.

      It is set to false by default.

      Parameters:
      accept - true to process quoted strings that ends with an unescaped newline, false otherwise.
    • setAcceptEofEndingQuoted

      void setAcceptEofEndingQuoted(boolean accept)
      If set, quoted strings ending with an EOF (End Of File). are processed through the relevant quoted method, albeit an error is reported in any case. Otherwise, only the error is reported.

      It is set to false by default.

      Parameters:
      accept - true to process quoted strings that ends with an EOF, false otherwise.
    • disableAllComments

      void disableAllComments()
      Disable the handling of all types of comments.
    • enableComments

      void enableComments(int type)
      Enable the handling of comments of the given type.
      Parameters:
      type - the type of comment to enable. If the type does not exist, implementations may or may not throw an exception, depending on the intended coupling with the TokenHandler.
    • disableComments

      void disableComments(int type)
      Disable the handling of comments of the given type.
      Parameters:
      type - the type of comment to disable. If the type does not exist, implementations may or may not throw an exception, depending on the intended coupling with the TokenHandler.