Class SymbolRootNode


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

      • SymbolRootNode

        public SymbolRootNode()
        Creates and initializes a root node.
    • Method Detail

      • add

        public void add​(String value,
                        TokenType tokenType)
                 throws Exception
        Add the given string as a symbol.
        Parameters:
        value - The character sequence to add.
        tokenType -
        Throws:
        Exception
      • nextToken

        public Token nextToken​(IScanner scanner)
        Return a symbol string from a scanner.
        Parameters:
        scanner - A scanner to read from
        Returns:
        A symbol string from a scanner