Exception: ANTLR3::Error::TreeInconsistency
- Inherits:
-
StandardError
- Object
- StandardError
- ANTLR3::Error::TreeInconsistency
- Defined in:
- lib/antlr3/error.rb
Overview
- 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:
-
A node has a child node with a @parent attribute different than the node.
-
A node has a child at index
n
, but the child’s @child_index value is notn
-
An adaptor encountered a situation where multiple tree nodes have been simultaneously requested as a new tree root.
Class Method Summary collapse
- .failed_index_check!(expected, real) ⇒ Object
- .failed_parent_check!(expected, real) ⇒ Object
- .multiple_roots! ⇒ Object
Class Method Details
.failed_index_check!(expected, real) ⇒ Object
579 580 581 582 583 584 |
# 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) ⇒ Object
586 587 588 589 590 591 |
# 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! ⇒ Object
593 594 595 |
# File 'lib/antlr3/error.rb', line 593 def self.multiple_roots! new "%s: attempted to change more than one node to root" % self end |