class ANTLR3::Error::FailedPredicate

error

FailedPredicate

used by

all recognizers

occurs when

A recognizer is in a rule with a predicate action element, and the predicating action code evaluated to a false value.

Attributes

input[RW]
predicate_text[RW]
rule_name[RW]

Public Class Methods

new( input, rule_name, predicate_text ) click to toggle source
Calls superclass method ANTLR3::Error::RecognitionError::new
# File lib/antlr3/error.rb, line 472
def initialize( input, rule_name, predicate_text )
  @rule_name = rule_name
  @predicate_text = predicate_text
  super( input )
end

Public Instance Methods

inspect() click to toggle source
# File lib/antlr3/error.rb, line 478
def inspect
  '%s(%s, { %s }?)' % [ self.class.name, @rule_name, @predicate_text ]
end
message() click to toggle source
# File lib/antlr3/error.rb, line 482
def message
  "rule #@rule_name failed predicate: { #@predicate_text }?"
end