Sha256: c607b36ce40531183901c94a4011ef6d2ac8a36815a6ea6fff51482098501158
Contents?: true
Size: 1.92 KB
Versions: 3
Compression:
Stored size: 1.92 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>new (VerilogParser)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 12</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aInput</span> <span class="ruby-identifier">input</span> = <span class="ruby-identifier">aInput</span>.<span class="ruby-identifier">dup</span> <span class="ruby-comment cmt"># strip comments</span> <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{//.*$}</span>, <span class="ruby-value str">''</span> <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{/\*.*?\*/}</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">''</span> <span class="ruby-ivar">@modules</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">%r{(module.*?;)(.*?)endmodule}</span><span class="ruby-identifier">m</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">matches</span><span class="ruby-operator">|</span> <span class="ruby-constant">Module</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">matches</span>) <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
3 entries across 3 versions & 1 rubygems