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.

public SymbolRootNode()

Instance methods

add

Adds the given string as a symbol.

public void add(String value, TokenType tokenType) throws Exception

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

nextToken

Returns a symbol string from a scanner.

public Token nextToken(IScanner scanner)

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