Class: LLIP::RecursiveProductionCompiler

Inherits:
ProductionCompiler show all
Defined in:
lib/llip/recursive_production_compiler.rb

Overview

It modifies ProductionCompiler to add support to a recursive behaviour.

Instance Attribute Summary

Attributes inherited from ProductionCompiler

#code

Instance Method Summary collapse

Methods inherited from ProductionCompiler

#compile, #end, #initialize, #reset, #sort_production, #token

Constructor Details

This class inherits a constructor from LLIP::ProductionCompiler

Instance Method Details

#start(name) ⇒ Object



8
9
10
11
12
13
# File 'lib/llip/recursive_production_compiler.rb', line 8

def start(name)
  super
  @code << <<-CODE
    while not @scanner.current.nil?
  CODE
end