Package ghidra.app.plugin.assembler.sleigh.tree

# Class AssemblyParseNumericToken

java.lang.Object
ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseTreeNode
ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseToken
ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseNumericToken

public class AssemblyParseNumericToken extends AssemblyParseToken
A token having a numeric value

See Also:
  - `AssemblyFixedNumericTerminal`
  - `AssemblyNumericMapTerminal`
  - `AssemblyNumericTerminal`
  - `AssemblyStringMapTerminal`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final long`
  `val`

  ### Fields inherited from class ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseToken

  `str, term`

  ### Fields inherited from class ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseTreeNode

  `grammar, parent`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AssemblyParseNumericToken(AssemblyGrammar grammar, AssemblyTerminal term, String str, long val)`
  Construct a numeric terminal having the given string and numeric values

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `long`
  `getNumericValue()`
  Get the numeric value of the token
  `int`
  `hashCode()`
  `boolean`
  `isNumeric()`
  Check if this node yields a numeric value
  `String`
  `toString()`

  ### Methods inherited from class ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseToken

  `generateString, getString, getSym, print`

  ### Methods inherited from class ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseTreeNode

  `getGrammar, getParent, isConstructor, print, setParent`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### val

    protected final long val

- ## Constructor Details

  - ### AssemblyParseNumericToken

    public AssemblyParseNumericToken(AssemblyGrammar grammar, AssemblyTerminal term, String str, long val)
    Construct a numeric terminal having the given string and numeric values
    Parameters:
      `grammar` - the grammar containing the terminal
      `term` - the terminal that matched this token
      `str` - the portion of the input comprising this token
      `val` - the numeric value represented by this token

- ## Method Details

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `AssemblyParseToken`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `AssemblyParseToken`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `AssemblyParseToken`

  - ### getNumericValue

    public long getNumericValue()
    Get the numeric value of the token
    Returns:
      the value

  - ### isNumeric

    public boolean isNumeric()
    Description copied from class: `AssemblyParseTreeNode`
    Check if this node yields a numeric value
    Overrides:
      `isNumeric` in class `AssemblyParseTreeNode`
    Returns:
      true if this node yields a numeric value