class ANTLR3::Error::TreeInconsistency

error

TreeInconsistency

used by

classes that deal with tree structures

occurs when

A tree node’s data is inconsistent with the overall structure to which it belongs.

situations that result in tree inconsistencies:

  1. A node has a child node with a +@parent+ attribute different than the node.

  2. A node has a child at index n, but the child’s +@child_index+ value is not n

  3. An adaptor encountered a situation where multiple tree nodes have been simultaneously requested as a new tree root.

Public Class Methods

failed_index_check!( expected, real ) click to toggle source
# File lib/antlr3/error.rb, line 579
def self.failed_index_check!( expected, real )
  new( 
    "%s: child indexes don't match -> expected %d found %d" %
    [ self, expected, real ]
  )
end
failed_parent_check!( expected, real ) click to toggle source
# File lib/antlr3/error.rb, line 586
def self.failed_parent_check!( expected, real )
  new( 
    "%s: parents don't match; expected %p found %p" %
    [ self, expected, real ]
  )
end
multiple_roots!() click to toggle source
# File lib/antlr3/error.rb, line 593
def self.multiple_roots!
  new "%s: attempted to change more than one node to root" % self
end