ExpressionNumberState

Implements an Expression-specific number state object.

Implements: GenericNumberState

Description

The ExpressionNumberState implements an expression-specific number state object.

Fields

PLUS

Represents a ‘+’ symbol.

PLUS: int = ord('+')

EXP1

Represents an ‘e’ symbol.

EXP1: int = ord(‘e’)

EXP2

Represents an ‘E’ symbol.

EXP2: int = ord(‘E’)

Instance methods

next_token

Gets the next token from the stream started from the character linked to this state.

next_token(scanner: IScanner, tokenizer: ITokenizer): Token

  • scanner: IScanner - textual string to be tokenized.
  • tokenizer: ITokenizer - tokenizer class that controls the process.
  • returns: Token - next token from the top of the stream.