Interface Lexer

All Known Implementing Classes:
Lexer.DefaultLexer

public interface Lexer
Interface to tokenize arguments into tokens. Generic language parser usually contains lexing and parsing where this Lexer represents the former lexing side. Lexing takes a first step to analyse basic construct of elements out from given arguments. We get rough idea what each argument represents but don't look deeper if any of it is correct which happens later when tokens go through parsing operation.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Default implementation of a Lexer.
    static final record 
    Representing result from Lexer tokenisation.
  • Method Summary

    Modifier and Type
    Method
    Description
    tokenize(List<String> arguments)
    Tokenize given command line arguments into a list of tokens.
  • Method Details

    • tokenize

      Lexer.LexerResult tokenize(List<String> arguments)
      Tokenize given command line arguments into a list of tokens.
      Parameters:
      arguments - the command line arguments
      Returns:
      lexer result having tokens and operation messages