Class: LL::Epsilon

Inherits:
Object
  • Object
show all
Defined in:
lib/ll/epsilon.rb

Overview

Class used for indicating an epsilon in a grammar. Epsilon objects are primarily used to break out of recursion.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Epsilon) initialize(source_line)

Returns a new instance of Epsilon

Parameters:



12
13
14
# File 'lib/ll/epsilon.rb', line 12

def initialize(source_line)
  @source_line = source_line
end

Instance Attribute Details

- (Object) source_line (readonly)

Returns the value of attribute source_line



7
8
9
# File 'lib/ll/epsilon.rb', line 7

def source_line
  @source_line
end

Instance Method Details

- (String) inspect

Returns:

  • (String)


19
20
21
# File 'lib/ll/epsilon.rb', line 19

def inspect
  return 'Epsilon()'
end