# File lib/ruby-vpi/verilog_parser.rb, line 10
10:   def initialize aInput
11:     input = aInput.dup
12: 
13:     # strip comments
14:       input.gsub! %r{//.*$}, ''
15:       input.gsub! %r{/\*.*?\*/}m, ''
16: 
17:     @modules = input.scan(%r{module.*?;}m).map! do |decl|
18:       Module.new decl
19:     end
20: 
21:     @constants = input.scan(%r{(`define\s+(\w+)\s+(.+))}).map! do |matches|
22:       Constant.new(*matches)
23:     end
24: 
25:     @includes = input.scan(%r{(`include\s*(\S+))}).map! do |matches|
26:       Include.new(*matches)
27:     end
28:   end