Class AssemblyParseTreeNode

    • Constructor Detail

      • AssemblyParseTreeNode

        public AssemblyParseTreeNode​(AssemblyGrammar grammar)
        Construct a node for a tree parsed by the given grammar
        Parameters:
        grammar - the grammar
    • Method Detail

      • getSym

        public abstract AssemblySymbol getSym()
        Get the symbol for which this node is substituted For a branch, this is the LHS of the corresponding production. For a token, this is the terminal whose tokenizer matched it.
        Returns:
        the symbol
      • getParent

        public AssemblyParseBranch getParent()
        Get the branch which contains this node
        Returns:
      • setParent

        protected void setParent​(AssemblyParseBranch parent)
        Set the branch which contains this node
        Parameters:
        parent -
      • print

        public void print​(java.io.PrintStream out)
        For debugging: Display this parse tree via the given stream
        Parameters:
        out - the stream
      • print

        protected abstract void print​(java.io.PrintStream out,
                                      java.lang.String indent)
        For debugging: Display the tree with the given indent
        Parameters:
        out - the stream
        indent - the indent
      • isConstructor

        public boolean isConstructor()
        Check if this node yields a subconstructor resolution
        Returns:
        true if this node yields a subconstructor resolution
      • isNumeric

        public boolean isNumeric()
        Check if this node yields a numeric value
        Returns:
        true if this node yields a numeric value
      • getGrammar

        public AssemblyGrammar getGrammar()
        Get the grammar used to parse the tree
        Returns:
        the grammar
      • generateString

        public abstract java.lang.String generateString()
        Generate the string that this node parsed
        Returns:
        the string