SymbolRootNode

This class is a special case of SymbolNode. A SymbolRootNode object has no symbol of its own, but has children that represent all possible symbols.

Extends: SymbolNode

Description

The SymbolRootNode class is a special case of SymbolNode. A SymbolRootNode object has no symbol of its own, but has children that represent all possible symbols.

Constructors

Creates and initializes a root node.

SymbolRootNode()

Instance methods

add

Adds the given string as a symbol.

void add(String value, TokenType tokenType)

  • value: String - character sequence to add.
  • tokenType: TokenType - token type

nextToken

Returns a symbol string from a scanner.

Token nextToken(IScanner scanner)

  • scanner: IScanner - scanner to read from
  • returns: Token - symbol string from a scanner