Class: Rley::Parser::NoInput

Inherits:
ErrorReason show all
Defined in:
lib/rley/parser/error_reason.rb

Overview

This parse error occurs when no input for parsing was provided while the grammar requires some non-empty input.

Instance Attribute Summary

Attributes inherited from ErrorReason

#rank

Instance Method Summary collapse

Methods inherited from ErrorReason

#inspect, #message

Constructor Details

#initializeNoInput

Returns a new instance of NoInput.



33
34
35
# File 'lib/rley/parser/error_reason.rb', line 33

def initialize
  super(0)
end

Instance Method Details

#to_sObject

Returns the reason's message.



38
39
40
# File 'lib/rley/parser/error_reason.rb', line 38

def to_s
  'Input cannot be empty.'
end