Class ParseNode

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ParseNode​(int tag, java.lang.String file, int line, int column)
      generic constructor
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.Object getChild​(int idx)
      get the nth child for this node or null if the index exceeds the child count
      abstract int getChildCount()
      get the child count for this node
      int getColumn()
      get the column position for this node
      int getLine()
      get the line position for this node
      java.lang.String getPos()
      get a string representing the position for this node
      int getTag()
      get the tag for this node
      abstract java.lang.String getText()
      get the display representation of this node
      static ParseNode node​(int tag, java.lang.String file, int line, int column)
      create a simple node for a builtin token
      static ParseNode node​(int tag, java.lang.String file, int line, int column, java.lang.Object child0)
      create a simple node for a builtin token
      static ParseNode node​(int tag, java.lang.String file, int line, int column, java.lang.Object child0, java.lang.Object child1)
      create a simple node for a builtin token
      static ParseNode node​(int tag, java.lang.String file, int line, int column, java.lang.Object child0, java.lang.Object child1, java.lang.Object child2)
      create a simple node for a builtin token
      static ParseNode node​(int tag, java.lang.String file, int line, int column, java.lang.Object child0, java.lang.Object child1, java.lang.Object child2, java.lang.Object child3)
      create a simple node for a builtin token
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ParseNode

        protected ParseNode​(int tag,
                            java.lang.String file,
                            int line,
                            int column)
        generic constructor
        Parameters:
        tag - identifies the type of this node
        file - identifies the file containing the node's text
        line - identifies the start line for this node's text
        column - identifies the start columen for this node's text
    • Method Detail

      • getTag

        public int getTag()
        get the tag for this node
        Returns:
        the tag for this node
      • getLine

        public int getLine()
        get the line position for this node
        Returns:
        the line position for this node
      • getColumn

        public int getColumn()
        get the column position for this node
        Returns:
        the column position for this node
      • getChildCount

        public abstract int getChildCount()
        get the child count for this node
        Returns:
        the child count for this node
      • getChild

        public abstract java.lang.Object getChild​(int idx)
        get the nth child for this node or null if the index exceeds the child count
        Parameters:
        idx - the child index
        Returns:
        the nth child for this node
      • getText

        public abstract java.lang.String getText()
        get the display representation of this node
        Returns:
        the display representation of this node
      • getPos

        public java.lang.String getPos()
        get a string representing the position for this node
        Returns:
        a string representing the position for this node
      • node

        public static ParseNode node​(int tag,
                                     java.lang.String file,
                                     int line,
                                     int column)
        create a simple node for a builtin token
        Parameters:
        tag - identifies the type of this node
        file - identifies the file containing the node's text
        line - identifies the start line for this node's text
        column - identifies the start columen for this node's text
        Returns:
        a simple node for a builtin token
      • node

        public static ParseNode node​(int tag,
                                     java.lang.String file,
                                     int line,
                                     int column,
                                     java.lang.Object child0)
        create a simple node for a builtin token
        Parameters:
        tag - identifies the type of this node
        file - identifies the file containing the node's text
        line - identifies the start line for this node's text
        column - identifies the start columen for this node's text
        child0 - the first child for this node
        Returns:
        a simple node for a builtin token
      • node

        public static ParseNode node​(int tag,
                                     java.lang.String file,
                                     int line,
                                     int column,
                                     java.lang.Object child0,
                                     java.lang.Object child1)
        create a simple node for a builtin token
        Parameters:
        tag - identifies the type of this node
        file - identifies the file containing the node's text
        line - identifies the start line for this node's text
        column - identifies the start columen for this node's text
        child0 - the first child for this node
        child1 - the second child for this node
        Returns:
        a simple node for a builtin token
      • node

        public static ParseNode node​(int tag,
                                     java.lang.String file,
                                     int line,
                                     int column,
                                     java.lang.Object child0,
                                     java.lang.Object child1,
                                     java.lang.Object child2)
        create a simple node for a builtin token
        Parameters:
        tag - identifies the type of this node
        file - identifies the file containing the node's text
        line - identifies the start line for this node's text
        column - identifies the start columen for this node's text
        child0 - the first child for this node
        child1 - the second child for this node
        child2 - the third child for this node
        Returns:
        a simple node for a builtin token
      • node

        public static ParseNode node​(int tag,
                                     java.lang.String file,
                                     int line,
                                     int column,
                                     java.lang.Object child0,
                                     java.lang.Object child1,
                                     java.lang.Object child2,
                                     java.lang.Object child3)
        create a simple node for a builtin token
        Parameters:
        tag - identifies the type of this node
        file - identifies the file containing the node's text
        line - identifies the start line for this node's text
        column - identifies the start columen for this node's text
        child0 - the first child for this node
        child1 - the second child for this node
        child2 - the third child for this node
        child3 - the fourth child for this node
        Returns:
        a simple node for a builtin token