Class Lexer


  • class Lexer
    extends java.lang.Object
    A lexer for the SemVer Expressions.
    Since:
    0.7.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  Lexer.Token
      This class holds the information about lexemes in the input stream.
    • Constructor Summary

      Constructors 
      Constructor Description
      Lexer()
      Constructs a Lexer instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) Stream<Lexer.Token> tokenize​(java.lang.String input)
      Tokenizes the specified input string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Lexer

        Lexer()
        Constructs a Lexer instance.
    • Method Detail

      • tokenize

        Stream<Lexer.Token> tokenize​(java.lang.String input)
        Tokenizes the specified input string.
        Parameters:
        input - the input string to tokenize
        Returns:
        a stream of tokens
        Throws:
        LexerException - when encounters an illegal character