Class LelloLexer

java.lang.Object
org.oristool.lello.parse.LelloLexer

public class LelloLexer extends Object
Lello lexical analyzer (lexer).

This class is responsible for reading a string representing an expression and breaking it up in terminal symbols.

  • Constructor Details

    • LelloLexer

      public LelloLexer()
      Initializes Lello lexical analyzer.
  • Method Details

    • lex

      public List<Terminal> lex(String s)
      Analyzes a string.
      Parameters:
      s - The string to be analyzed.
      Returns:
      The terminal symbols that make up the string.
    • validateName

      public static void validateName(String n)
      Checkes whether a string is a valid identifier. If it is not an exception will be thrown.
      Parameters:
      n - The string to be tested.