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.



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

def initialize()
  super(0)
end

Instance Method Details

#to_sObject

Returns the reason's message.



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

def to_s
  'Input cannot be empty.'
end