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

#position, #production

Instance Method Summary collapse

Methods inherited from ErrorReason

#inspect, #message

Constructor Details

#initializeNoInput

Returns a new instance of NoInput.



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

def initialize()
  super(0)
end

Instance Method Details

#to_sObject

Returns the reason's message.



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

def to_s
  'Input cannot be empty.'
end