Package edu.wpi.first.util.struct.parser
Class Lexer
java.lang.Object
edu.wpi.first.util.struct.parser.Lexer
public class Lexer extends Object
Raw struct schema lexer.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description int
getPosition()
Gets the starting position of the last lexed token.String
getTokenText()
Gets the text of the last lexed token.TokenKind
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)
-