Interface ILexToken

All Known Subinterfaces:
Lexer.IPLexToken
All Known Implementing Classes:
Lexer.LexToken

public interface ILexToken
An interface to indicate AST classes that are also lexical tokens in the concrete syntax.
Author:
David R. Cok
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if this token signals the end of the input.
    boolean
    Returns true if this token represents a lexical error.
    default boolean
    Returns true if this token is a left parenthesis.
    default boolean
    Returns true if this token is a right parenthesis.
    A short word characterizing the class of token (e.g.
    pos()
    The lexical position of the token
  • Method Details

    • pos

      IPos pos()
      The lexical position of the token
    • kind

      String kind()
      A short word characterizing the class of token (e.g. "numeral", "symbol").
    • isError

      boolean isError()
      Returns true if this token represents a lexical error.
    • isLP

      default boolean isLP()
      Returns true if this token is a left parenthesis.
    • isRP

      default boolean isRP()
      Returns true if this token is a right parenthesis.
    • isEOD

      default boolean isEOD()
      Returns true if this token signals the end of the input.