[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dennou-ruby:000936] Re: install



From: Takeshi Horinouchi <horinout@xxxxxx>
Subject: [dennou-ruby:000931] Re: install
Date: Tue, 30 Oct 2001 19:16:50 +0900

> �Ȥ������Ȥǡ������ƥ��Ǥ��ߤޤ��󤬡��ѹ����Ƥ� ChangLog �˽�
> �ơ�tar ����ľ���ơ�
> 
> dennou-t.gfd-dennou.org:/GFD_Dennou_Club/ftp/arch/ruby/products/ruby-dcl/work/
>
> ���֤��Ƥ������������Ȥ��󤵤�� davis ���롼�ץǥ��쥯�ȥ꡼��
> �񤭹��߸��¤�����Ǥ��礦���顣���뤤�ϡ��С��������ľ夲�ơ�
> 
> dennou-t.gfd-dennou.org:/GFD_Dennou_Club/ftp/arch/ruby/products/ruby-dcl/
> 
> ���֤��Ʋ����äƤ⤤���Ǥ����Ȥ����������줬���ֳڡ�

���������ߤޤ����󡢤��Ф餯��Ǿ����login���Ƥʤ��ä���ѥ�
��ɤ򤹤ä���˺��Ƥ��ޤ��ޤ������Ȥۤۡ��Ȥꤢ����
ChangeLog�Υ���ȥ�ȥѥå�����ޤ���

Fri Nov  2 22:46:22 2001  GOTO Kentaro  <gotoken@xxxxxx>

	* pparse.rb: does not depends on cpp(1). 


--- pparse.rb.orig	Sun Jul 15 11:02:50 2001
+++ pparse.rb	Fri Nov  2 22:41:03 2001
@xxxxxx@xxxxxx -3,3 +3,2 @xxxxxx@xxxxxx
 
-require "open3"
 require "prototype"
@xxxxxx@xxxxxx -28,2 +27,19 @xxxxxx@xxxxxx
 
+  def delete_comment(src) # [ruby-list:32030] [ruby-list:32049]
+    src.gsub(%r@xxxxxx ([\'\"])(\\.|.)*?\1
+               | (/\*.*?\*/)      
+               | (//)[^\n]*$      
+               @xxxxxx) {
+      if $3
+	s = $3.delete("^\n")
+	s = ' ' if s.empty?
+	s
+      elsif $4
+	''
+      else
+	$&
+      end
+    }
+  end
+
   def initialize(file)
@xxxxxx@xxxxxx -35,19 +51,3 @xxxxxx@xxxxxx
 
-    pin, pout, perr = Open3::popen3("cpp")
-    @xxxxxx = pout
-
-    Thread::abort_on_exception = true
-    Thread::start{
-      while line = input.gets
-	pin.print line
-      end
-      pin.close
-    }
-
-    Thread::start{
-      while line = perr.gets
-	STDERR.print line
-      end
-    }
-    @xxxxxx = nil
+    @xxxxxx = delete_comment(input.read)
   end

-- Gotoken