Exception: ANTLR3::Error::RewriteCardinalityError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/antlr3/error.rb

Overview

error

RewriteCardinalityError

used by

tree-rewriting parsers and tree parsers

occurs when

There is an inconsistency between the number of appearances of some symbol on the left side of a rewrite rule and the number of the same symbol seen on the right side of a rewrite rule

Direct Known Subclasses

RewriteEarlyExit, RewriteEmptyStream

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(element_description) ⇒ RewriteCardinalityError



524
525
526
527
# File 'lib/antlr3/error.rb', line 524

def initialize( element_description )
  @element_description = element_description
  super( message )
end

Instance Attribute Details

#element_descriptionObject

Returns the value of attribute element_description



523
524
525
# File 'lib/antlr3/error.rb', line 523

def element_description
  @element_description
end

Instance Method Details

#messageObject



529
530
531
# File 'lib/antlr3/error.rb', line 529

def message
  "%s: %s" % [ self.class, @element_description ]
end