Class StiToken

java.lang.Object
com.stimulsoft.base.StiToken

public class StiToken extends Object
Copyright Stimulsoft
  • Field Details

    • EOF

      public static StiToken EOF
    • index

      public int index
      Gets or sets value indicates the beginning of token in text.
    • length

      public int length
      Gets or sets value indicates the length of token.
    • type

      public StiTokenType type
      Gets or sets value indicates the type of token.
    • data

      public Object data
      Gets or sets Value of the identifier.
  • Constructor Details

    • StiToken

      public StiToken(StiTokenType type)
      Create a new instance StiToken.
      Parameters:
      type - type Token.
    • StiToken

      public StiToken(StiTokenType type, int index, int length)
      Creates a new object of the type StiToken.
      Parameters:
      type - type Token.
      index - The Beginning Token in text.
      length - The Length Token.
    • StiToken

      public StiToken(StiTokenType type, int index, int length, char charValue)
      Creates a new object of the type StiToken.
      Parameters:
      type - type Token.
      index - The Beginning Token in text.
      length - The Length Token.
      charValue - Char for initializing
    • StiToken

      public StiToken(StiTokenType type, int index, int length, String stringValue)
      Creates an object of the type StiToken that contains the value of the string.
      Parameters:
      type - type Token.
      index - The Beginning Token in text.
      length - The Length Token.
      stringValue - String for initializing.
    • StiToken

      public StiToken(StiTokenType type, int index, int length, Object obj)
      Creates an object of the type StiToken that contains an object.
      Parameters:
      type - type Token
      index - The Beginning Token in text.
      length - The Length Token.
      obj - Object for initializing.
  • Method Details

    • isKeyword

      public boolean isKeyword()
    • isKeyword

      public boolean isKeyword(String keyword)
    • isIdent

      public boolean isIdent()
    • isIdent

      public boolean isIdent(String ident)
    • IsIdentOrKeyword

      public boolean IsIdentOrKeyword()
    • IsAssign

      public boolean IsAssign()
    • IsDot

      public boolean IsDot()
    • IsLBrace

      public boolean IsLBrace()
    • IsRBrace

      public boolean IsRBrace()
    • IsLBracket

      public boolean IsLBracket()
    • IsRBracket

      public boolean IsRBracket()
    • IsLPar

      public boolean IsLPar()
    • IsRPar

      public boolean IsRPar()
    • getDataAsString

      public String getDataAsString()
    • toString

      public String toString()
      Overrides:
      toString in class Object