Class: KPeg::CompiledParser::MemoEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/kpeg/compiled_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ans, pos) ⇒ MemoEntry

Returns a new instance of MemoEntry.



190
191
192
193
194
195
196
# File 'lib/kpeg/compiled_parser.rb', line 190

def initialize(ans, pos)
  @ans = ans
  @pos = pos
  @result = nil
  @set = false
  @left_rec = false
end

Instance Attribute Details

#ansObject (readonly)

Returns the value of attribute ans.



198
199
200
# File 'lib/kpeg/compiled_parser.rb', line 198

def ans
  @ans
end

#left_recObject

Returns the value of attribute left_rec.



199
200
201
# File 'lib/kpeg/compiled_parser.rb', line 199

def left_rec
  @left_rec
end

#posObject (readonly)

Returns the value of attribute pos.



198
199
200
# File 'lib/kpeg/compiled_parser.rb', line 198

def pos
  @pos
end

#resultObject (readonly)

Returns the value of attribute result.



198
199
200
# File 'lib/kpeg/compiled_parser.rb', line 198

def result
  @result
end

#setObject (readonly)

Returns the value of attribute set.



198
199
200
# File 'lib/kpeg/compiled_parser.rb', line 198

def set
  @set
end

Instance Method Details

#move!(ans, pos, result) ⇒ Object



201
202
203
204
205
206
207
# File 'lib/kpeg/compiled_parser.rb', line 201

def move!(ans, pos, result)
  @ans = ans
  @pos = pos
  @result = result
  @set = true
  @left_rec = false
end