Class ConstAwareIdentifier

All Implemented Interfaces:
LexicalElementAnalyzer

public class ConstAwareIdentifier extends Identifier
  • Constructor Details

    • ConstAwareIdentifier

      public ConstAwareIdentifier(SourceReader reader)
  • Method Details

    • read

      public LexicalElement read() throws LexicalException
      Description copied from interface: LexicalElementAnalyzer
      Reads a lexeme and returns the created lexical element.

      If the characters read from the reader show that the lexeme is not the type that the class implementing this interface can handle then the characters are pushed back to he reader and null is returned.

      If the characters read from the reader show that the lexeme is the type that the class implementing this interface can handle, but is erroneous, then the method throws the exception.

      Specified by:
      read in interface LexicalElementAnalyzer
      Overrides:
      read in class Identifier
      Returns:
      the created lexeme or null
      Throws:
      LexicalException