Class Lexer

java.lang.Object
edu.wpi.first.util.struct.parser.Lexer

public class Lexer
extends Object
Raw struct schema lexer.
  • Constructor Details

    • Lexer

      public Lexer​(String in)
      Construct a raw struct schema lexer.
      Parameters:
      in - schema
  • Method Details

    • scan

      public TokenKind scan()
      Gets the next token.
      Returns:
      Token kind; the token text can be retrieved using getTokenText()
    • getTokenText

      public String getTokenText()
      Gets the text of the last lexed token.
      Returns:
      token text
    • getPosition

      public int getPosition()
      Gets the starting position of the last lexed token.
      Returns:
      position (0 = first character)