Interface Input.Tok

  • All Known Implementing Classes:
    JavaInput.Tok
    Enclosing class:
    Input

    public static interface Input.Tok
    A Tok ("tock") is a token, or a comment, or a newline, or a maximal string of blanks. A token Tok underlies a Input.Token, and each other Tok is attached to a single Token. Tokens and comments have indices; white space Toks do not.
    • Method Detail

      • getIndex

        int getIndex()
        Return the Tok's index.
        Returns:
        its index
      • getPosition

        int getPosition()
        Return the Tok's 0-based position.
        Returns:
        its position
      • getColumn

        int getColumn()
        Return the Tok's 0-based column number.
        Returns:
        its column number
      • getText

        java.lang.String getText()
        The Tok's text.
      • getOriginalText

        java.lang.String getOriginalText()
        The Tok's original text (before processing escapes).
      • length

        int length()
        The length of the Tok's original text.
      • isNewline

        boolean isNewline()
        Is the Tok a newline?
      • isSlashSlashComment

        boolean isSlashSlashComment()
        Is the Tok a "//" comment?
      • isSlashStarComment

        boolean isSlashStarComment()
        Is the Tok a "/*" comment?
      • isJavadocComment

        boolean isJavadocComment()
        Is the Tok a javadoc comment?
      • isComment

        boolean isComment()
        Is the Tok a comment?