Package edu.wpi.first.util.struct.parser
Class Lexer
java.lang.Object
edu.wpi.first.util.struct.parser.Lexer
Raw struct schema lexer.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the starting position of the last lexed token.Gets the text of the last lexed token.scan()
Gets the next token.
-
Constructor Details
-
Lexer
Construct a raw struct schema lexer.- Parameters:
in
- schema
-
-
Method Details
-
scan
Gets the next token.- Returns:
- Token kind; the token text can be retrieved using getTokenText()
-
getTokenText
Gets the text of the last lexed token.- Returns:
- token text
-
getPosition
Gets the starting position of the last lexed token.- Returns:
- position (0 = first character)
-