Class: Rucc::Lexer

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/rucc/lexer.rb,
lib/rucc/lexer/impl.rb,
lib/rucc/lexer/preprocessor.rb,
lib/rucc/lexer/preprocessor/pragma.rb,
lib/rucc/lexer/preprocessor/cond_incl.rb,
lib/rucc/lexer/preprocessor/constructor.rb,
lib/rucc/lexer/preprocessor/special_macro.rb

Defined Under Namespace

Classes: Impl, Preprocessor

Instance Method Summary collapse

Constructor Details

#initialize(input, filename) ⇒ Lexer

TODO(south37) Impl file management as input

Parameters:

  • input (IO)

    buffered io of C sourcecode.

  • filename (String)


18
19
20
21
22
# File 'lib/rucc/lexer.rb', line 18

def initialize(input, filename)
  @files = FileIOList.new(FileIO.new(input, filename))
  @impl = Impl.new(@files)
  @preprocessor = Preprocessor.new(@impl)
end