Class DslLexer.Tokenizer

  • Enclosing class:
    DslLexer

    public static class DslLexer.Tokenizer
    extends Object
    • Field Detail

      • position

        public int position
      • line

        public int line
      • input

        public final String input
    • Constructor Detail

      • Tokenizer

        public Tokenizer​(String input)
    • Method Detail

      • peekNextToken

        public Token peekNextToken()
      • getNextToken

        public Token getNextToken()
      • getCurrentChar

        public char getCurrentChar()
      • advance

        public void advance()
      • back

        public void back()
      • substring

        public String substring​(int start,
                                int end)
      • peekNextChar

        public char peekNextChar()
      • getLine

        public int getLine()
        Returns:
        get current tokenizer line on which we are parsing the tokens
      • getLine

        public int getLine​(Token token)
        Get the line in which the token appears. This should be only used for reporting error messages, as this method is quite slow (iterating over the entire text).
      • getCharacterNumberInLine

        public int getCharacterNumberInLine​(Token token)