Class AssemblyParseToken

    • Field Detail

      • str

        protected final java.lang.String str
    • Constructor Detail

      • AssemblyParseToken

        public AssemblyParseToken​(AssemblyGrammar grammar,
                                  AssemblyTerminal term,
                                  java.lang.String str)
        Construct a new token having the given string value
        Parameters:
        grammar - the grammar containing the terminal
        term - the terminal that matched this token
        str - the portion of the input comprising this token
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getString

        public java.lang.String getString()
        Get the portion of the input comprising the token
        Returns:
        the string value
      • getSym

        public AssemblyTerminal getSym()
        Description copied from class: AssemblyParseTreeNode
        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.
        Specified by:
        getSym in class AssemblyParseTreeNode
        Returns:
        the symbol
      • print

        protected void print​(java.io.PrintStream out,
                             java.lang.String indent)
        Description copied from class: AssemblyParseTreeNode
        For debugging: Display the tree with the given indent
        Specified by:
        print in class AssemblyParseTreeNode
        Parameters:
        out - the stream
        indent - the indent
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object